Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting state unavailable?

brynyneuadd opened this issue · comments

Hi,

Installed this and all appears to be working, except all my Home Assistant entities are listed as 'unavailable' - any idea what this means?

I have the same problem!

Have you checked what is being published to MQTT? I had this when there was two instances running, one pubishing over the other.

Hello, have the same problem. How to get rid of it? How to figure out if there are two instances?
Thanks

Simplest is run ps | grep "system_sensors*"

Thanks, and if there is nothing shown then nothing is running? Im struggling with point 7 and the following points. After did point 7 the sensor are visible in HA but after closing the terminal they are unavailable. Strange.

Ah, so it not running. When you close the terminal it will quit as its running from there. You need to enable the service in part 8 for it to run in the background.

yes, of course, I tried.
that's the message I got:
`● system.sensors.service - Python based System Sensor Service for MQTT
Loaded: loaded (/etc/systemd/system/system.sensors.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-02-14 12:53:10 CET; 9s ago
Process: 19700 ExecStart=/usr/bin/python3 /home/pi/system_sensors/src/system_sensors.py /home/> (code=exited, status=1/FAILURE)
Main PID: 19700 (code=exited, status=1/FAILURE)
CPU: 479ms

Feb 14 12:53:09 pi systemd[1]: Started Python based System Sensor Service for MQTT.
Feb 14 12:53:10 pi python3[19700]: Traceback (most recent call last):
Feb 14 12:53:10 pi python3[19700]: File "/home/pi/system_sensors/src/system_sensors.py", line 13, in
Feb 14 12:53:10 pi python3[19700]: from rpi_bad_power import new_under_voltage
Feb 14 12:53:10 pi python3[19700]: ModuleNotFoundError: No module named 'rpi_bad_power'
Feb 14 12:53:10 pi systemd[1]: system.sensors.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 12:53:10 pi systemd[1]: system.sensors.service: Failed with result 'exit-code'.`