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

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.
 
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
 
@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:
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:
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


:)
 
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.

Do they stay stuck? Or is it a transient glitch?

1W is not going to give you guarantees, and it looks like a probe probably held the bus when it shouldn't have. The biggest risk is a probe remaining in that state, when it takes a power cycle to fix it. There is nothing to prevent that condition, especially with all the clone probes. While its not possible in stock reef-pi, putting the pull-up and the power on a switchable port, which resets the bus if it fails, is something that could be scripted on the Pi and only costs one GPIO and one P-channel FET.
 
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

I'm working on a stack which uses a simple USB Serial (and CAN) protocol to extend to other devices off board, but it will currently require all interfacing to happen with the Reef-Pi File driver (it presents a bunch of virtual files on a disk for what it sees attached). More on that soon.

I think there is still value in having a Reef-Pi remote read function, so one could read and use the channels of another Reef-Pi. Not a lot of code to set that up, if you're familiar enough with Go.
 
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:~ $
You are starting reef-pi directly as normal user , and by invoking the command directly hence it’s not able to run (permission failure). You have to use the systemctl command to start it , as a service. Please consult the troubleshooting page
 
You are starting reef-pi directly as normal user , and by invoking the command directly hence it’s not able to run (permission failure). You have to use the systemctl command to start it , as a service. Please consult the troubleshooting page
@Ranjib

Yes, I realized that and restarted reef-pi correctly.

According the the log reef-pi starts normally and exits with status=2/INVALIDARGUMENT

Here are the last few log entries:
Jan 21 08:02:22 reef-pi65 reef-pi[974]: goroutine 1 [running]:
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x193f340, 0x180ecd8, 0x1, 0x1)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:403 +0x80
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge(0x7aaff0, 0x193f340, 0x0, 0x0, 0x0, 0x0, 0x1829fc0, 0x1b, 0x182ce40, 0x27, ...)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xc0
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/telemetry.(*telemetry).EmitMetric(0x18f2dc0, 0x6b03ad, 0x9, 0x1829f40, 0x11, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/telemetry/telemetry.go:189 +0x510
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).updateOutlet(0x19908e0, 0xbb806f, 0x1, 0x1992630, 0xb, 0xbb806f, 0x1, 0x0, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:83 +0xd8
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).Start(0x19908e0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:37 +0xa8
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).loadSubsystems(0x19ae280, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/loader.go:193 +0x5fc
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).Start(0x19ae280, 0x3, 0x18b9300)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:68 +0x74
Jan 21 08:02:22 reef-pi65 reef-pi[974]: main.daemonize(0x18b9300, 0x1b)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:19 +0xa4
Jan 21 08:02:22 reef-pi65 reef-pi[974]: main.main()
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:125 +0x240
Jan 21 08:02:22 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 08:02:22 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
lines 128-187/187 (END)
 
@Ranjib

Yes, I realized that and restarted reef-pi correctly.

According the the log reef-pi starts normally and exits with status=2/INVALIDARGUMENT

Here are the last few log entries:
Jan 21 08:02:22 reef-pi65 reef-pi[974]: goroutine 1 [running]:
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x193f340, 0x180ecd8, 0x1, 0x1)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:403 +0x80
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge(0x7aaff0, 0x193f340, 0x0, 0x0, 0x0, 0x0, 0x1829fc0, 0x1b, 0x182ce40, 0x27, ...)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xc0
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/telemetry.(*telemetry).EmitMetric(0x18f2dc0, 0x6b03ad, 0x9, 0x1829f40, 0x11, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/telemetry/telemetry.go:189 +0x510
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).updateOutlet(0x19908e0, 0xbb806f, 0x1, 0x1992630, 0xb, 0xbb806f, 0x1, 0x0, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:83 +0xd8
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).Start(0x19908e0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:37 +0xa8
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).loadSubsystems(0x19ae280, 0x0, 0x0)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/loader.go:193 +0x5fc
Jan 21 08:02:22 reef-pi65 reef-pi[974]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).Start(0x19ae280, 0x3, 0x18b9300)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:68 +0x74
Jan 21 08:02:22 reef-pi65 reef-pi[974]: main.daemonize(0x18b9300, 0x1b)
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:19 +0xa4
Jan 21 08:02:22 reef-pi65 reef-pi[974]: main.main()
Jan 21 08:02:22 reef-pi65 reef-pi[974]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:125 +0x240
Jan 21 08:02:22 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 08:02:22 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
lines 128-187/187 (END)
Whats does the output from these look like after it happens, with journalctl substitute the time window
Code:
journalctl -u reef-pi.service --since "2021-01-21 08:48:00"
sudo systemctl status reef-pi.service

