I've been playing with the DHT22, but the humidity values are very intriguing.
During the night or indoors the sensor is returning 99%. While the temperature values looks good.
Here is a visualization for the last 12 hours:

Before 10:30 the sensor was indoor, I put it out to test if I still have the same values. The sensor is fully exposed to the sun after 10:30.
I'm using the Adafruit DHT python library to fetch the values:
import Adafruit_DHT as dht
import time
def get_data(sensor, pin):
h, t = dht.read_retry(sensor, pin)
return h, t
def main_loop():
while True:
h,t = get_data(dht.DHT22, 4)
payload = {
'temperature': round(t, 2),
'humidity': round(h, 1),
'timestamp': int(time.time() * 1000)}
print payload
time.sleep(60)
if __name__ == '__main__':
main_loop()
As you can see, the sensor is plugged in the GPIO#4 of the RPi3.
I don't know if this is a problem, if the sensor is broken, but 99% humidity is very excessive.
Since I don't have anything else to verify these values, how can I understand the problem and fix it ?