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

Coolhack

Community Member
View Badges
Joined
Jul 21, 2019
Messages
80
Reaction score
50
Location
Anywhere
Rating - 0%
0   0   0
It’s a grafana dashboard and not reef-pi. For this you have to setup Prometheus for metric storage , and configure reef-pi to emit Prometheus metrics. Then install grafana (dashboard software) and configure it to use Prometheus for data, and then you can do any type of charts in any color , size etc
Is there a tutorial on how to do that?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is there a tutorial on how to do that?
Just search for how to “how to install grafana /Prometheus on pi” and that should lead to loads of tutorials. Once installed, configure grafana to use Prometheus and configure Prometheus to scrape metrics from reef-pi.
Let us know when you are done with the installations , I can walk through the step for last part (Prometheus -reef pi configuration )
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Something to remember these tools (grafana /Prometheus) can take up significant resources and I don’t recommend running them on the same pi where reef-pi is running.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
With 4.0 we have shipped a long running asynchronous job runner , something that allows us to do reef-pi upgrades from ui. I am hoping we can reuse that system to add features like this (let users install grafana /Prometheus from reef-pi ui itself)
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
Something to remember these tools (grafana /Prometheus) can take up significant resources and I don’t recommend running them on the same pi where reef-pi is running.
@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. :(
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
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,848
Reaction score
17,081
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,848
Reaction score
17,081
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
66
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,848
Reaction score
17,081
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
66
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:

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top