A DS18B20+ and a Pi

Yesterday, I realized that I actually had one Dallas DS18B20+ OneWire temp sensor laying around and not being used. That piece of electronics together with an almost unused Raspberry Pi would actually be possible to transform to another sensor in the HA system, right?

Said and done, after some readings I began by soldering the Pi together with the temp sensor and the 4,7k pull-up resistor. Connected all together and did a new install of Raspbian. I found this great tutorial on ModMyPi – ds18b20 and a Pi and borrowed the Python code from there. After I installed the Mqtt Paho client (Python), the Pi finally sends the temp data to the right Mqtt topic.

Final step? Yep – hacking the items file in openHAB and showing up the item with value and graph in the right sitemap. Viola!

All on all – after one hour – I had a new temp sensor from unused parts. I’m satisfied 😉

Tjing!

20140703-104118-38478685.jpg

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *