Not compatible on Pi 4 #354
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?
It looks like the Adafruit_DHT library is deprecated and not compatible on the PI4 as the platform Detect doesn't know about the BCM 2711 chipset, thinks its not a PI.
Adafuits site says that they support the CircuitPython Libraries, Which do work on the Pi4 is there a work around for this or a way to get the plugin to work on a PI4?
I've got in working in shell (for python3) by following instruction here:
https://github.com/adafruit/Adafruit_Python_DHT
Unfortunately it doesn't work inside the plugin:
I think I found it:
456497f7e6/octoprint_enclosure/init.py#L880It invokes python2, so this has to be changed to python3.
Then there's a problem with decoding the response.
temp, hum = stdout.split("|")has to be changed to
temp, hum = stdout.decode().split("|")I will create pull request tomorrow
Actually, while my fix works for my specific environment, the situation is more complicated should this be deployed to others. The way how Enclosure plugin is written means that it is invoking python scripts via shell, instead of calling the code internally. And this is a problem with all the scripts.
Should this method be used going forward, it requires configurable python interpreter (2.7 vs. 3x), and perhaps even different handling of certain things (like .decode() needed before .split() on 3.x).
Try fixing your local installation in
~/oprint/lib/python3.7/site-packages/octoprint_enclosureand let me know if you need some help. I will open a separate issue around this.this is all gonna be part of python 3 support as I'm ditching all those old libraries and changing the entire thing...
https://github.com/vitormhenrique/OctoPrint-Enclosure/issues/302