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

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
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


:)
I'm running 4.1. I also had the same issue with 3.5
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
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.

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.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
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.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
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:~ $
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
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
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)
 

bishoptf

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

:)
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
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...
 

bishoptf

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

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
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?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
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.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
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....
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
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....
@Ranjib or @theatrus may know but I think you need to edit the database which I think you can do but I have not done it, just make a copy BEFORE doing any edits. Hopefully someone can chime in on how you you would do it.

I am guessing it will be something like this posting - edit database
:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
See my update about poking around the database on my prior posting. I will try to look at it later this evening but will be a few hours out, if you haven't corrected it by then.
There is additional information on the troubleshooting webpage for how to do database edits see this

Down towards the bottom you will see this section - Using reef-pi db command

Looks like the bucket you are after is the "equipment" bucket. Take a look at that page along with the one I previously linked to should provide enough information to change what you need and get it working. Remember to make a copy of the db before applying any edits, that way you can always go back.

:)
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
Hey guys. Looks like Rpi has recently announce a $4 arduino style board. The Pi pico. Do we foresee any use for this down the line?

Its best compared to an Arduino or Feather or other device, and isn't a full-up Linux capable processor. Always has uses.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
OK so I have grafana and prometheus working but there are so many knobs in grafana it makes my head spin :)
I can figure out cpu etc, but would like some input on timers that are on and off, basically a 1 or 0. The basic chart shows that and shows the length of each time, but would like to get a total time per day so I can track how long and at what time the equipement is running e.g. a doser.

doser-graf.png


Anyone can point me to some grafana prometheus kungfu that would be great. Trying to figure out how to get this one to show the data that I would like.

Thanks :)
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 35 31.0%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 27 23.9%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 21 18.6%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 30 26.5%
  • Other.

    Votes: 0 0.0%
Back
Top