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.
m³ instead of m3 as unit of measurement.
