I am using a voltage sensor which communicates over I²C, a Python script is handling all the communication and logic in a Raspberry Pi. Since I want to switch to openHAB I am wondering how to read that sensor, basically code a binding, without the use of Java.

My idea is to run a small Python script, which uploads the current value to a local MQTT server, which makes me worry about network overhead and performance.

Is there any other way to implementiert such a binding in Python? I really want to stick with that since the sensor only has library support written in Python.

2 Answers 2


There is a solution provided here at stackoverflow:


Which sends the data directly to the OpenHab using python only. There the user has sent DHT11 sensor data on the condition but all you need is to check the method to send the data to the OpenHab.

Below is the link to the Question asked on the OpenHab forum about sending the RPi data to the OpenHab. Please go through the whole conversation so you can get the idea or different problems that you can face during implementation and their dedicated solutions.

Send temperature from RPi to Qnap OpenHAB


I ended up just implementing everything, including local services as Homie devices, which makes integration in openhab extremely simple and allows to quickly run those services on other devices withouth the need to reconfigure anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.