Jump to content




Redstone Flux Control Center (RFCC) - EU fork now available!

computer peripheral

  • You cannot reply to this topic
40 replies to this topic

#1 dragonlord

  • Members
  • 15 posts

Posted 15 May 2014 - 05:45 AM

This started as a frustration with EnderIO's Power Monitor, and the need for a more robust power management system.

Do you have an RF-based power grid that you want to know the status at a glance?

Do you want to consolidate all your RF-based storage devices and make them work as one?

Do you need to have your Big Reactor come online when your magmatic dynamos can't handle the load?

Look no further.

Presenting the Redstone Flux Control Center (RFCC) v0.3!

RFCC is the latest in Redstone Flux Technology. With the help of ComputerCraft and OpenPeripherals, we can now build complex, heterogenous, RF-based power grids with minimal fuss.

Do you have Resonant Energy Cells and Ultimate Energy Cubes from Mekanism? Do you want to see how much power is flowing thru your Energy conduits? RFCC will recognize them just fine.

RFCC was built with expansion in mind. With the hotplug subsystem, you can add and remove devices from the grid, without having to touch the config or restarting RFCC.

Constrained by 6 block sides? Conect all your storage devices and monitors via wired modems.

Need to turn on your reactor when your grid is low on power? RFCC emits a redstone signal when it reaches the low power threshold, and will turn off when it reaches normal levels.


Features:
  • Dashboard - shows the summary of your power grid. You can check the details of each capacitor on the grid simply by clicking (on the native console) or right clicking on an external monitor.

  • Hotplug subsystem - Allows adding and removal of peripherals from your network, on the fly! No need to mess around with the configuration. No need to restart the program. If RFCC detects a valid RF device, it'll add it to the grid immediately.

  • Multi-monitor support - do you want to have a dashboard in your power plant, and in your house? No problem. Just hook up an advanced monitor to your grid, and turn them on via the Monitor Selection screen.

Minimum requirements:

Computercraft 1.6
OpenPeripherals
Thermal Expansion 3


Installation:

Please note: RFCC only works with Advanced Computers and Advanced Monitors. Advanced Turtles may work, but not tested (and the UI may not look as good).

Just run this command in your advanced computer to install RFCC as a startup program:

pastebin get TfeHE7Wy startup

Future versions of RFCC will use the same pastebin.

On first startup, RFCC will generate its default configuration file, and ask you to inspect it first before running. Once you're happy with the settings, just run RFCC again.

When a new version of RFCC is released, updating is easy. Just run

startup update

And it will download the update from the same pastebin. Useful if you have a lot of sub-grids.



Notes about the Hotplug Subsystem:

While I've done my best to ensure that the hotplug subsystem is sane for use, it's not perfect. When removing a storage device or monitor, you must turn off the connected modem first. If you don't, this will result in "ghost" devices: the computer still sees the device as connected, even though it's not. And in this scenario, you will have to restart the computer.

If you need to be able to add and remove storage devices on the fly, consider using a Peripheral Proxy.


Tutorial:

Spoiler


IC2 (EU) Support:

Spoiler


Enjoy!

Edited by dragonlord, 24 May 2014 - 04:30 AM.


#2 VerTiGo_Etrex

  • Members
  • 11 posts

Posted 17 May 2014 - 09:30 PM

Awesome! This is exactly what I needed for my Big Reactor system :)

#3 Goo

  • New Members
  • 2 posts

Posted 19 May 2014 - 01:09 PM

This is amazing, i've watched your video 3 times:) unfortunately, i've run into a problem... For some reason, it wont start the program, it only says: startup:183: attept to call table .... Aaand im a starter at CC, ive never made a program, and im so lost:( what am i doing wrong? Ive copied everything you did, step by step on your video... Thanks in advance for helping me:)

#4 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 19 May 2014 - 03:00 PM

Read your error. You are attempting to call a table. Look at the code. He probably made a typo.

#5 Goo

  • New Members
  • 2 posts

Posted 19 May 2014 - 03:11 PM

