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,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
What is Prometheus, and how are people using different UI?
Prometheus is a metrics database. The different UI is the other software called grafana. Grafana is a metrics charting. Together they can fetch all metrics from reef-pi and allows you to chart any way you want for almost any duration. Both of these two software are probably world's most popular open-source solutions in their respective category and are much larger projects.
These software are not for general (non-computer related) audience. Charting will require users to know the specific type of queries etc. But since our use case is very specific (reef-pi) and we have several of us who knows it I think if any of you want to give it a try , we can help navigate through it.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib Ah! I installed them on my Pi 3b+ where I'm running Reef-Pi. Enabled Prometheus in settings and now the UI will not load, just shows "Loading" in the browser. :(
can you try accessing the ui from private/incognito mode?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I’ve been playing with different type of backup power sources for reef-pi this year. Due to climate change and california Wilde fire season , I think every year we’ll have more sever and frequent power outages for foreseeable feature.
i benchmarked a bunch of powerbank , mobile charger etc in the past. They are not bad , can run just the pi along with sensors etc for almost two to three days .

last week , i was thinking why not try out the Ryobi batteries ? I have a handful of those , since I use a whole bunch of Ryobi tools , from lead blower to trim router that runs on them. I have almost 8 batteries and some of them are 4/6 ah should be pretty good.
So I started testing. I have one of these Ryobi light that uses non-led/filament style bulb and the bulb was broken. I didn’t like this light , and got a different led light (ryobi), hence This is perfect for all experiments. I am using it for battery connections (could be easily changed with a 3D printer alternative). I have hooked up an lm2596 converter to step down the 18v coming from battery to 5.21 v.
Results; reef-pi on pi zero without anything else runs almost 2 days with the 3ah batteries . I’m planing to test test out the 6ah batteries next. I’ll be super delighted if they run for several days.
btw, there 3.2 or 5v submersible pump and air stones that could also be used with similar setup. in real life cases I am likely to run both controller as well as pump/air stone..
D1297753-4B1E-47A4-9563-F9504270715B.jpeg


98C55168-A445-42B0-B74F-B1C67376C183.jpeg
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
65
Location
Dover, NH
Rating - 0%
0   0   0
can you try accessing the ui from private/incognito mode?
Tried it and browser returned: site refused the connection. Second time this has happened when I enabled Prometheus, first on 3.5 and this time on 4.0. wondering if there is a way to disable Prometheus through the CLI and see if that fixes it.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Tried it and browser returned: site refused the connection. Second time this has happened when I enabled Prometheus, first on 3.5 and this time on 4.0. wondering if there is a way to disable Prometheus through the CLI and see if that fixes it.
What does the log says? Looks like reef-pi is not running. This can not be related to Prometheus option. Check the logs , it should show if reef-pi running or not, and if it’s failing , why .
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
65
Location
Dover, NH
Rating - 0%
0   0   0
What does the log says? Looks like reef-pi is not running. This can not be related to Prometheus option. Check the logs , it should show if reef-pi running or not, and if it’s failing , why .
Oops! should have thought of that... Looks like there's a bunch of Prometheus/Git related stuff at the bottom of the log and the reef-pi.service exited. log attached
What does the log says? Looks like reef-pi is not running. This can not be related to Prometheus option. Check the logs , it should show if reef-pi running or not, and if it’s failing , why .
@Ranjib

, not sure if the log attached so here's the last entries:
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: goroutine 1 [running]:
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x153d340, 0x1584e00, 0x1, 0x1)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:401 +0x80
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge(0x7a4ed0, 0x153d340, 0x0, 0x0, 0x0, 0x0, 0x158bda0, 0x20, 0x159f170, 0x2c, ...)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xc0
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/reef-pi/reef-pi/controller/telemetry.(*telemetry).EmitMetric(0x15ca000, 0x6ae08d, 0x9, 0x158bd20, 0x16, 0x0, 0x0)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/telemetry/telemetry.go:194 +0x528
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).updateOutlet(0x140a7a0, 0xba7f17, 0x1, 0x14268c0, 0x10, 0xba7f17, 0x1, 0x0, 0x0, 0x0)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:83 +0xe0
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).Start(0x140a7a0)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:37 +0xa8
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).loadSubsystems(0x1474100, 0x0, 0x0)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/loader.go:193 +0x5fc
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).Start(0x1474100, 0x3, 0x158a500)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:68 +0x74
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: main.daemonize(0x158a500, 0x1b)
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:19 +0xa4
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: main.main()
Dec 12 17:00:13 reef-pi65 reef-pi[1517]: /home/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:125 +0x240
Dec 12 17:00:13 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 12 17:00:13 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I’ve been playing with different type of backup power sources for reef-pi this year. Due to climate change and california Wilde fire season , I think every year we’ll have more sever and frequent power outages for foreseeable feature.
i benchmarked a bunch of powerbank , mobile charger etc in the past. They are not bad , can run just the pi along with sensors etc for almost two to three days .

