reef-pi :: An opensource reef tank controller based on Raspberry Pi.

That's the right idea, you just need to reverse the steps in your "Day On" and "Night On" Macros for it to work right. It needs to be written backwards in reverse state for it to work.

So "Day On" should read:
  1. Humidity Day -> Off
  2. Wait 60s (Or whatever value you want if you want that)
  3. Humidity Night -> On
So when the Timer triggers this macro, it will turn Humidity Night off, wait 1 minute then Humidity Day On.

It's a bit Bass Ackwards I know, but that 's how it works at the moment. The Dev's are working on sorting it out though from what I know

Like this?

1590753281856.png
 
No.

For "Night on" it must be in this order from top to bottom.
  • Humidity Night -> Turn Off
  • Wait 2 seconds
  • Humidity Day -> Turn On

For "Day On" like this
  • Humidity Day -> Turn Off
  • Wait 2 seconds
  • Humidity Night -> Turn On
Needs to be opposite to what you want.
this confuses me! XD
 
So I have made a couple of 8 channel power Controllers using these relays.


IMG_20200525_083342_290.jpg


I am using a buck converter to deliver the 5v to the VCC and gnd on the relays

The raspberry pi will turn on the outlets individually and may go upto three outlets but anything more then that turns off every outlet of the relay and the lights stop illuminating on the relay.

Do I need a logic converter to get 3.3 to 5v?

I wouldn't of thought it would of switched one relay if voltage was an issue?

Are there particular Gpio on the raspberry pi 4b that I can't use beside the usual power and grounds?
Are pi and relay’s GND connected ?
 
Just spotted this comment now.

Being from South Africa, despite being English, I do speak fluent Afrikaans which is very similar to Dutch - Day = Dag and Night = Nag

Ek kan jou so redelik bietjie verstaan! ;)
Whoa :-) that’s so cool . How you say “welcome” ?
 
Are pi and relay’s GND connected ?
No the gnd on the relay only has the ground from the buck converter wired to it. Should I add a pi ground also? Will this not let the pi have access to the 5v from the buck converter?
 
Well really it only experiences "wear" when it is turned off and on really. When it is left running, it is all in the RAM. A lot of major companies rely on flash storage for the OS of virtual machine hypervisors. Myself included. You could always set up a SSD or external drive and use that instead

Yeah thats theory but I have pretty stable electric and can go months without rebooting. I tried all kinds of different cards but still have had issues. For the new build I went with an external m.2 drive via usb, will see if it fairs better. For my legacy build I went with a mini-usb drive, will see if it behaves better.
 
I would agree to that. Im using samsung evo, and most of them running fine for more than two years. Although almost all my cheaper sandisk cards did failed soon after first year of their usage. After that i aggressively updated all builds with samsung cards. The whole in-memroy ring buffer optimization came out of that experience. I also keep the reef-pi db copy in google drive for backup.

Iv'e had samsung evo's have the same issue, not sure how you know ones that are going to last, at least for my none zero builds I am going to try usb based alternatives and see if its better.
 
We updated the prometheus library in 3.4. It looks like the new update does not allow metric name starting with number and thus "10g" is causing it to panic (i am assuming you have a temperature controller with name 10g). For the time being changing it to something else that does not starts with a number might fix it (e,g. TenG or IOg) or just disable prometheus from the preferences. Meanwhile I'll check if we can prevent this in reef-pi side , i.e check if the metric name is valid or not, and error instead of panic if its invalid.

This is not a nice bug, it basically locks you out and you have to pitch the database and start over. It appears that not only the temp definitions need to not start with a number but it also applies to the lighting. I was just about done and have to start over once again. I could just turn Prometheus off but rather like having the data.

Oh well tenth time is the charm...wait maybe i have that wrong ;)

:)
 
Question for the macro gurus...

I am getting a co2 system to aid in plant growth and to stabilize ph swings in my 75g FW planted.
As everyone knows i am a stickler for redundancy. The co2 system has a simple on/off solenoid that will be run from one of my equipment outlets.

I would like to be able to:
Turn the co2 ON 30 mins before my lights come on.
Turn the co2 OFF 30 mins before lights off.
Use the PH controller to turn off the co2 if something goes wrong and the system decides to dump co2. So if ph goes below a preset level it turns the co2 off.

Is this a setup of 2 ph controllers off the same ph probe and a macro for ON and a Macro for OFF?
 
This is not a nice bug, it basically locks you out and you have to pitch the database and start over. It appears that not only the temp definitions need to not start with a number but it also applies to the lighting. I was just about done and have to start over once again. I could just turn Prometheus off but rather like having the data.

Oh well tenth time is the charm...wait maybe i have that wrong ;)

:)
You can do reef-pi db update temperature 1 (assuming the if of the 10g temp controller is 1) to change the name. That should fix everything without database reset. Post reef-pi dB command , any such isssue can be fixed without resetting database ,
 
