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

`vcgencmd` on Raspberry Pi sometimes returns -1 #155

Open coogle opened 1 year ago

coogle commented 1 year ago

I have a Raspberry Pi 3 (with the 7" touchscreen) which breaks the script on line 133 (roughly) where you try to extract display_state and don't expect display_power=-1 as a possible return value.

I fixed this locally by just wrapping that line in a try/catch and returning "Unknown" for this sensor, but a better patch is probably a good idea.