Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker
MIT License
361 stars 112 forks source link

Getting state unavailable? #134

Open brynyneuadd opened 2 years ago

brynyneuadd commented 2 years ago

Hi,

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

JAnslinger commented 2 years ago

I have the same problem!

the-jeffski commented 2 years ago

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

Hamudulu commented 1 year ago

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

the-jeffski commented 1 year ago

Simplest is run ps | grep "system_sensors*"

Hamudulu commented 1 year ago

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.

the-jeffski commented 1 year ago

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.

Hamudulu commented 1 year ago

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'.`

the-jeffski commented 1 year ago

Try setting power_status: false in the config.