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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
All right - been testing this and I now have a better understanding of how this is working.

As a test, I have set up the following :
  • a momentary switch to imitate a float switch - set up as an input.
  • a light set up on an outlet
  • Created a macro that has one step - turn on light
  • Create an ATO with one second check frequency
  • Set the ATO to control the Macro described above
Working findings
  • If I press and hold the button (simulating the float switch opening) the light comes on and stays on.
  • When I release the button (simulating the float switch closing), the light goes off
  • If I press the button for 1 second and release, the light comes on for one second and then goes off again.
  • If I enable One Shot and press and release the button, the light comes on and stays on, but then the ATO is disabled afterwards
Now, I altered the Macro to add the steps to turn on, wait 1sec, turn off, wait 1 sec and turn on. Then activate the ATO on and the light turns on and off repeatedly (1 sec frequency) regardless of the state of the button / switch until I de-activate the ATO. When de-activating the ATO, the light finishes the Macro cycle. If the ATO is left on longer, it takes longer to "normalise" ie reef-pi is counting the activation cycles of the ATO and is trying to run the Macro that number of times.

Next I tried to create a Macro that first de-activated ATO, then did the light steps and then re-activated the ATO. This just confused it completely and made the ATO uncontrollable. I had to delete the ATO because I couldn't change it's state to off despite a re-start on Reef-Pi.

But I can see how using the doser as described has worked.

I'm going to keep testing a few things, but as far as getting the status of an ATO to trigger a multi-step Macro - that's still a no.
The behavior you noted is exactly what expected. The only thing I’ll add is a spst /latching switch is better way to simulate float sensor than momentary switches, since reef-pi polls for change at best 1s interval, which is not instantaneous, like a momentary switch (immediate on /off )
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
A bit of googling turned up ina219 and ina3221, single and triple channel current/voltage sensing chips that have i2c capability and exist as breakout boards that aren't all too expensive.

Haven't looked at all the details yet though, maybe there's better ones for the price.

Those would provide a nice graph which equipment is running when though.
I do that with Kasa smart plugs. They are useful only for initial validation and to establish the usage pattern, afterwards they are kinda predictable and repetitive. They should be useful in detecting when equipment is found bad (like light for example ), but it’s limited
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So far I have not gotten any PH probes to be consistent, about to send another one back, its like they all start to lose the calibrations settings and drift. I may try one more but starting to think about not having PH monitored which with dosing kalk I kind of wanted.
Are you saying you were not even able to get to stable diurnal cycle ??
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I'll vote for purging the graph data too... Also, I don't seem to be able to change the graph colors in the Dashboard. Maybe it's just me.
Is this with 4.1 ? Can you give some specifics, like which chart etc, if I can reproduce it I can fix it quickly
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
Are you saying you were not even able to get to stable diurnal cycle ??
No thats not the issue, I know they cycle, although I run my sump light during the night but I just can't get a PH probe to hold calibration. I calibrate and over time they start to drift, the latest one I am using yesterday started jumped up yesterday and today reporting over 8.4 to 8.5. This is the second time, I re-calibrate it and it runs fine and starts doing the same thing, I'm pretty sure my PH is not 8.4, I have a handheld tester and it reads 8.0 which is probably closer than the 8.4. I've had others where they spike etc, I just cant get them to be consistent for long periods of time, I'm using one of @Michael Lane PH module, its well made but just haven't had much luck with the ones I have tried.
:)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
No thats not the issue, I know they cycle, although I run my sump light during the night but I just can't get a PH probe to hold calibration. I calibrate and over time they start to drift, the latest one I am using yesterday started jumped up yesterday and today reporting over 8.4 to 8.5. This is the second time, I re-calibrate it and it runs fine and starts doing the same thing, I'm pretty sure my PH is not 8.4, I have a handheld tester and it reads 8.0 which is probably closer than the 8.4. I've had others where they spike etc, I just cant get them to be consistent for long periods of time, I'm using one of @Michael Lane PH module, its well made but just haven't had much luck with the ones I have tried.
:)
Got it, that’s unfortunate. If the sensor reading itself is skewing then it’s beyond reef-pi software , something we have to address in the tank or sensor side. If we do spot any software induced issue , such as this one (sensor value or control loop ) that is definitely a top priority bug fixing from my perspective.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
Got it, that’s unfortunate. If the sensor reading itself is skewing then it’s beyond reef-pi software , something we have to address in the tank or sensor side. If we do spot any software induced issue , such as this one (sensor value or control loop ) that is definitely a top priority bug fixing from my perspective.
No it's not your software it's my setup, hardware, something either I have had back luck with probes or placement or the PH module. This one ran for a couple weeks and started reading higher, I re calibrated and it held and now is doing the same thing, pretty sure if I placed it in some calibration solution it would be about .3-.4 high, so it's the only thing that I have not been able to get stable or maybe my dino's are getting to it. ;)
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
what brand/model did you buy? (See if others have good results with the same probe) Is anything growing on the probe? (I’ve seen drift when something was growing on it). Does turning anything on or off make a sudden change? ( I had electrical interference from a light cause bad readings). When I don’t have a special cause I would say my calibration holds for about 6 months or so.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
what brand/model did you buy? (See if others have good results with the same probe) Is anything growing on the probe? (I’ve seen drift when something was growing on it). Does turning anything on or off make a sudden change? ( I had electrical interference from a light cause bad readings). When I don’t have a special cause I would say my calibration holds for about 6 months or so.
The one I have now is a bluelab probe, worked for a couple weeks and skewed high and I re-calibrated it and its now doing the same thing. I can't put my finger on it, I've moved it around in my sump and nothing seems to make a difference. Like I said I can calibrate it and it will be fine and at some point it starts to drift. I've cleaned it off but doesn't seem to make a difference.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
645
Reaction score
1,034
Location
Durban - South Africa
Rating - 0%
0   0   0
Not sure why, but last night for the second night in a row, I lost all 3 of my temp sensors. All at the same time. Last night at 02H30 and the previous night at 00h00.


