DHT22 am2302 no values #457

Open
opened 2021-12-22 12:09:45 +00:00 by schlicr · 3 comments
schlicr commented 2021-12-22 12:09:45 +00:00 (Migrated from github.com)

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

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 <module> 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_
schlicr commented 2021-12-22 16:51:58 +00:00 (Migrated from github.com)

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

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
schlicr commented 2021-12-22 17:28:14 +00:00 (Migrated from github.com)

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

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
madkrystiank commented 2022-02-01 17:56:58 +00:00 (Migrated from github.com)

Unfortunatly Enclosure Plugin on dashboard don't have values :(

Unfortunatly Enclosure Plugin on dashboard don't have values :(
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#457