In my city, my electric and gas meters are more locked-down, but our water meters are pretty easy to monitor. Here’s a quick guide to how I brought my household water consumption data into HA with just a few steps.
Finding the meter
In my home, our water meter was hidden under a shelf in a basement bedroom closet. It’s probably close to the street, or in a box in the yard between the house and the street. (image removed because of new user link limits)
Test-run / see if you can read it
I purchased a SDR dongle - Amazon.com: Nooelec NESDR Mini USB RTL-SDR & ADS-B Receiver Set, RTL2832U & R820T Tuner, MCX Input. Low-Cost Software Defined Radio Compatible with Many SDR Software Packages. R820T Tuner & ESD-Safe Antenna Input : Electronics on Amazon. There were plenty of options, this one was available with early-next-day delivery.
The rtl_433 documentation at GitHub - merbanan/rtl_433: Program to decode radio transmissions from devices on the ISM bands (and other frequencies) helpfully had this entry on the list of devices:
[223] Badger ORION water meter, 100kbps (-f 916.45M -s 1200k)
which meant I knew what options to use.
When the dongle arrived, I ran rtl_433 with it plugged into my laptop on the second story of my house. I found a bunch of water meters - my own, and a few neighbors too.
I was able to distinguish which meter was mine based on comparing the volume_gal broadcast to the numbers displayed on the dials.
Move the dongle to home assistant
Now that I know which meter is mine, it’s time to move the dongle to my homeassistant yellow. I used pbkhrv’s addons (search for github link) to enable collection from the dongle. After adding the add-on repo, I installed only rtl_433.
This add-on created a new file I could see from the homeassistant ssh login - /homeassistant/rtl_433/rtl_433.conf.template
I edited that file to contain
frequency 916.45M
sample_rate 1200k
and restarted the add-on. Checking the logs from the add-on showed me that, yes, I was still receiving usage data from my water meter in the server rack (as well as one of the many meters I saw upstairs - perhaps my closest neighbor?)
Send the data to mqtt
I held back on adding mqtt output to the config file so I could verify the dongle could still get data in the new location. But since I’ve validated that, it’s time to start sending the readings to mqtt.
Install the mqtt add-on. I don’t think I needed to make any changes there, but I did create a user for mqtt in the UI. I added another line to the config template:
output mqtt://homeassistant.local:1883,user=<MQTT USER>,pass=<MQTT USER>
Once I restarted the add-on container, it was no longer printing data in the log, but exporting it to mqtt.
I was able to verify this by connecting mqtt explorer to my server (using the same user and port info). I now know my meter readings are making it into mqtt, and i have the state_topic needed for the next step.
Create the water meter entity
Now all I need to do is take that mqtt data and associate it with an entity.
First, I added an include to my configuration.yaml
mqtt:
sensor: !include watermeter.yaml
Then I created the watermeter.yaml file, like so:
- name: "Water Meter"
unique_id: <meter id>
state_topic: "rtl_433/<host id>-rtl433/devices/Badger-ORION/<meter id>/volume_gal"
unit_of_measurement: "gal"
device_class: water
state_class: total_increasing
I was able to get the state_topic details from my earlier mqtt explorer observation of the data.
Done
The first thing I did was to add a chart on my test dashboard.
type: history-graph
entities:
- entity: sensor.water_meter
title: Water Usage
hours_to_show: 168
… just an up-to-the-right chart of total increasing usage.
But this data works perfectly with the built-in Energy dashboard wizard to give nicer info, including usage per hour, etc.
(Please comment with tips and tricks, I’m entirely open to editing this guide to make it better)