I have discovered a strange problem with a sensor I am deploying to my summer home in order to monitor temp/humidity over the winter.
I have an RPi3 with the Adafruit_Python_DHT library installed and it worked just fine yesterday.
Now following the nightly reboot of the RPi it has stopped working, no values can be detected.
After some research I power cycled the sensor by pulling the connection from the 3.3V pin on the GPIO connector.
Then I reinserted it (all with the Pi still running) and now the sensor works again and the "./AdafruitDHT.py 22 4" call returns the expected values.
Clearly this will not work for monitoring house temperatures over the winter, so I am wondering how to solve the problem?
The nightly Pi reboot is there to guarantee that it is accessible and working even though no human can reach it for 6 months, so it cannot be removed.
According to installation instructions I have enabled the RPi I2C, SPI and 1Wire interfaces. I don't know if they are needed or if they can interfere...
Is there a problem using GPIO4 as the connection for the DHT sensor?
Which of the interfaces above can possibly interfere and is really not needed (if any)? (I will disable it if not needed)
It seems like a cron initiated reboot hangs the DHT sensor for some reason whereas an RPi power cycle does not....