Lets see if that provides additional clues...

:)
 
Whats does the output from these look like after it happens, with journalctl substitute the time window
Code:
journalctl -u reef-pi.service --since "2021-01-21 08:48:00"
sudo systemctl status reef-pi.service

Lets see if that provides additional clues...

:)
Thanks Tom

Here's the output from journalctl since I last started reef-pi

Jan 21 10:45:35 reef-pi65 systemd[1]: Started raspberry pi based reef tank controller.
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: rpi Name: Raspberry Pi
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: 1 Name: PWM
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: 2 Name: PH-Board
Jan 21 10:45:37 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:37 driver-subsystem: registering driver id: 4 Name: HS300-1
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 driver-subsystem: registering driver id: 5 Name: HS300-2
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 Successfully started subsystem: ato
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 Successfully started subsystem: temperature
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: doser
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: phprobes
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: macro
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-return-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-empty-state Error: {"error":"not found - API documentation can be found at https://io.adaf
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-fill-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-cric-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-heat-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-ev-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-ato-fill-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-wave-l-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-wave-r-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-heat1-state Error: {"error":"not found - API documentation can be found at https://io.adafruit
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-heat2-state Error: {"error":"not found - API documentation can be found at https://io.adafruit
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-skimmer-state Error: {"error":"not found - API documentation can be found at https://io.adafru
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: panic: descriptor Desc{fqName: "equipment_fans/cooler_state", help: "Module:equipment Item:Fans/Cooler-state", constLabels: {}, variableLabels: []} is invalid: "equipment_fans/cooler_state" is not
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: goroutine 1 [running]:
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x1d3f340, 0x208a760, 0x1, 0x1)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:403 +0x80
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge(0x7aaff0, 0x1d3f340, 0x0, 0x0, 0x0, 0x0, 0x1c29ae0, 0x1b, 0x1f0ccc0, 0x27, ...)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xc0
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/telemetry.(*telemetry).EmitMetric(0x1e24000, 0x6b03ad, 0x9, 0x1c29a60, 0x11, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/telemetry/telemetry.go:189 +0x510
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).updateOutlet(0x1c0bf60, 0xbb806f, 0x1, 0x1fb6350, 0xb, 0xbb806f, 0x1, 0x0, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:83 +0xd8
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).Start(0x1c0bf60)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:37 +0xa8
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).loadSubsystems(0x1e0e680, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/loader.go:193 +0x5fc
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).Start(0x1e0e680, 0x3, 0x1c28840)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:68 +0x74
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: main.daemonize(0x1c28840, 0x1b)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:19 +0xa4
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: main.main()
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:125 +0x240
Jan 21 10:45:41 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 10:45:41 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.

Output from reef-pi service status

pi@reef-pi65:~ $ sudo systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2021-01-21 10:47:17 EST; 1min 17s ago
Process: 5386 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yaml (code=exited, status=2)
Main PID: 5386 (code=exited, status=2)

Jan 21 10:47:17 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 10:47:17 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
pi@reef-pi65:~ $

I opened config.yaml and it contains the following:

---
database: /var/lib/reef-pi/reef-pi.db

Looks correct to me...
 
Thanks Tom

Here's the output from journalctl since I last started reef-pi

Jan 21 10:45:35 reef-pi65 systemd[1]: Started raspberry pi based reef tank controller.
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: rpi Name: Raspberry Pi
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: 1 Name: PWM
Jan 21 10:45:35 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:35 driver-subsystem: registering driver id: 2 Name: PH-Board
Jan 21 10:45:37 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:37 driver-subsystem: registering driver id: 4 Name: HS300-1
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 driver-subsystem: registering driver id: 5 Name: HS300-2
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 Successfully started subsystem: ato
Jan 21 10:45:39 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:39 Successfully started subsystem: temperature
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: doser
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: phprobes
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 Successfully started subsystem: macro
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-return-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-empty-state Error: {"error":"not found - API documentation can be found at https://io.adaf
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-fill-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-cric-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:40 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:40 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-heat-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-awc-ev-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-ato-fill-state Error: {"error":"not found - API documentation can be found at https://io.adafr
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-wave-l-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-wave-r-state Error: {"error":"not found - API documentation can be found at https://io.adafrui
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-heat1-state Error: {"error":"not found - API documentation can be found at https://io.adafruit
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-heat2-state Error: {"error":"not found - API documentation can be found at https://io.adafruit
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: 2021/01/21 10:45:41 ERROR: Failed to submit data to adafruit.io. User: Slartybuckfast Feed: equipment-skimmer-state Error: {"error":"not found - API documentation can be found at https://io.adafru
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: panic: descriptor Desc{fqName: "equipment_fans/cooler_state", help: "Module:equipment Item:Fans/Cooler-state", constLabels: {}, variableLabels: []} is invalid: "equipment_fans/cooler_state" is not
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: goroutine 1 [running]:
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x1d3f340, 0x208a760, 0x1, 0x1)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:403 +0x80
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGauge(0x7aaff0, 0x1d3f340, 0x0, 0x0, 0x0, 0x0, 0x1c29ae0, 0x1b, 0x1f0ccc0, 0x27, ...)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:297 +0xc0
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/prometheus/client_golang/prometheus/promauto.NewGauge(...)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:191
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/telemetry.(*telemetry).EmitMetric(0x1e24000, 0x6b03ad, 0x9, 0x1c29a60, 0x11, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/telemetry/telemetry.go:189 +0x510
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).updateOutlet(0x1c0bf60, 0xbb806f, 0x1, 0x1fb6350, 0xb, 0xbb806f, 0x1, 0x0, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:83 +0xd8
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/modules/equipment.(*Controller).Start(0x1c0bf60)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/modules/equipment/controller.go:37 +0xa8
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).loadSubsystems(0x1e0e680, 0x0, 0x0)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/loader.go:193 +0x5fc
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: github.com/reef-pi/reef-pi/controller/daemon.(*ReefPi).Start(0x1e0e680, 0x3, 0x1c28840)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:68 +0x74
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: main.daemonize(0x1c28840, 0x1b)
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:19 +0xa4
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: main.main()
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:125 +0x240
Jan 21 10:45:41 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 10:45:41 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.

Output from reef-pi service status

pi@reef-pi65:~ $ sudo systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2021-01-21 10:47:17 EST; 1min 17s ago
Process: 5386 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yaml (code=exited, status=2)
Main PID: 5386 (code=exited, status=2)

Jan 21 10:47:17 reef-pi65 systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 21 10:47:17 reef-pi65 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
pi@reef-pi65:~ $

I opened config.yaml and it contains the following:

---
database: /var/lib/reef-pi/reef-pi.db

Looks correct to me...
Yeah for now lets turn off the adafruit stuff, lots of noise, I think this line is what we want to look at:
Code:
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: panic: descriptor Desc{fqName: "equipment_fans/cooler_state", help: "Module:equipment Item:Fans/Cooler-state", constLabels: {}, variableLabels: []} is invalid: "equipment_fans/cooler_state" is not

I think you might want to look at the name and try it without the / just see if that makes any difference. Something about the name is giving it problems from the looks of it.
:)
 
Last edited:
Yeah for now lets turn off the adafruit stuff, lots of noise, I think this line is what we want to look at:
Code:
Jan 21 10:45:41 reef-pi65 reef-pi[5369]: panic: descriptor Desc{fqName: "equipment_fans/cooler_state", help: "Module:equipment Item:Fans/Cooler-state", constLabels: {}, variableLabels: []} is invalid: "equipment_fans/cooler_state" is not

I think you might want to look at the name and try it without the / just see if that makes any difference. Something about the name is giving it problems from the looks of it.
:)
Hmm... maybe... Is there a way to edit the equipment configuration from the command prompt?
 
Prometheus only accepts [a-zA-Z0-9_] and sometimes : for metric names, so that would do it. Probably need a quick sanitize filter for the exporter to just munge things.
 
Prometheus only accepts [a-zA-Z0-9_] and sometimes : for metric names, so that would do it. Probably need a quick sanitize filter for the exporter to just munge things.
Yikes! You Guy's are smart. So, how do I edit this from the command line? I used to be a hardware Engineer so the software side is a bit challenging for me....
 

TOP 10 Trending Threads

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: 31 56.4%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 24 43.6%
Back
Top
Home
Post thread…
Market
What's new