No the gnd on the relay only has the ground from the buck converter wired to it. Should I add a pi ground also? Will this not let the pi have access to the 5v from the buck converter?
Are you powering pi also from the same power supply ? Ideally all gnd (of the dc circuits ) should be in one rail. Use multimeter to understand where in circuit the issue is happening , if you are really curious, start with pi gpio output pin (which is 3.3 v when on, 0 when off) and go downstream till you reach the relay pins .
 
Are you powering pi also from the same power supply ? Ideally all gnd (of the dc circuits ) should be in one rail. Use multimeter to understand where in circuit the issue is happening , if you are really curious, start with pi gpio output pin (which is 3.3 v when on, 0 when off) and go downstream till you reach the relay pins .
It is possible some time there’s short of other circuit issues ,,
 
It is possible some time there’s short of other circuit issues ,,


I understand the GPIO pins on the pi etc and have checked for short circuits and narrowed it down to been the pi but if it hasn't got a common ground with the buck converter and the relay I ain't getting anywhere fast so I will get that sorted today and see what happens.

I didn't realise I needed common grounds so thanks for clearing that up
 
Question for the macro gurus...

I am getting a co2 system to aid in plant growth and to stabilize ph swings in my 75g FW planted.
As everyone knows i am a stickler for redundancy. The co2 system has a simple on/off solenoid that will be run from one of my equipment outlets.

I would like to be able to:
Turn the co2 ON 30 mins before my lights come on.
Turn the co2 OFF 30 mins before lights off.
Use the PH controller to turn off the co2 if something goes wrong and the system decides to dump co2. So if ph goes below a preset level it turns the co2 off.

Is this a setup of 2 ph controllers off the same ph probe and a macro for ON and a Macro for OFF?

Yeah. I'm assuming light on and off time don't change thorugh the year?

"CO2 ON" Macro
  1. CO2 solenoid On
  2. wait 30 minutes
  3. CO2 Solenoid off
  4. ph controll ON
Timer triggers that 30minutes before Lights On

Reverse for "Off"

If I'm understanding correctly.
 
Last edited:
You can do reef-pi db update temperature 1 (assuming the if of the 10g temp controller is 1) to change the name. That should fix everything without database reset. Post reef-pi dB command , any such isssue can be fixed without resetting database ,

Good to know, I don't have a complicated setup I just re-created everything and it appears to be working now. I am getting spurious Temp sensor errors and I wasn't seeing these before.
Code:
Temperature sensor failure. Error:read /sys/bus/w1/devices/28-011938443c3c/w1_slave: interrupted system call

I did replace one sensor and remove the audio jacks to an jst-sm connector, the errors are random and I have seen error's on all three sensors, I assume something is not happy now and will need to figure out some way to approach it. If anyone has any suggestions on troubleshooting the 1-wire stuff let me know.

Thanks.
 
Good to know, I don't have a complicated setup I just re-created everything and it appears to be working now. I am getting spurious Temp sensor errors and I wasn't seeing these before.
Code:
Temperature sensor failure. Error:read /sys/bus/w1/devices/28-011938443c3c/w1_slave: interrupted system call

I did replace one sensor and remove the audio jacks to an jst-sm connector, the errors are random and I have seen error's on all three sensors, I assume something is not happy now and will need to figure out some way to approach it. If anyone has any suggestions on troubleshooting the 1-wire stuff let me know.

Thanks.
I am assuming all 3 temp sensors are wired more or less in a star type configuration?
Are you running a premade hat or anything or can u change the 4.7k resistor easily?
Depending on configuration, wiring lengths etc. Some people have had luck changing the 4.7k pullup resistor to a lower value, say 3k or 2.2k. Dont go below 1.5k on this.
If you wamt the geeky explanation on why this works let me know.
 
Yeah. I'm assuming light on and off time don't change thorugh the year?

"CO2 ON" Macro
  1. CO2 solenoid On
  2. wait 30 minutes
  3. CO2 Solenoid off
  4. ph controll ON
Timer triggers that 30minutes before Lights On

Reverse for "Off"

If I'm understanding correctly.
Thanks! That was my thought but hate to experiment on my working reef pi, as it has been quite stable for months. I really need to get a second one as a spare/experiment pi.
Macros can be quite powerful, I just have to play around a bit as you have, as an electician Im too used to ladder diagrams.
 
I am assuming all 3 temp sensors are wired more or less in a star type configuration?
Are you running a premade hat or anything or can u change the 4.7k resistor easily?
Depending on configuration, wiring lengths etc. Some people have had luck changing the 4.7k pullup resistor to a lower value, say 3k or 2.2k. Dont go below 1.5k on this.
If you wamt the geeky explanation on why this works let me know.

Yeah this is my original proto hat (star config) that I have had working for sometime but the SD card decided to go sideways. It was all working fine in the past but the three probe temps were all using the same length cable. I swapped one of the probes out with a longer cable unit and I also took the liberty of replacing the audio jacks with jst-xm connectors. I would assume I am using whatever resistor was called out in the temp guide, I did purchase a box of resistors so I can replace it with a different value, which one should I try first or most likely to work? I
 

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 14 56.0%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 11 44.0%
Back
Top
Home
Post thread…
Market
What's new