It says startup:183: attempt to call table. Nothing else:( and as i said, i dont really know much about programming... I look at it and i cant really say anything :P

#6 Hansbald

  • Members
  • 11 posts

Posted 19 May 2014 - 03:55 PM

Hey,
Can you modify/tell me how to modify it so it displays EU from MFSU's? That would be really awesome :P I use this on my server :)

#7 dragonlord

  • Members
  • 15 posts

Posted 20 May 2014 - 03:15 AM

View PostGoo, on 19 May 2014 - 03:11 PM, said:

It says startup:183: attempt to call table. Nothing else:( and as i said, i dont really know much about programming... I look at it and i cant really say anything :P/>

What version of CC are you using? It should be the latest. That line of code is only available to CC 1.6 and later.

#8 dragonlord

  • Members
  • 15 posts

Posted 20 May 2014 - 03:23 AM

View PostHansbald, on 19 May 2014 - 03:55 PM, said:

Hey,
Can you modify/tell me how to modify it so it displays EU from MFSU's? That would be really awesome :P/> I use this on my server :)/>

From my understanding of openperipherals, the method name should be the same, regardless if it's an MFSU or an RF-based device. In other words, you can use this directly. You'll probably just have to find and replace all "RF" to "EU" for the labels.

If that's not the case, you will need to check what are the methods exposed via the peripheral API to get the current reading and max storage. Then look for the constants section, and edit the method names.

#9 Hansbald

  • Members
  • 11 posts

Posted 20 May 2014 - 02:27 PM

View Postdragonlord, on 20 May 2014 - 03:23 AM, said:

View PostHansbald, on 19 May 2014 - 03:55 PM, said:

Hey,
Can you modify/tell me how to modify it so it displays EU from MFSU's? That would be really awesome :P/> I use this on my server :)/>

From my understanding of openperipherals, the method name should be the same, regardless if it's an MFSU or an RF-based device. In other words, you can use this directly. You'll probably just have to find and replace all "RF" to "EU" for the labels.

If that's not the case, you will need to check what are the methods exposed via the peripheral API to get the current reading and max storage. Then look for the constants section, and edit the method names.

I just tried that, nope not the same methods, I changed the constants to the MFSU ones, but I get all kinds of errors I can't seem to fix...

One of them is too many arguments on the addCapacitor thingy

#10 dragonlord

  • Members
  • 15 posts

Posted 21 May 2014 - 12:36 AM

View PostHansbald, on 20 May 2014 - 02:27 PM, said:

View Postdragonlord, on 20 May 2014 - 03:23 AM, said:

View PostHansbald, on 19 May 2014 - 03:55 PM, said:

Hey,
Can you modify/tell me how to modify it so it displays EU from MFSU's? That would be really awesome :P/> I use this on my server :)/>

From my understanding of openperipherals, the method name should be the same, regardless if it's an MFSU or an RF-based device. In other words, you can use this directly. You'll probably just have to find and replace all "RF" to "EU" for the labels.

If that's not the case, you will need to check what are the methods exposed via the peripheral API to get the current reading and max storage. Then look for the constants section, and edit the method names.

I just tried that, nope not the same methods, I changed the constants to the MFSU ones, but I get all kinds of errors I can't seem to fix...

One of them is too many arguments on the addCapacitor thingy

If that's the case, then that means you have no choice but to modify the addCapacitors() and getReading() methods. Those two methods assume that the methods to be called on the peripherals require one parameter (Forge direction).

#11 Hansbald

  • Members
  • 11 posts

Posted 21 May 2014 - 04:05 PM

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked

#12 apemanzilla

  • Members
  • 1,421 posts

Posted 21 May 2014 - 07:28 PM

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked
There's multiple versions of cclite available for 1.6, including:
My fork
Gamax's fork
The original by Sorroko

Additionally, Mimic is available for 1.5 in a slightly buggy form, and if you can get your hands on a copy of the old CCEmu there's that for 1.5 (and it probably is the best one with the least bugs, too)

If you need 1.6, I'd recommend my version of cclite for ease of use as it has a menu option to open the data folder, or if either works then CCEmu would be better.

Edited by apemanzilla, 21 May 2014 - 07:29 PM.


#13 dragonlord

  • Members
  • 15 posts

Posted 21 May 2014 - 10:47 PM

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked

What's wrong with editing your program directly via your favorite editor? No need to copy/paste. Just save and run.

#14 Hansbald

  • Members
  • 11 posts

Posted 22 May 2014 - 03:03 PM

View Postdragonlord, on 21 May 2014 - 10:47 PM, said:

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked

What's wrong with editing your program directly via your favorite editor? No need to copy/paste. Just save and run.

I'm stupid :P Thanks for reminding me you can edit outside of minecraft ._.


View Postapemanzilla, on 21 May 2014 - 07:28 PM, said:

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked
There's multiple versions of cclite available for 1.6, including:
My fork
Gamax's fork
The original by Sorroko

Additionally, Mimic is available for 1.5 in a slightly buggy form, and if you can get your hands on a copy of the old CCEmu there's that for 1.5 (and it probably is the best one with the least bugs, too)

If you need 1.6, I'd recommend my version of cclite for ease of use as it has a menu option to open the data folder, or if either works then CCEmu would be better.

Thank you so much :)

I nearly finished it just have one problem:

this:
currentReading = v.peripheral[GET_ENERGY_STORED_FUNCTION_MFSU]
returns a function and not a value?!
Am I missing something?

(GET_ENERY_STORED_FUNCTION_MFSU is getEUStored)

if I just do getEUStored in another programm it works fine

Edited by Hansbald, 22 May 2014 - 04:51 PM.


#15 NassiC

  • New Members
  • 2 posts

Posted 22 May 2014 - 03:28 PM

Hi
Cool program, it looks like just the thing i need. But im a fool with all this programing stuff, never learned it at all... When i start the program, i follow your steps to the letter, i get this error: startup:183: attept to call table

I saw there was another dude who got the same error, but non of that helped me out. I am useing version 1.63 of cc, so that shouldnt be the problem and i have no clue how i can look at or fix the code my self. So i hope you can help me get it working... :)

