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

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
Yes, create two separate ph controller with specific setting and use a macro to turn one off, wait for few second and turn the other on. Make the two macros to turn them on/off at specific time. Then use two timers with those two target macros.
Let me know how it goes,,,

so something like this:
1590738530108.png

1590738555297.png

1590738585205.png

Sorry for the Dutch in there XD Dag = Day nacht : night.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
So i have another question... In a Paludarium i would need the humidity to be 70-80 during the day and 100 during the night...

So during the day i would set the humidity control with the PH settings : Upper treshold would activate a fan when i reach 80. Lower treshold wil deactivate the fan or wil activate a humidifier when it reach 70. hysteresis 2-3.. (i have to experiment with this)

But when the night fals i need to get other settings. to reach 100% humidity. How can i approach this? do i look at Macro's ?

*Edit* And by Temperature Control I mean your humidity control.

My first guess would be to use a Timer to trigger Macros which control set the desired Temperature Controls.

  1. Set up a "Day temp" Temperature Control
  2. Set up a "Night temp" Temperature Control using your settings above
  3. Create Macro "Day On" that fistly disables "Night Temp" and then enables "Day Temp"
  4. Create a Macro "Night On" that disables "Day Temp" and then enables "Night Temp"
  5. Create Timers to run "Night ON" and "Day On" Macros
Remember for Macros to be triggered by Timers, they must be written in reverse and "run in reverse" must be enabled.

Let mem know if that works - I think it should.
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
that interrupt error is rare but a possible scenario that can happen, when linux kernel intervenes the sensor file reading operations. The kernel does so due to the reading process taking longer than expected. Its rare, and we can add logic to check this and retry (which is recommended). But this is the first time im learning about this error. We never really write such failure handling logic (even in profession coding work), because most often it indicates something is not working correct, i.e. the kernel is getting busy in something else, or the sensor /device management system itself is encountering some issues. Keep us posted, im curious,
2020-05-29.png


There definitely seems to be sometning going on, but with no dates, it's difficult to tie int the alerts, but I will keep a watch on it.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I tried to reproduce this but was not able to. My equipment chart looks correct. Can you share you equipment tab and dashboard screenshot? If you think this is always happening, then please file a github bug with all the details.
I take it back. I just tested this again, and hit this bug. As i suspected earlier , this was due to the chart library upgrade. I have patched the code, it will not be exactly same as before . I am not able to get the exact old chart using the new version of the library, but its fairly similar. Thank you for letting us know, and apologies for the earlier false verification


https://github.com/reef-pi/reef-pi/pull/1157
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
*Edit* And by Temperature Control I mean your humidity control.

My first guess would be to use a Timer to trigger Macros which control set the desired Temperature Controls.

  1. Set up a "Day temp" Temperature Control
  2. Set up a "Night temp" Temperature Control using your settings above
  3. Create Macro "Day On" that fistly disables "Night Temp" and then enables "Day Temp"
  4. Create a Macro "Night On" that disables "Day Temp" and then enables "Night Temp"
  5. Create Timers to run "Night ON" and "Day On" Macros
Remember for Macros to be triggered by Timers, they must be written in reverse and "run in reverse" must be enabled.

Let mem know if that works - I think it should.
like this Humidity day night control:
1590742171639.png

1590742184540.png

MAcro's:
1590742239274.png

Timers set for day start at 8 AM night start at 6pm (18:00):
1590742337194.png


1590741981009.png
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
Add few seconds of sleep in between turn on/off of the two controller.
So not the solution like @Des Westcott ? If i need some time in betweezn i need 4 macro's and 4 timers :
1 macro : turn off day + 1 timer turn off day.
1 macro turn on night + 1 timer turn on day

1 macro turn off night + 1 timer turn off night;
1 macro turn on day + 1 timer turn on day.

The solution now includes on/off in 1 macro.
 

mr.salty

Active Member
View Badges
Joined
Apr 22, 2018
Messages
113
Reaction score
204
Rating - 0%
0   0   0
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?
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
So not the solution like @Des Westcott ? If i need some time in betweezn i need 4 macro's and 4 timers :
1 macro : turn off day + 1 timer turn off day.
1 macro turn on night + 1 timer turn on day

1 macro turn off night + 1 timer turn off night;
1 macro turn on day + 1 timer turn on day.

The solution now includes on/off in 1 macro.

You could quite easily add a minute wait in the "Day on" and "Night On" Macros
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
like this Humidity day night control:
1590742171639.png

1590742184540.png

MAcro's:
1590742239274.png

Timers set for day start at 8 AM night start at 6pm (18:00):
1590742337194.png


1590741981009.png

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
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
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?

I think you have run out of power to control the relays. Have a look at using a ULN2308 with external power supply to power the relays.


Post 4803
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Sorry for the Dutch in there XD Dag = Day nacht : night.

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! ;)
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
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
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
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
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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 ?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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” ?
 

mr.salty

Active Member
View Badges
Joined
Apr 22, 2018
Messages
113
Reaction score
204
Rating - 0%
0   0   0
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?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
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.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
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.
 

Clear reef vision: How do you clean the inside of the glass on your aquarium?

  • Razor blade

    Votes: 162 61.6%
  • Plastic scraper

    Votes: 69 26.2%
  • Clean-up crew

    Votes: 91 34.6%
  • Magic eraser

    Votes: 45 17.1%
  • Other

    Votes: 69 26.2%
Back
Top