How to get an energy value read by a rtl-sdr USB device into openhab?

Hi everybody,
I’m running OH 1.83 on a Raspi with a Tellstick to read all the temperatures and control the switches in my house. Now I bought an efergy e2 ir wireless electricity monitor to read the pulses from my energy meter. To get the energy readings into my raspi I bought a DVB-T USB dongle with SDR support. I added RTL-SDR together with a decoder (RPI_Efergy) to read the energy data which will be send every 30 s. This value for the moment will be written into a text file. It looks like this:

Efergy Energy Monitor Decoder

Now my question, what will be the easiest way to get the energy value, in this case 1.079 kW, into openhab and show it as a live value and add as a persistence ???

Thanks for any advice.


Hi Udo,

I do something very similar with lacrosse temperature sensors in my house.

What I do at the pi with the sdr is pipe the raw input to a mqtt topic.

on the pi (i use the screen app so you can disconnect your terminal)
rtlamr -format=csv -quiet=true | mosquitto_pub -h -t private/water -l &

Then I have a python script which parses data on that topic (private/water) and does any processing you may want, and then publishes those readings on a topic such as:

sensors/garage/temperature or sensors/kitchen/temperature, etc

Then use the mqtt binding to get those values into openhab.

Thanks for your suggestion but it seems to be too complicated for a beginner to realise.
The file with the values is already on the Raspberry Pi where OH runs.
What I need is a script which can open the file and parse the data (energy value) into a number item

maybe you could solve this issue by using the exec binding, and something like the program grep to retrieve the info.


How is your progress with the efergy e2 classic?
Where did you buy the dongle? I am looking to integrate and create a binding for the unit for OpenHAB2.

Thanks for answering,

I didn’t continue with the Efergy because I installed a Solar plant on the
roof and get the values now from the inverter instead.
The dongle you can find everywhere on eBay and Amazon for around 6 Euros.
Just take care that the DVB-T dongle has SDR support.
It’s multi-usable not only for receiving values from a 433Mhz sensor but
also to track the air traffic around where you live or get the latest
satellite pictures from a Russian weather satellite.
Anyhow good luck with creation of the binding. Will test it when I migrate
to OH2.

Did you make any API for the USB-dongle so that it is easy to send and receive messages to/from it?
(Since this is some schoolwork, I don’t have time to do it myself)

Thank you!

No, unfortunately I didn’t come so far otherwise it would have been easy to
get the values into openhab.
I just got the values written into a text file and got stuck there.
On this website you will find most information to start with:


As an fyi.

I use a SDR to read the water readings from the meter outside my house.

I have ended up piping output of the sdr software into mqtt_pub. This gets the reading to mqtt, then trivial to get it to openhab.