For some reason, the script I was running to get the temperature and relative humidity from the DHT22 kept hanging every so often.
Instead of running two scripts separately (one for the DHT22, one to monitor the other different sensors I have), I’m now calling the DHT22 script from my main script and in case the last update from the DHT22 is over 2 min old, I just kill it:
process = Popen(['sudo', 'killall', '-9', 'DHT.py'])
and restart it.
subprocess.Popen(['sudo', './DHT.py'])
For the negative temperatures, the script seems ok, but since we’re in summer I have not had the chance to test why the returned data shows 0. I’ll have to wait for Winter for this one
Watch this space…