Home Assistant Add-On: AMR2MQTT

I just wanted to stop by and say thank you for developing this add-on! It was pretty easy to set up and I was fortunate that my meters are supported. I purchased a rtl-sdr USB stick and was able to set up home assistant to read both my electric meter and water meter. The electric meter is only a few feet from my antenna but the water meter is about 600 feet away. Everything seems to be working great and I’ve got a week or so of data so far.

Try changing the logins line in your mosquito config to:

logins: []

And in your amr2mqtt config for the mqtt line try:

mqtt: {}

first time setting this up. Please help

Nvm, I got it working.
Using mqtt broker name instead of IP. I tried both 127 and the IP of my HA VM.

host: core-mosquitto
port: 1883
username: xxxxx
password: xxxxx

This sort of works, but is missing device_class and state_class that would be needed to tie my meter into the energy consumption. I don’t see a way to properly set these on the mqtt device?

Managed to add what I believe is the needed properties, and I followed the FAQ for the energy consumption here: Frequently Asked Questions about home energy management - Home Assistant

But still no dice?

Got it to show up using Customizing entities - Home Assistant to add device_class and state_class to each of the required entities. Additionally had to fix issues in the developer tools related to units changing after the entity had been established. Works now.

So first off, thanks for this add-on. Made working with amr, which I previously, and still, know nothing about, super easy. I’m having some issues though and I’m not really sure where to ask.

I bought the recommended nooelec receiver and got this set up and working with my MQTT instance pretty easily.

Results -

Gas: Pulled in mine (along with several others!!) with no issues. Yay!
Water: Appears to find mine but can’t parse the information properly.
Electric: Nothing so far.

Thoughts -

I primarily purchased this hoping to pull in the electric meter, so I’m initially bummed. My meter is included on the user provided google sheet from the rtl-sdr github, so I had hope.

For my r900 water meter, I am getting the “11+, now 327” messages and from the troubleshooting section, I gather that means the RPi 400 I am using is underpowered for this task. The suggestion is to try to run this on a different system. That’s probably a fine suggestion for someone else but I’m completely lost.

I have a windows laptop I can use to test it but I have no idea how to get started. Is there a program I can download and run with my receiver to test this out pretty easily? Another benefit to using this device instead would be I could move it, along with the receiver, much closer to the actual location of the meters. Maybe that will help grab the electric info as well?

Furthermore, if I am able to pull in accurate water meter info, as well as hopefully electric, I will use this device to pull in meter readings at least until I can find a better setup. So I would need it to broadcast the info to my HA’s MQTT instance.

So what is the best way to get this started? Have virtualbox set up on the laptop so I could run this through a VM or docker or just add a program, but I get overwhelmed by all the resources pretty quickly.

Ultimately as I said above, electric was my main goal. If it turns out I can only pull in gas, not sure it will be worth it to me to keep this going. Gas and water would be enough as I would cross my fingers that maybe there would be a way to add electric eventually.

TIA.

Basically everything I just said above can be disregarded.

I did get it working on a different, more powerful computer and I did move that computer a lot closer. Here’s what I learned. Neither power nor distance were ever the issues.

My water meter, at least I think it is mine, is broadcasting a R900 message every minute or so but the message is nonsense. It shows 0 consumption and evidence of multiple leaks. Same message over and over and the numbers in the message do not change.

Still no progress on the electric meter. I’m going to let it keep scanning for awhile longer just in case my meter just hardly ever broadcasts, but it doesn’t look good. Will need to decide if I want to keep this just for gas.

Does anyone know how to update the drivers to support rtl-srd blog v4?

https://www.rtl-sdr.com/v4/

I have what might be a dumb question…
Can this run on the Home Assistant Green device?

i.e., I plug the SDR into my Home Assistant Green, install these addons and then I can get the data pulled in?

I see a lot of discussion on running on various linux/pi devices, but not explicitly about the Green.

djd

I’m having an issue getting the sensors to show up in HASS. I’ve got it hooked up to my HASS yellow and it appears to be reading data, but maybe the math needs adjusting?

If I go to MQTT and force it to listen to the topic it sees data:

