Captures smart utility meter readings (water, gas, and electric) over radio using an RTL-SDR dongle and stores them in InfluxDB.
Uses rtlamr to decode ERT transmissions (SCM and SCM+ protocols) commonly used by US utility meters.
RTL-SDR dongle → rtl_tcp (TCP server) → rtlamr (decoder) → ingest.py → InfluxDB
A tmux session runs two panes:
- Left pane —
rtl_tcpexposes the RTL-SDR USB dongle as a network TCP server - Right pane —
rtlamrdecodes meter transmissions, filters for your meter ID, and pipes data throughingest.pyinto InfluxDB
- RTL-SDR compatible USB dongle (e.g., RTL2832U)
- macOS with Homebrew
- InfluxDB 2.x instance (the
.env.exampleassumes an Umbrel setup, but any InfluxDB 2.x will work) - tmux
-
Install dependencies:
brew install rtl-sdr rtlamr tmux
Python dependencies are installed automatically in a
.venvon first run. -
Clone the repository:
git clone <repo-url> cd utilitymeter
-
Create your
.envfile:cp .env.example .env
-
Edit
.envwith your values:Variable Description INFLUX_URLInfluxDB URL (e.g., http://192.168.1.100:8086)INFLUX_TOKENInfluxDB API token with write access to your bucket INFLUX_ORGInfluxDB organization name INFLUX_BUCKETInfluxDB bucket name (default: water_meter)WATER_METER_IDYour water meter's ERT endpoint ID GAS_METER_IDYour gas meter's ERT endpoint ID RTL_TCP_PORTHost port for the rtl_tcp server (default: 1235) -
Find your meter IDs (if you don't know them yet):
You can temporarily run rtlamr without a filter to see all nearby meters. Look for meter IDs that update consistently — those are likely yours. Set
WATER_METER_IDand/orGAS_METER_IDin.envonce identified. -
Plug in your RTL-SDR dongle and start the monitor:
./start.sh
-
Verify data is being captured in the right tmux pane. You should see lines like
Written: 12345as readings come in.
Readings are stored as:
- Measurement:
utility_meter - Tags:
meter_id,utility_type(water, gas, or electric),endpoint_type,msg_type,protocol_id - Fields:
consumption(cumulative meter reading),tamper(tamper flag)
The utility_type tag is automatically determined from the meter's endpoint type. You can query and visualize this data using InfluxDB's built-in dashboards, Grafana, or any InfluxDB-compatible tool.
- No output in the right pane — Make sure the RTL-SDR dongle is plugged in and recognized by the host.
rtlamrconnection errors — The right pane starts 2 seconds afterrtl_tcp. If it still fails to connect, check thatRTL_TCP_PORTmatches in both panes (default:1235).- Wrong or no meter data — Verify your
WATER_METER_IDand/orGAS_METER_IDare correct. If you're unsure of the message type, your meter may use a protocol other thanscmorscm+.
MIT