A number of years ago, after having a perimeter drain put around the house and also the carport (now enclosed shop) I suddenly started having rust problems. Before that never.
So using one of the DHT-22 type modules and a Raspberry PiZeroW I use a web browser to get the temperature and RH from the sensors and calculate the DP. The DHT-22 sensors are very unreliable and inaccurate and seem to fail over time. Ideally a chilled mirror would be best but that's a lot of work or very expensive.
View attachment 53862
I ended up buying a refurbished dehumidifier from PA plus I run a small 1kW fan heater. The temperature tends around 21C because when I'm in and out the side door to the basement is open and there's a furnace duct that almost blows into the shop. That and the mass of all that equipment means that it would take a while before the temperature starts to drop.
And of course the compressor control unit now also reports shop temperature and RH. Might be smarter to add the math and change the RH to dew point.
View attachment 53863
Also shop floor is concrete with no vapour barrier and most of the walls are also concrete with no insulation or vapour barrier. So the big problem is moisture coming in.
Python:
#!/usr/bin/env python
import smbus
import time
import os
import sys
import Adafruit_DHT
import math
sensor = Adafruit_DHT.AM2302
pin = 18
delaytime = 60
print('AM2302server -> DHT.dat logging every '+str(delaytime)+' seconds.')
while True:
# Try to grab a sensor reading. Use the read_retry method which will retry up
# to 15 times to get a sensor reading (waiting 2 seconds between each retry).
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
H = ((math.log10(humidity)-2)/0.4343)+((17.62*temperature)/(243.12+temperature))
DewPoint = (243.12*H)/(17.62-H)
try:
# file available
if humidity is not None and temperature is not None:
res = 'T={0:0.1f}C,RH={1:0.1f}%,DP={2:0.1f}C\n'.format(temperature, humidity, DewPoint)
# print(res)
myfile = open('/tmp/DHT.dat', 'w')
myfile.write(res)
myfile.close()
else:
print('DHTserver: Failed to get reading')
except:
# file not available
print "DHTserver: DHT.dat File Busy"
# wait a bit_length
time.sleep(delaytime)