RPi Humidity and Temperatur Sensor DHT22 in IP Symcon

Today I would like to quickly present one of my current projects, i.e. adding the Raspberry Pi wired with different kind of sensors to IP Symcon. With the sensor data in IP Symcon we can log changes and generate reports upon those, for instance. So we are getting data from the Raspberry Pi, or -to be more precise we push data from the Pi to IP Symcon by invoking JSON Remote Procedure Calls provided by IPS.

I started with the humidity and temperature sensor DHT22. For the wiring you will probably find dozens of introductions and tutorials. The only challenging part was the not so obvious mapping of the sunfounder breakout kit. Please find some great information about the mapping between breakout kit and Raspberry Pi GPIO here:

http://heinrichhartmann.com/2014/11/22/Raspberry-Pi-SunFounder-GPIO-Layout.html

HumidityTemp_Wiring

 

To make RPC invokes easier from the Python side I used “Python Requests”:

http://docs.python-requests.org/en/latest/

I also recommend to use Fiddler for “debugging” purposes. Before I started developing the Python app I made sure I have the right HTTP Post request in place. We call the WebApp Instance of IPS with a “/api” below to make RPCs. It uses Basic authentication (your registered email address) and the main password encoded in base64 and send as http header.

Here is my example:

RPC_Fiddler

Here is the small piece of code to read the sensor data and send these into IPS via RPC. As a prerequisite you need the created variables in IPS, even better if you immediately apply the float data type and the temperature and humidity variable profile:

For sure the basic auth password is just a placeholder and should be replaced by a proper base64 encoded password for IP Symcon.

See below how it looks behind the scenes:
TempHumidity2

 

 

And this is how it looks in the Frontend together with my 7$ gadget webcam controlled by “motion” 🙂

TempHumidity

No Comment

You can post first response comment.

Leave A Comment

Please enter your name. Please enter an valid email address. Please enter a message.