last week , i was thinking why not try out the Ryobi batteries ? I have a handful of those , since I use a whole bunch of Ryobi tools , from lead blower to trim router that runs on them. I have almost 8 batteries and some of them are 4/6 ah should be pretty good.
So I started testing. I have one of these Ryobi light that uses non-led/filament style bulb and the bulb was broken. I didn’t like this light , and got a different led light (ryobi), hence This is perfect for all experiments. I am using it for battery connections (could be easily changed with a 3D printer alternative). I have hooked up an lm2596 converter to step down the 18v coming from battery to 5.21 v.
Results; reef-pi on pi zero without anything else runs almost 2 days with the 3ah batteries . I’m planing to test test out the 6ah batteries next. I’ll be super delighted if they run for several days.
btw, there 3.2 or 5v submersible pump and air stones that could also be used with similar setup. in real life cases I am likely to run both controller as well as pump/air stone..
D1297753-4B1E-47A4-9563-F9504270715B.jpeg


98C55168-A445-42B0-B74F-B1C67376C183.jpeg
Yeah I had a power outage the other day, we don't have them often but makes you think about getting a better backup plan. I saw where @Bigtrout was out for sometime, the problem I have is if it's in the summer I can run a long time on my UPS batteries, I have 2 1400VA APC that I have on my work bench that I can move and power things. But if it happens when its winter I have to run my heaters and even though it's only a 100w it chews through the batteries at a much faster clip. Need to come up with something that I can run my return pump and heater for a long period of time, but all the options I come up with are not cheap. :(
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Added a PH y probe this evening, what is everyone running for the check frequency for PH, 60secs or something else?

Thanks :)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Added a PH y probe this evening, what is everyone running for the check frequency for PH, 60secs or something else?

Thanks :)
I run it at at 60s interval. I don’t see any implications even if I run at 300s interval.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I run it at at 60s interval. I don’t see any implications even if I run at 300s interval.
Thanks for the reply, thats what I went with and so far this probe appears to be working much better than my last one, hopefully its a keeper.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Mine checks every 320 seconds (5 minutes). Previously I had it check every 60 seconds but I don't really see the need.
My only concern about the frequency is I am wanting to use it as a failsafe for my Kalk doser, if PH rises over 8.4 (or whatever I have set) I want it to turn of the doser (in case it never turns off etc) and notifiy me. I have a lot to play with in regards to Kalk dosing so not sure how much dose will raise the PH in a given time. Once I see how it normally acts then I may be able to extend the frequency check.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Now that I look at it, is it possible to turn off a doser (not an outlet but a 4 head dosing pump via @Michael Lane dosing module based on a PH reading? I could have sworn I have read that you can do that but right now I'm not sure I see how it can be done.

Thanks :)

Update, looks like the PH can control equipment and a macro which then with the macro I could disable the doser, are there any issues with doing it that way?

Thanks a second time :)
 
Last edited:

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Now that I look at it, is it possible to turn off a doser (not an outlet but a 4 head dosing pump via @Michael Lane dosing module based on a PH reading? I could have sworn I have read that you can do that but right now I'm not sure I see how it can be done.

Thanks :)
If that's run via the dosing pump menu of reef-pi, then you can turn on and off individual dosing channels with macros. When creating a macro select doser, then the channel you want, then whether to turn it on or off. And then use that macro as a response to the ph reading.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
If that's run via the dosing pump menu of reef-pi, then you can turn on and off individual dosing channels with macros. When creating a macro select doser, then the channel you want, then whether to turn it on or off. And then use that macro as a response to the ph reading.
Yup just saw it when looked at it again, the only downside I see for me using 3.x version is that it requires you to have a low side function also. I'n my case I just want to protect from High PH when dosing Kalk and really do not need a low side function since it will already alert me if its low or high. To solve that issue I just created a dummy macro with a wait input and assigned that, need to do some more testing but think that should work. I know Kalk is very concentrated but not sure if adding 10ml and hour will cause the PH to do much but with a probe I at least can watch and make sure that it plays nice.

:)
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Glad I could help confuse you. :D
I'll update my build thread with MQTT info when I update my reef-pi installations.
Hey @Ranjib I'm trying to setup MQTT and getting the following error

Code:
{"error":"json: cannot unmarshal string into Go struct field MQTTConfig.mqtt.retained of type bool"} | HTTP 400

Any clues?
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Hey @Ranjib I'm trying to setup MQTT and getting the following error

Code:
{"error":"json: cannot unmarshal string into Go struct field MQTTConfig.mqtt.retained of type bool"} | HTTP 400

Any clues?
For anyone else getting this, the trick is to enable prometheus, save config, reload, refresh, THEN add mqtt details in the telemetry tab. I think it was trying to add parameters before it set them up.

For reference here are some of the topics i am getting - note that they are using the "name" convention and not the api convention:

- "ato_float_sensor_state"
- "equipment_dummy_ato_state"
- "ato_float_sensor_usage"
- "ato_ato_float_state"
- "ato_ato_float_usage"
- "kessil_brightness"
- "kessil_color"
- "refugium_light_refugium_brightness"
- "system_load"
- "system_mem_used"
- "system_under_voltage"
- "water_temperature_reading"

@Ranjib is there a way to add a prefix to this so I can get feeds from both of my reef-pi installations and tell them apart? ie: "tank1/water_temperature_reading", "tank2/water_temperature_reading"

Also, are there plans to receive commands through MQTT? I don't see any equipment ON/OFF options showing up.
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Hmm I have a master pump for Jebao, but I am comfortable w/ electronics to bypass the control module in it. Thanks for


Hmm I have a master pump for Jebao, but I am comfortable w/ electronics to bypass the control module in it. How are you powering them individually though?

I DIY'd one of these in disussion with Mike. Made more sense than shipping and customs to get one to SA.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Back
Top