How what interfaces from Sensors to openhab

Here is the build: RaspberryPi with OpenHab1.8.3 installed and I have a AM2302 directly connected to it (first sensor project). I am able to get openhab installed however I am having trouble using the sensor to display on the Openhab interface. I don’t know what interfaces with the sensor to get the information to OpenHab. I am able to get this output from

pi@raspberrypi:~/Adafruit_Python_DHT/examples $ sudo ./ 2302 4
Temp=78.8* Humidity=34.6%

any help would be great.

You will need to use the Exec binding or executeCommandLine from a rule to call your Python script, parse the output, and populate two Items (one for Temp, one for Humidity) with the values from the script.

The GPIO binding is only able to handle simple ON/OFF type sensors from the GPIO pins directly which would not support this sensor.

Alternatively you can add a bit to the Adafruit script to publish the results directly to openHAB using MQTT or the REST API and either set it up as a service or create a cron job to run it periodically.

If you want to go the server route and don’t want to figure out the MQTT or REST code, you can start with my sensorReporter script.