Retry when DHT temp sensor read fails #455
Reference in New Issue
Block a user
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
DHT sensor reads fail fairly often, causing the enclosure plugin to report a value of 0. When this happens, octoprint logs the exception:
This seem to be a well known issue, the adafruit_dht docs recommend catching the failed read exception and retrying. I no longer get false 0 degree readings with this change.
the error are in python script getDHTTemp.py in octoprint_enclosure directory!
maybe adafruit_dht library change from last review. for fixing i this dictionary:
'5': board.D5
'6': board.D6
'7': board.D7
'8': board.D8
'9': board.D9
'10': board.D10
'11': board.D11
'12': board.D12
'13': board.D13
'14': board.D14
'15': board.D15
'16': board.D16
'17': board.D17
'18': board.D18
'19': board.D19
'20': board.D20
'21': board.D21
'22': board.D22
'23': board.D23
'24': board.D24
'25': board.D25
'26': board.D26
'27': board.D27
and define pin = board_pin[sys.argv[2]]
now the line: dht_dev = sensor(pin)
works correctly