{
    "ID": STUFFHERE,
    "Type": 12,
    "TamperPhy": 2,
    "TamperEnc": 0,
    "Consumption": 3323.48,
    "ChecksumVal": 57812
}

and then a second message came in:

{
    "ID": STUFFHERE,
    "Type": 12,
    "TamperPhy": 2,
    "TamperEnc": 0,
    "Consumption": 3323.5,
    "ChecksumVal": 19315
}

So it looks like it is receiving data and incrementing (although barely… that’s where I think the math is off).

I created a sensors.yaml file and its contents are:

homeassistant:
  customize:
    sensor.xcel_gas_meter_consumption:
      device_class: gas
    sensor.xcel_gas_meter:
      device_class: gas
      unit_of_measurement: CCF

And my configuration.yaml file has the correct include:

sensors: !include sensors.yaml

The yaml for the configuration from the add-on is configured like so:

meters:
  - id: STUFFHERE
    protocol: scm
    name: XCel Gas Meter
    type: gas
    unit_of_measurement: CCF
    multiplier: 0.01
    precision: 2
    manufacturer: Itron
    model: 100G DLT
mqtt:
  host: core-mosquitto
  port: 1883
  ha_autodiscovery: true
  ha_autodiscovery_topic: homeassistant
  base_topic: rtlamr
  tls_enabled: false
  username: LOLNAH
  password: LOLNAHAGAIN

Based on the fact that it’s receiving data from MQTT (even if the math is off, one thing at a time), I can’t add it to the energy dashboard.

I only see one sensor in entities and it shows this:

But when I go to the energy dashboard it doesn’t show at all for a gas entity.

Does anyone know how I can solve this? I’m new to HASS.

Looks like it just started working. so all good.

Spoke too soon… now the config is complaining about sensor platform. Can anyone help me sort this out?

Invalid config for 'sensor' at configuration.yaml, line 13: required key 'platform' not provided, please check the docs at https://www.home-assistant.io/integrations/sensor

So I look at configuration.yaml and:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
command_line: !include command_line.yaml
sensor: !include sensors.yaml

and sensors.yaml looks like this:

homeassistant:
  customize:
    sensor.xcel_gas_meter_consumption:
      device_class: gas
    sensor.xcel_gas_meter:
      device_class: gas
      unit_of_measurement: CCF

I’ve googled and googled for an answer but am hitting a dead end. It was working fine until I rebooted the unit :confused:

I also have v4. Can anyone comment if they got it to work?

OK I think I solved it. I watched this video: https://www.youtube.com/watch?v=8uB-vFmEuD0 and ended up creating an mqtt.yaml and included that in configuration.yaml. This is what my mqtt.yaml looks like for those that may see this later:

sensor:
  - name: "XCel Gas Meter Reading"
    state_topic: "rtlamr/$IDHERE"
    unit_of_measurement: "CCF"
    force_update: true
    value_template: "{{ value_json.Consumption }}"
    unique_id: "amr2mqtt_$IDHERE_consumption"
    device_class: "gas"
    state_class: "total"

I hope this helps future folks hitting this thread.

The CPU consumption of this add-on is huge.
Using ~30% all by itself. Is that normal?

I just got the RTL-SDR Blog V4 and had the same concern since their documentation implies that you must use their drivers.

I created a fork of the rtlmar2mqtt repo and replaced the drivers in the docker file with the drivers provided by RTL-SDR Blog: Quick Start Guide

It’s working just fine with the swapped out drivers. I will try and keep this fork up to date with the mainline branch.

2 Likes

Hi - wondering if anyone has had success reading the transmissions from this Byram Pulse Transmitter (BPT).

For my gas meter, AMR2MQTT picked up the meter pretty much right away, but I am not detecting any of the identifying numbers on my BPT. I am by no means an expert but reading some of the documentation it seems they may use a proprietary or encoded signal of some sort, and I haven’t worked out if it’s transmitting constantly, or at periodic time or consumption intervals.

Any suggestions or ideas are welcome. Thanks.

p.s.
This BPT thingy is connected to my water meter and relays the data for our utility to pick it up remotely.

Could this work for European market meters (freq at 868 MHz) such as Diehl? Thanks!