DHT22 reading with raspberry

Hi !
I have got a raspberry wired with DHT22. I installed wiringpi and Adafruit_DHT library and MQTT. for example: If I run
AdafruitDHT.py DHT22 4
I get the right info. that works fine.
but how can I read this in openhab ? with exec or gpio bindung or…
It’s for me realy difficult. what is the best way? mqtt?

bye, Thomas

I used Mqtt : https://github.com/psyciknz/OpenHAB-Scripts/blob/master/mqtt.dhtsensor.py

1 Like