Add-on request : wmbusmeter

Hi,

I’m a long time home assistant user , who appreciate all the hard work being put into this project. I’m a big fan of the podcast series and it excites me to feel like a part of such a great community, event though i’m not actively taking part in development. Humbly, I put forward the following request:

This goes out to anyone with the skill set and interest to integrate a new add-on to homeassistant, from someone who would like to monitor their water consumption at home.

Theres a daemon developed to easyli connect to a wireless mbus device to extract data, github link : https://github.com/weetmuts/wmbusmeters

It utilizes of a DVB-T tuner , like for example this one :
https://a.aliexpress.com/_msnhnOj based on the RTL2832U chip

Among supported devices this opens for communication to , is the kamstrup multical 21 water meter that gives live data about water consumption , dripping faucets and lets you know if your pipes have sprung leak. Link: MULTICAL® 21 / flowIQ® 21xx | Ultrasonic water meter | Kamstrup

This has already been tested to work well with home assistant through mqtt , but unfortunately requires a separate Linux computer to connect the usb wireless mbus interface and install the software on.

It would be awesome to see this software integrated as an add-on in home assistant.

If there’s already any other way to get this data that I’m not aware of , I would love to hear about it.

I’m also currently looking into this, since it’s possible to read the vastly spread in Germany Ista heat cost allocator, as well as the water counter.
It would allow me to follow my heating and water cost live.

I’ve already integrated it separately via mqtt but will have a look if a direct integration is possible. Maybe via a separate docker container (hass.io).

1 Like

nice to see you talking about it :), so your talking about Kerlink - What is WMBUS ? (specified in EN13757-4) integration don’t you?

They are on docker now, see weetmuts/wmbusmeters: Read the wireless mbus protocol to acquire utility meter readings - Docker

As my server sits in the basement, so well shielded by concrete, any chance to run in Raspberry Pi Nano, which would act as a remote receiver, which in turn is connected via Wifi, LAN or BLE to the sever?

That’s right!

Here’s a link to Norwegian forum discussing the topic: https://www.hjemmeautomasjon.no/forums/topic/1525-automatisere-vannmåler/

Some posts are in English, in the thread someone describes having successfully set up a reading of the kamstruo multical 21 water meter.

any chance that these guys drop a note here in English :grimacing:

I have been really banging my head around this on getting these readings on real time. Would it be possible for you to elaborate on this topic?

Following have the USB stick and apator meters worm cold but .seems tricky to get it work and transfere the data to hassio.

I’m one of the posters in the thread in the hjemmeautomasjon forum who’s actually using wmbusmeters to read water meter reading. I just got the encryption key for the water meter at my cabin as well, so I’d really like to be able to vote twice. :smiley:

If anyone has any questions regarding this, feel free to ask.

2 Likes

wmbusmeters has an addon in the official repo:

It does not support auto discovery but there is a setup guide for the mqtt sensor config on the addon page.

Following this guide worked for me: https://github.com/weetmuts/wmbusmeters/blob/fe936f5062124ffa3c55c9a624717dbc43ef58da/ha-addon/DOCS.md

If you find a device, try setting it up with NOKEY:

meters:

  • |-
    name=WaterMeter
    driver=auto
    id=123456 discovered in step 6. of the addon docs
    key=NOKEY

Most devices are not encrypted, at least in Germany, i can measure heaters, water meters and even the official fire alarm system without any further setup

6 Likes

Just tried it today, got the following error when trying to install:

22-05-10 13:52:17 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/weetmuts/wmbusmeters/tree/master/ha-addon repository: Cmd('git') failed due to: exit code(128)
cmdline: git clone -v --recursive --depth=1 --shallow-submodules https://github.com/weetmuts/wmbusmeters/tree/master/ha-addon /data/addons/git/5a8e3177
stderr: 'Cloning into '/data/addons/git/5a8e3177'...
fatal: repository 'https://github.com/weetmuts/wmbusmeters/tree/master/ha-addon/' not found

UPDATE: It seems to have installed anyway, so next up is testing with a USB device plugged in.

Hi all, I’m super interested in this topic and here in Belgium we got the Multical21 installed.

Can a short guide be made of what’s needed (HW & SW) and how to get it up & running?
Especially recommended hardware (quality vs price) and where to buy it in the EU.

1 Like

I’m also looking into this. Did you made any progress with this?

I am successfully running this on Home Assistant Blue for a couple of weeks now. I purchased the M871A-USB - Wireless M-Bus USB-adapter 868 MHz from IMST (good for EU, because they are in Germany). Installed wmbusmeters as HA add-on by adding the repository according to the instructions here. The USB radio was discovered automatically by the add-on and it soon discovered my meters in the Log tab. Then it was just a matter of adding them in the wmbusmeters config like this:

name=ColdWater driver=apator162 id=12345678 key=00000000000000000000000000000000
name=HotWater driver=apator162 id=12345678 key=00000000000000000000000000000000

You will obviously need to adjust these values based on the Log. I was lucky there is no encryption on my meters. Then I added the following to my configuration.yaml to make the entities show up in HA:

mqtt:
  sensor:
    - state_topic: "wmbusmeters/ColdWater"
      json_attributes_topic: "wmbusmeters/ColdWater"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: water
      value_template: "{{ value_json.total_m3 }}"
      name: Cold Water
      icon: "mdi:gauge-low"
      unique_id: cold_water
    - state_topic: "wmbusmeters/HotWater"
      json_attributes_topic: "wmbusmeters/HotWater"
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: water
      value_template: "{{ value_json.total_m3 }}"
      name: Hot Water
      icon: "mdi:gauge"
      unique_id: hot_water

Finally I set-up some Utility Meter helpers in the HA UI to calculate the current (hourly, 15 minutes, etc.) consumption from the increasing totals reported by the meters.


I am still trying to figure out how to make it work in the Energy dashboard, because none of the meters show up currently. I had a bug in the configuration, which is now fixed - for the meters to show up in the Energy dashboard, you have to use instead of m3 as unit of measurement.

7 Likes

Edit: my bad damn it. Seems like HA needed a restart for the dashboard to wake up. Reloading of the “manually configured mqtt templates” wasnt enough. Thanks for the help @hubikj

This is so f-ing weird. I have the same device_class, state_class and unit_of_measurement as you, but the sensor still doesn’t show up in the energy dashboard.
I’ve managed to get my sensor that I converted to “liters” in the dashboard, but that doesnt seem to work. Has been showing 0 for över 3 hours now.

Getting frustrated :smiley:

Which meter you use on water with this adapter reader ?

I live in Belgium too. Have bought the usb dongle @hubikj recommended.
Based on his instructions as well ones from addon creator (thanks both!) managed to install and integrate it into HA.
However, have to return the device because meters (heating radiator and water) in my building use different technology.
In Belgium, metering company ISTA provides 3 different types: radio, wmbus and pulse meters. The usb is good for second type but not useful in my case (radio based emters).

if you live in Leuven or around you can test my device before I return it back to German seller.

Apator AT-WMBUS-16-2 (I did not choose it myself, the building administration did)

I have some issues running this addon, not sure what is the cause of this, I created an issue for it:

As the HA Addon does have a config, I have added everything there, but since I´m using a USB stick called rtl433, I have a feeling that it does not fetch the added meter for decoding it.

I have decrypted the telegram correctly, so I know my KEM file is correctly decrypted, and the key I´m providing is working.

can anyone tell me what im doing wrong here? im not getting anything. got My HA on a RPI4 and with!
im871a stick on a 20m usb cable right next to the Multical21 watermeter. not getting any telegrams to set up the meter

Isn’t this why your wmbus adapter is not detected?