DHT22 am2302 no values #457
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Hello Guys,
after a while of researching, I'm still not able to get the Enclosure Plugin to run.
It alwasy fails with the Messages underneath.
My Enviorment is: Octoprint Version 1.7.2
I can get Vaules from my AM2302 when I do it like that:
>> python3 getDHTTemp.py 22 2
14.8 | 40.5
If I do it like this one:
>> python getDHTTemp.py 22 2
Traceback (most recent call last):
File "getDHTTemp.py", line 2, in
import adafruit_dht
ImportError: No module named adafruit_dht
It Fails. so what is happend here? Does anyone how to fix that? Any help would be apriciated.
Thanks.
Two Python versions:
Python 2.7.16
Python 3.7.3
Here are some messages from octoprint.log:
octoprint.plugins.enclosure - WARNING - An exception of type UnboundLocalError occurred on log_error. Arguments:
("local variable 'airquality' referenced before assignment",)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1026, in get_sensor_data
if temp != -1 and hum != -1 and airquality != -1:
UnboundLocalError: local variable 'airquality' referenced before assignment
octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments:
('cannot unpack non-iterable NoneType object',)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 811, in check_enclosure_temp
temp, hum, airquality = self.get_sensor_data(sensor)
TypeError: cannot unpack non-iterable NoneType object
Oh, I fixed that Version thing.
python getDHTTemp.py 22 2
Gives me an result now. But unfortunatly Enclosure Plugin gives me the same errors
This are the messages I get, when I disable "SUDO" in advaced options.
?????
2021-12-22 18:27:22,391 - octoprint.plugins.enclosure - WARNING - An exception of type UnboundLocalError occurred on log_error. Arguments:
("local variable 'airquality' referenced before assignment",)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1026, in get_sensor_data
if temp != -1 and hum != -1 and airquality != -1:
UnboundLocalError: local variable 'airquality' referenced before assignment
2021-12-22 18:27:22,391 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments:
('cannot unpack non-iterable NoneType object',)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 811, in check_enclosure_temp
temp, hum, airquality = self.get_sensor_data(sensor)
TypeError: cannot unpack non-iterable NoneType object
Unfortunatly Enclosure Plugin on dashboard don't have values :(