Jan 20 07:32:22
temperature sub-system. Failed to read sensor Tank Temperature. Error:eek:pen /sys/bus/w1/devices/28-01193ae00410/w1_slave: no such file or directory

Jan 20 07:32:22
temperature sub-system. Failed to read sensor Chiller Outlet. Error:eek:pen /sys/bus/w1/devices/28-01193b185be6/w1_slave: no such file or directory

Jan 20 07:31:52
temperature sub-system. Failed to read sensor Room Temperature. Error:eek:pen /sys/bus/w1/devices/28-37af8f1d64ff/w1_slave: no such file or directory

I wonder what could cause that. 07H32 is now when I discovered it.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,493
Reaction score
1,484
Rating - 0%
0   0   0
I do that with Kasa smart plugs. They are useful only for initial validation and to establish the usage pattern, afterwards they are kinda predictable and repetitive. They should be useful in detecting when equipment is found bad (like light for example ), but it’s limited
No i mean for low voltage stuff. Like mostly dosing pumps controlled by reefpi. Or 24V equipment. And yeah only for validation /catching things that run when they shouldn't /don't run when they should, or suddenly draw more or less amps.

But I looked a bit more and the combination acs712+ads1115 or other arduino based ones+ads1115 should also work and not need any extra drivers

On that note, if I remember correctly, a long time back there was talk about communication between several reef-pis or reefpi and arduino, anything ever come of that?

And I would love to get kasa bars, they don't make those for EU :/ and individual hs110 plugs would be super expensive and way too bulky to get 10 or 20 of
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,384
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Is this with 4.1 ? Can you give some specifics, like which chart etc, if I can reproduce it I can fix it quickly

4.1..

Temp range holds, but the color of the chart does not change.

1611139534942.png



1611139623033.png
1611139578944.png
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
Is this with 4.1 ? Can you give some specifics, like which chart etc, if I can reproduce it I can fix it quickly
@Ranjib Yes, it is with 4.1 I have a number of charts setup and it is possible to change the chart color on for lights and PH. Unable to change color on Temp charts. On a side note and maybe a couple of things to think about for the future is maybe having the ability to change colors on the CPU/Memory chart. I have a challenge seeing the yellow on white background. And the ability to create more than one equipment chart. I currently have a 2 column by 6 row dashboard and my equipment chart has 14 items on it and it's tough to get the equipment names small enough that they all show up. So, maybe the ability to device the equipment onto 2 charts.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
reef-pi serves all prometheus data under /x/metrics endpoint. Just add that in your web browser (after reef-pi IP) and you should see all the data in plain text file.
Inside prometheus (or grafana), you'll have job tag with specific name you have configured prometheus (to scrape metrics from reef-pi), that can be used to see the metrics available.
@Ranjib

I also tried this and got a blank page
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
@Ranjib

