Home Assistant Add-On: AMR2MQTT

Ok, I was able to find the problem: the ID I had was a string, my bad, I was confused, upon leaving the meters empty and checking the logs I was able to find the proper ID, an integer of 8 digits, and changing it saved my configuration and now seems to be working just fine.

Setup was super easy and I was able to import my water meter consumption.
Anyone has been able to add the sensor to the new Water portion of the Energy consumption dashboard ?

can you share your setup for the water meter and what brand it is? Maybe it gives me some hints or ideas.

I left the meters defined as an empty array in order to capture everything but could not find my water member number not sure why :thinking:

It’s a Neptune meter. I just went to look at the value of m3 on the meter and waited until a device showed up in that range. That was the id of my meter that i added.
I’m using mosquitto mqtt and amr2mqtt with this config

  - id: xxxxxxxxxx
    protocol: scm
    name: Water meter
    type: water
    multiplier: 0.01
    unit_of_measurement: m³
mqtt: {}
home_assistant_discovery_enabled: true
last_seen: ISO_8601
1 Like

Well I added a template sensor and that seems to work and I can select the sensor in the energy dashboard. So this is a workaround but I would hope the plugin would be in a position to be configured to pass on the correct attributes to HA
@CentralCommand Am I missing something in the configuration or is this not a feature currently?

  - platform: template
      # convert value from add-in into statistic
        friendly_name: "Total Water Consumption"
        device_class: water
        unit_of_measurement: m³
        value_template: "{{ ((states('sensor.water_meter_consumption') | float))  }}"
            state_class: total_increasing 

what does this exactly means? Mine is also a Neptune ProCode R900i 5/8" T10 but I am not able to get it working. :frowning_face:

So I have a traditional mechanical meter for water. There’s a device wired to transmit the consumption value. If I look at the mechanical meter I see a consumption value in cubic metres (m3). I use that value to identify which meter is mine then use that to configure the add-on.
For the electrical meter, I’m waiting for snow to melt a bit to find the number of the meter since I realized that the RPI3b+ might not be able to support all the broadcasts and the add-on would crash on me. I was getting similar messages:

ll+, now 327
ll+, now 328
ll+, now 329
ll+, now 330
reference: addon-amr2mqtt/DOCS.md at bc8c6fb853680aea716c7e43b5b3c3794de389d7 · mdegat01/addon-amr2mqtt · GitHub

I was missing a number for the meter ID and also the protocol is different than yours, this is the correct version:

- id: <my_device_id>
  protocol: r900
  name: Water Meter
  type: water
  multiplier: 0.01
  unit_of_measurement: gal
  model: Neptune R900i

However, I am unable to add the sensor sensor.water_meter_consumption to my energy dashboard, and not sure why exactly since I am seeing it receiving data and showing up the total consumption :expressionless:

Docs here says:

If you manually integrate your sensors, for example, using the MQTT or RESTful integrations: Make sure you set and provide the device_class , state_class , and unit_of_measurement for those sensors.

Not sure if I need those somehow to make it to work

So you did the bit in the add-on, and at that point I also thought it would work and I hope the add-on will be modified appropriately, but in the meantime this post from above bridges the gap for me, to allow the data to be seen in the energy dashboard

1 Like

Out of curiosity, in what file do you add the template configuration? I am struggling to find the right one :expressionless:

in theory, it all goes into your configuration.yaml. If you did a separate sensors.yaml then it would go in there. This is where I put mine with all my other template sensors and it works

1 Like

New to this add-on and seems easy enough to follow; thanks for putting this together!

I’ve got the add-on installed and have the Nano2+ plugged in and MQTT configured.
Because I’m not entirely sure about my meter, I’ve just left the “meters” section blank to see what I can pickup.

Using MQTT Explorer, I can see that the system is up and running, although it’s not picking up any meters nearby it seems because it doesn’t ever show any messages other than what you see in the screenshot.


I checked my logs but there wasn’t any useful info; because the meters section is empty, it just looks exactly like what your docs say under troubleshooting:

ll+, now 327
ll+, now 328
ll+, now 329
ll+, now 330

Is it possible that there are actually no meters readable in the area (maybe they’re all encrypted)? or am I missing something?

I’ve got a Itron Metris M250 gas meter and a Sensus Flexnet 530x power meter, neither of which are listed as compatible, but from my quick searches, they do appear to be smart meters.

Any suggestions would be welcome :slight_smile:

Lastly, there is a RTLAMR message which shows up every so often, but all it says is “offline” all the time. I did tinker with RTLMAR2MQTT and so i’m wondering if it could just be a remnant of that; it’s not part of this AMR2MQTT add-on i’m assuming?

This addon is great, I was able to set it up and can read from my meter. My only problem is that my meter seems to read in 10’s of gallons, rather than single gallons. (at least according to water bill) The Energy dashboard shows me using 200 gallons last month, but my water bill shows 2000. How can adjust/change this?

There’s a multiplier property you can use on the meter configuration.

I’ve tried that, but it doesn’t seem to be working.

- id: xxxxxxxx
  protocol: scm+
  name: water_meter
  unit_of_measurement: gal
  icon: mdi:water
  device_class: water
  multiplier: 10
  state_class: total_increasing

Did HA 2023.4 break this integration for someone else? I am not receiving data since I upgraded :thinking:

This shows up in the logs:
> 19:53:21.353248 main.go:145: Error reading samples: EOF

but I am not sure what it means.

well restarting Mosquito Broker and AMR2MQTT make things get back in a working state, weird, lost three days of data because of this :expressionless: now I am thinking the problem was not HA but the recent Mosquito Broker update

So I got this hooked up to my water and gas meter pretty easily.

However utilizing them on the energy dashboard was a little bit of fun. But basically

  • both AMR2MQTT sensors and Home Assistant Meter Helpers didn’t set the right device classes
    • the water meter (Neptune R900) didn’t have its device_class set at all from AMR2MQTT
    • the gas meter was set to type ‘gas’ by AMRMQTT
  • The energy dashboard looks for ‘gal’ and ‘CCF’, both of which could be set by AMR2MQTT for the mqtt sensors, but the home assistant meter sensor was setting ‘ccf’ which isn’t valid, it must be CCF

configuration.yaml - ‘meter consumption’ are from AMR2MQTT, ‘meter’ are home assistant meter helpers

      device_class: water
      device_class: water
      device_class: gas
      device_class: gas
      unit_of_measurement: CCF


- id: xxxxxxxxxxx
  protocol: r900
  name: Water Meter
  type: water
  unit_of_measurement: gal
  multiplier: 0.01
  precision: 2
  manufacturer: Neptune
  model: R900
- id: xxxxxxxxx
  protocol: scm+
  name: Gas Meter
  type: gas
  unit_of_measurement: CCF
  multiplier: 0.01
  precision: 2
  manufacturer: Itron
  model: Gen 5 500G

I get this error…

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
usb_claim_interface error -6
Failed to open rtlsdr device #0.
[17:53:24] WARNING: Halt add-on with exit code 1
s6-rc: info: service legacy-services: stopping
[17:53:24] INFO: Service restart after closing
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I’m using the sdr dongle for rtl_433 stuff to, do I need 2 radios? Or can I use the same one for both services?

(post deleted by author)