This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
kelechi96's profile picture

[Question][Lua][SMP] Measuring IC2 EU's with ComputerCraft

Started by kelechi96, 04 April 2012 - 02:44 AM
kelechi96 #1
Posted 04 April 2012 - 04:44 AM
So this is the scenario. In IC2 I provide power to others on the server. But I want to find out how much power I'm outputting so I can charge people accordingly. IC2 does have an EU-Detector Cable however it's not very effective and stays on longer than power is being provided this creates an artificial extra amount of power used. Which isn't fair.
FuzzyPurp #2
Posted 04 April 2012 - 04:49 AM
http://www.computercraft.info/forums2/index.php?/topic/126-cc13-addonccsensors/
kelechi96 #3
Posted 04 April 2012 - 12:37 PM
Does ccSensors work on SMP ?

EDIT: It doesn't seem to according to their page.
OmegaVest #4
Posted 04 April 2012 - 04:50 PM
Hmm, you could set a MFSU, MFE or BatBox to output a signal whenever it is full, or low, and have a terminal count ticks until it is full again. If you know, roughly, how much power goes out per tick, you can then determine about how much power is going out to each person, supposing you are using a single terminal for each MFSU. It's a little more useful than an EU detector cable, but I don't know how "useful" it actually is, or if it would be off by any time.

For instance, I know that MFSUs sometimes don't switch off their signal when ordered.

Also, this is a very expensive option for the high-end power grids.

That said, if this works, you could also use split cables to cut off power if they go over a limit or don't pay. :)/>/>


*Time passes, I think*

Actually, I have discovered a flaw that only proper testing could rectify (I can't presently, as RL is being overbearing). Storage devices always send out a specific amount of energy, even if the machines they are connected to are not asking for that much, so far as I can tell.

Also, this only really works if the outgoing storage devices eventually fill up. So if they are using MFFSs, this could prove problematic.

Well, this post is just one big mess. But maybe it will help you find something useful. I hope so.
Turtlemoviesco #5
Posted 04 April 2012 - 07:18 PM
I would also like to know more about this.
FuzzyPurp #6
Posted 05 April 2012 - 09:55 AM
Using alot of math its all possible.
OmegaVest #7
Posted 05 April 2012 - 03:52 PM
Okay, so during the night, actually in a dream, I had a small revalation: Storage devices (and to a certain extent EU Detectors) have just as much lag turning on as they do turning off.

Or, at the very least, they have the same amount of extra "on" time as they do "off" time. Again, so far as I an tell. I am mostly working off of memory (forgot to keep my 1.2.3 JAR), so using my above system of MFSU/MFE/BatBox plus terminals should work. You'll just have to try out a timing system. (Turn on a small device, have the computer time it, turn the device off, print out numbers, rework until right.) Should work. *Should*