Get your smart electric, water and gas meter scm readings into home assistant with a RTL-SDR

Actually, now I remember, the signal is sent much more often, but the value is only updated after 5-7 min

My docker container repo can be directly used added as as a HassOS addon, thanks to fcfort. Just add the repo. I’ve always wanted to make a real-time-ish computation, but my math never seemed to work out. I allow pinging multiple meters, so hard to keep track of last reading/time in a nice way. You can edit the shell script easily if you like.

@jaaem Hi, your add-on works great. I am able to pull in readings from my electricity meter w/ MQTT. This is probably a dumb question, but, is there some conversion I should be doing? I’m based in the US, getting a reading of ~135,500, appears to be climbing at approximately 1 KwH per 5 minutes from the sensor. My ‘normal’ electricity consumption is around 650 KwH per month. I assume there’s probably a conversion/template I need to use.

Any help appreciated.

I am in the US and my meter puts out kWh natively. For my meter, the value is just what the meter is at right now. Look at your last bill and see if the reading is somewhere around 135,500. You can also look on the meter to see what it shows, if it has a display.

Maybe your meter outputs in another unit. It could be in Wh (1/1000 of a kWh)?

I am not expert on meters, I just ported someone else code. Try googling if others have your meter. Also be sure you are tapping into your meter and not a business near by.

@jaaem

Got it, no worries, thank you for responding. I took another look at the meter and my next door neighbors, it is in kWh – for whatever reason, RTLAMR was pulling in with a couple more digits. If helpful for anyone else that has a similar issue, I just made a template sensor to convert.

sensor:
  - platform: template
    sensors:
      converted_power:
        value_template: "{{ ((states.sensor.power_meter.state | float * 1 / 100)) | round(0) }}"
        unit_of_measurement: kWh
1 Like

Thanks for posting this! I found another way which was much easier for me to setup by only requiring rlt_433 (which also reads other frequencies): Refrigerator Sensor and Gas Meter Reading with rtl_433 and cheap USB rtl-sdr tuner

1 Like

Can anyone estimate the range of the NooElec nano dongle when it comes to monitoring their meter? My power meter is about 100m from my house, and I’m debating if I’ll need something more beefy to read the signal (assuming its there)

Damn, looks like my electricity meter is using the cell phone network to send back data (itron centron c1sx)

Check your meter and RTL-SDR reading, wait a while, and then check both again. See how much the reading changed and then you can determine the conversion.

Mine I think I have to divide by 100 to convert the meter’s RF reading into kWh to match the dial on the front.

Range will depend on local RF interference, the power the meter is sending, and what type of antenna you are using to pick it up (what frequency it’s tuned for). I typically pick up a few neighbors meters a couple hundred feet away with my RTLSDR (I think it’s a v1 or v2) and the crappy couple inch antenna it came with.

If you live near any AM/FM broadcast towers, you may want to buy the appropriate AM or FM band block filters to reduce the noise floor and prevent the receiver from being overloaded by strong signals. This will help it hear the weaker signals better.

If it’s still struggling, you could get a directional antenna (such as a Yagi) that is designed for the frequency you need to receive (probably 900MHz for power meters) and point it in the direction of the meter. This will be more sensitive to signals the direction it’s aimed and less sensitive to signals to the sides and behind it.

Given the low cost of these SDRs, I would almost suggest get one and try using the rtlamr app on a laptop or something and carry it around to see how it does.

Cool, I should be Ok then most likely. My gas meter is about 2 floors away from my Home Assistant away. My electrical meter looks like a non starter anyways, as it seems (from what I can see) to report readings by cell network. I’m on a well so no water meter.

Yeah, just don’t put the antenna inside a metal rack or anything that will really shield it. Mine is doing fine in my basement below-grade with the antenna stuck on top of my 42U enclosure and I still pick up at least a few neighbors meters I’m guessing are probably 100 feet away.

Only thing I have to watch is my metal roof… my home assistant box lives at the top of my house, basically right at the roof line (compromise between ability to get cellular internet and good wifi coverage for the house)

Actually as these meters typically use 900MHz and cellular is often +/- 200MHz from that, phone signal may be a good measurement of how well it could work now that I think of it…

Any idea the specs required for the machine to run this? I was planning to run this on my home assistant box, but of course no apt on home assistant… (thinking about a pi 0)

Started playing with last night… I can see two meters my house, neither of which matches my meters when in comes to consumption or ID numbers. Kind of weird because the closest house is about 400m away through dense trees…

Saga continues… I think I’ve got my gas meter (none of the ids or use lines up but the values on the meter and values in the software show a linear relationship), looks like some unit differences, and a 0 offset, but can’t really tell why…

This solution is great, and I’m delighted that it’s available as an Add-On. Everything’s running delightfully, except mosquitto_pub. This is my first ever mosquitto install, so it’s equally possible the issue is with mosquitto and not RTLAMR2MQQT.

  • When my RTLAMR2MQQT configuration uses mqtt_host: localhost it results in error Error: Address not available
  • When mqtt_host: hassio.local it results in error Unable to connect (Lookup error.).
  • When mqtt_host: 127.0.0.1 it results in error Error: Connection refused
  • Interestingly, when I run the same command from SSH as root, it succeeds.
    docker exec addon_d9cf98df_rtlamr echo 4 | /usr/bin/mosquitto_pub -h 127.0.0.1 -u mqtt -P MYPASSWORD -i RTL_433 -r -l -t readings/56572016/meter_reading
    …results in the Home Assistant sensor successfully updating.

My hunch is that it has to do with the rtlamr docker container effectively using the network. Has anybody overcome similar challenges?

Configuration:

mqtt_host: 127.0.0.1
mqtt_user: mqtt
mqtt_password: MYPASSWORD
msgType: scm
ids: '56572016,28512779'

Hmm, that is weird that it works in the docker container via the command line.

Can you use the actual IP address of your home assistant install? 192.168.xx.xx (or whatever you use). That is what I use.

1 Like

Awesome. That worked immediately. Thank you so much!