I also tried this and got a blank page
You have to enable prometheus under the configuration tab and reload things then you should see the metrics. I was going to mention if your able to have another pi, vm etc prometheus/grafana is really the way to do the charts and you can slice and dice any way you want.

:)
prom.png
 
Last edited:

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
Here is a nice overview - prometheus/grafana

I am about to set up a new instance and will take better notes and upload them if anyone cares...:)
I have Prometheus/Grafana running on an x86 system. I enabled Prometheus in the settings tab but forgot to hit the "Reload" in the admin tab. Hit the reload and now the Reef-pi is not responding and it looks like it crashed. This happened the last time I was trying to get to grips with Prometheus.
@Ranjib

Not sure but it looks like the Reef-Pi's IP address was reset to zero's
pi@reef-pi65:~ $ reef-pi
2021/01/20 15:07:24 driver-subsystem: registering driver id: rpi Name: Raspberry Pi
2021/01/20 15:07:24 Successfully started subsystem: macro
2021/01/20 15:07:24 Successfully started subsystem: timers
2021/01/20 15:07:25 Successfully started subsystem: system
2021/01/20 15:07:25 INFO: equipment subsystem: Finished syncing all equipment
2021/01/20 15:07:25 Successfully started subsystem: equipment
2021/01/20 15:07:25 Successfully started subsystem: ato
2021/01/20 15:07:25 Successfully started subsystem: temperature
2021/01/20 15:07:25 reef-pi is up and running
2021/01/20 15:07:25 Starting http server at: 0.0.0.0:80
2021/01/20 15:07:25 Starting health checker
2021/01/20 15:07:25 ERROR: Failed to run http server. Error: listen tcp 0.0.0.0:80: bind: permission denied
Methods: [GET]
2021/01/20 15:07:25 API Doc path: /api/settings
^C2021/01/20 15:08:13 Successfully unloaded system subsystem:
2021/01/20 15:08:13 Successfully unloaded equipment subsystem:
2021/01/20 15:08:13 Successfully unloaded ato subsystem:
2021/01/20 15:08:13 Successfully unloaded temperature subsystem:
2021/01/20 15:08:13 Successfully unloaded macro subsystem:
2021/01/20 15:08:13 Successfully unloaded timers subsystem:
2021/01/20 15:08:13 Stopping health checker
2021/01/20 15:08:13 reef-pi is shutting down
pi@reef-pi65:~ $
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
I have Prometheus/Grafana running on an x86 system. I enabled Prometheus in the settings tab but forgot to hit the "Reload" in the admin tab. Hit the reload and now the Reef-pi is not responding and it looks like it crashed. This happened the last time I was trying to get to grips with Prometheus.
@Ranjib

Not sure but it looks like the Reef-Pi's IP address was reset to zero's
pi@reef-pi65:~ $ reef-pi
2021/01/20 15:07:24 driver-subsystem: registering driver id: rpi Name: Raspberry Pi
2021/01/20 15:07:24 Successfully started subsystem: macro
2021/01/20 15:07:24 Successfully started subsystem: timers
2021/01/20 15:07:25 Successfully started subsystem: system
2021/01/20 15:07:25 INFO: equipment subsystem: Finished syncing all equipment
2021/01/20 15:07:25 Successfully started subsystem: equipment
2021/01/20 15:07:25 Successfully started subsystem: ato
2021/01/20 15:07:25 Successfully started subsystem: temperature
2021/01/20 15:07:25 reef-pi is up and running
2021/01/20 15:07:25 Starting http server at: 0.0.0.0:80
2021/01/20 15:07:25 Starting health checker
2021/01/20 15:07:25 ERROR: Failed to run http server. Error: listen tcp 0.0.0.0:80: bind: permission denied
Methods: [GET]
2021/01/20 15:07:25 API Doc path: /api/settings
^C2021/01/20 15:08:13 Successfully unloaded system subsystem:
2021/01/20 15:08:13 Successfully unloaded equipment subsystem:
2021/01/20 15:08:13 Successfully unloaded ato subsystem:
2021/01/20 15:08:13 Successfully unloaded temperature subsystem:
2021/01/20 15:08:13 Successfully unloaded macro subsystem:
2021/01/20 15:08:13 Successfully unloaded timers subsystem:
2021/01/20 15:08:13 Stopping health checker
2021/01/20 15:08:13 reef-pi is shutting down
pi@reef-pi65:~ $
Which version are you using, I'm still on an old version and did not have that issue, here is what my configuration screen looks like:

prom.png


:)
 
Back
Top