Closed manuelwolfcgm closed 2 years ago
....added "airquality = 0" in the if-clause for DHT11,22,2302 ( init.py )-> seems to work so far....
I had the same issue and adding the missing airquality = 0
line helped at first, but now I continously get the follwoing error message:
`2021-12-11 20:47:18,056 - octoprint.plugins.enclosure - INFO - Failed to execute python scripts, try disabling use SUDO on advanced section of the plugin.
2021-12-11 20:47:18,057 - octoprint.plugins.enclosure - WARNING - An exception of type ValueError occurred on log_error. Arguments: ('not enough values to unpack (expected 2, got 1)',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1127, in read_dht_temp temp, hum = stdout.decode("utf-8").split("|") ValueError: not enough values to unpack (expected 2, got 1) `
Anybody here who has an Idea. By the way, it makes no difference wether or not I disable/enable the "use SUDO". I also activated the logging function, but I get no futher details, e.g. what the AM2302 reads.
@plani-de not sure if it's the same cause however I'm talking through on #459 something that has the same error msg - I've put a rough summary of two things that I think are worth checking https://github.com/vitormhenrique/OctoPrint-Enclosure/issues/459#issuecomment-1038530919 if that helps any?
@manuelwolfcgm quick sanity check, do the changes in #461 (specifically commit https://github.com/vitormhenrique/OctoPrint-Enclosure/commit/e1f0372a63905f5f9de89b68c689aa5be6b209c5 ) cover what you did?
@manuelwolfcgm quick sanity check, do the changes in #461 (specifically commit e1f0372 ) cover what you did?
I did nothing more than this "airquality = 0" -> seems ok from my point of view
Gotcha, so yeah, that might mean this issue is resolved by #461, which is good to know
Fixed!
Describe the bug No Readings for DHT11 (which is tested and had been working up to the latest push) and AM2302. The sensors are working fine and already have been working in the enclosure-plugin. I needed to reinstall the plugin - and after that, I cant get any readings any more, although the sensor is accesible via a test-script.
To Reproduce Fresh Plugin-Installation; Sensor shows no values; Log shows errors complaining about modifying a not-declared variable "airquality" in getDHTTemp.py
Expected behavior ....sensor should display values! (Tested via a smal test-py-script)
Additional context
It seems that in the last push, there have been adjustments in getDHTTemp.py, especially adding handling of the airquality-variable. For Sensors DHT11, 22, AM2302, this variable isn't declared, is it? I'll try so switch line 1026 to its previous version, not using the airqualtity-parameter (which is not useful for me). Maybe this is enough change in my case...