/NassiC

#16 apemanzilla

  • Members
  • 1,421 posts

Posted 22 May 2014 - 04:00 PM

View PostHansbald, on 22 May 2014 - 03:03 PM, said:

Thank you so much :)

I just built my version of CCLite, so you can just use one of those downloads if you don't want the extra setup. (here)

#17 Hansbald

  • Members
  • 11 posts

Posted 22 May 2014 - 05:06 PM

View Postapemanzilla, on 22 May 2014 - 04:00 PM, said:

View PostHansbald, on 22 May 2014 - 03:03 PM, said:

Thank you so much :)

I just built my version of CCLite, so you can just use one of those downloads if you don't want the extra setup. (here)
Thanks already got it :)
Just need to find out why it is not returning a function and not a number like it should be...

#18 dragonlord

  • Members
  • 15 posts

Posted 23 May 2014 - 05:51 AM

View PostHansbald, on 22 May 2014 - 03:03 PM, said:

View Postdragonlord, on 21 May 2014 - 10:47 PM, said:

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked

What's wrong with editing your program directly via your favorite editor? No need to copy/paste. Just save and run.

I'm stupid :P Thanks for reminding me you can edit outside of minecraft ._.


View Postapemanzilla, on 21 May 2014 - 07:28 PM, said:

View PostHansbald, on 21 May 2014 - 04:05 PM, said:

Is there a computercraft 1.6 emulator yet? It's really annoying to change a line of code and C&P it into minecraft to see if it worked
There's multiple versions of cclite available for 1.6, including:
My fork
Gamax's fork
The original by Sorroko

Additionally, Mimic is available for 1.5 in a slightly buggy form, and if you can get your hands on a copy of the old CCEmu there's that for 1.5 (and it probably is the best one with the least bugs, too)

If you need 1.6, I'd recommend my version of cclite for ease of use as it has a menu option to open the data folder, or if either works then CCEmu would be better.

Thank you so much :)

I nearly finished it just have one problem:

this:
currentReading = v.peripheral[GET_ENERGY_STORED_FUNCTION_MFSU]
returns a function and not a value?!
Am I missing something?

(GET_ENERY_STORED_FUNCTION_MFSU is getEUStored)

if I just do getEUStored in another programm it works fine

This code
currentReading = v.peripheral[GET_ENERGY_STORED_FUNCTION_MFSU]

Should read as
currentReading = v.peripheral[GET_ENERGY_STORED_FUNCTION_MFSU](yourParametersHereIfNecessary)

Without the parenthesis, you're just doing a regular table lookup, and not a function call.

#19 dragonlord

  • Members
  • 15 posts

Posted 23 May 2014 - 05:57 AM

View PostNassiC, on 22 May 2014 - 03:28 PM, said:

Hi
Cool program, it looks like just the thing i need. But im a fool with all this programing stuff, never learned it at all... When i start the program, i follow your steps to the letter, i get this error: startup:183: attept to call table

I saw there was another dude who got the same error, but non of that helped me out. I am useing version 1.63 of cc, so that shouldnt be the problem and i have no clue how i can look at or fix the code my self. So i hope you can help me get it working... :)

/NassiC

Line 183 is this:

local nativeTerm = term.native()

term.native() is a CC 1.6 API. It won't work on lower versions.

Are you using a modpack? Or you made your own? My first suspicion is an API conflict, which might be caused by 2 different CC versions installed in the same modpack.

#20 NassiC

  • New Members
  • 2 posts

Posted 23 May 2014 - 08:04 AM

View Postdragonlord, on 23 May 2014 - 05:57 AM, said:

View PostNassiC, on 22 May 2014 - 03:28 PM, said:

Hi
Cool program, it looks like just the thing i need. But im a fool with all this programing stuff, never learned it at all... When i start the program, i follow your steps to the letter, i get this error: startup:183: attept to call table

I saw there was another dude who got the same error, but non of that helped me out. I am useing version 1.63 of cc, so that shouldnt be the problem and i have no clue how i can look at or fix the code my self. So i hope you can help me get it working... :)

/NassiC

Line 183 is this:

local nativeTerm = term.native()

term.native() is a CC 1.6 API. It won't work on lower versions.

Are you using a modpack? Or you made your own? My first suspicion is an API conflict, which might be caused by 2 different CC versions installed in the same modpack.

Thanks for your answer... :)

I am useing the Crackpack modpack from atlauncer. From what i can see, they use cc version 1.63.
How can i check if there is 2 defrent versions installed?
I get the same error in bot a singler player and on my server. If that makes it easyer any defrence... :)

/NassiC





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users