emonHub displays the following error when a DS18B20 temperature sensor is disconnected:
2026-08-10 14:23:51,013 WARNING DS18B20 Exception caught in DS18B20 thread. Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 31, in wrapper
return func(*args)
^^^^^^^^^^^
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 105, in run
rxc = self.read()
^^^^^^^^^^^
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubDS18B20Interfacer.py", line 110, in read
value = self.ds.tempC(sensor)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubDS18B20Interfacer.py", line 42, in tempC
if len(lines[0]):
~~~~~^^^
IndexError: list index out of range
EmonHub should gracefully trying to read from a temperature sensor when it's been disconnected.
emonHub displays the following error when a DS18B20 temperature sensor is disconnected:
EmonHub should gracefully trying to read from a temperature sensor when it's been disconnected.