Support for missing readings #364
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?
Hi, I'm a complete noob to Linux, Python and Pi and I'm looking for some help getting my DHT22 readings into the Enclosure plugin please as I cannot figure out what I am doing wrong after lots of hours of failing to fix it. Details:
This leaves me with where I'm at now, no readings at all, not even a 0 reading:

I'm sure I've made a complete novice error but I cannot work it out, do you have any suggestions at all please?
try the following:
sudo rpi-updateto make sure you are using a recent kernel, and
to make sure you are using a recent RPi.GPIO.
You will also need to make sure you are a member of the gpio group:
try running the script without sudo now...
Also, after saving the settings try to reboot octoprint...
Thank you for the very quick response, @vitormhenrique.
I did these a few times on Saturday when installing the DHT 22:
sudo apt-get update sudo apt-get upgradeUser Pi says already has GPIO access when I type:
sudo adduser pi gpioNo feedback in Terminal at all when I type in these commands but I presume they are working as no errors are presented:
sudo chown root.gpio /dev/gpiomem sudo chmod g+rw /dev/gpiomem sudo chown root.gpio /dev/memRebooted after all of the above and the test only works as sudo still so now I'm running...
sudo rpi-update...then I'll try again!
Ok, so I have run through every one of your steps in order now just to make sure (thank you for posting them). So RPi updated, then get update and upgrade, the other steps, the reboot. In Terminal sudo is still needed to get a result, and I'm guessing this is my fundamental issue that is stopping the plugin from retrieving values too?
I'm there, issue resolved after far too many hours of fiddling. I went into the interfacing options on raspi-config (again) and re-did a few of them. I'm not sure which change made the difference (GPIO remote access was already on) but it worked. Thank you, @vitormhenrique for your help too.
I just decided to add an AM2302 temp sensor to my control box, and I'm having the same issue. The enclosure plugin is only seeing 0' and 0% results. I got the right sensor selected and the right GPIO entered as well. All the prereq's are installed as well - and the example script works just fine (as both root (with sudo) and pi users). So, I know the hardware and even the software actually works - but I can't get it to pull a reading in the plugin. I've done some of the above poking around as well, and even ran rpi-update to update the firmware. suggestions?
have you tried again disabling he root on the advanced section?
i have same issue and yes sudo is unticked
It does not matter if I sudo or not. It looks like there's something odd about the pulling of the data into the variables. I've even removed and reinstalled the plugin.
pi@octopi:~ $ python -V
Python 2.7.16
pi@octopi:~ $ python /home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/getDHTTemp.py 2302 4
26.6 | 32.0
@fallonk see how your octoprint is running under python3.7? look at it's path...
To get it working on python 3.7 you manually need to change some lines of code inside of the plugin, as described on other issues....
II'm working on python 3.7 version of the plugin but it will take few moths