Skip to content

ahplummer/utility_meter_collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utility Meter Monitor

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.

Architecture

RTL-SDR dongle → rtl_tcp (TCP server) → rtlamr (decoder) → ingest.py → InfluxDB

A tmux session runs two panes:

  • Left panertl_tcp exposes the RTL-SDR USB dongle as a network TCP server
  • Right panertlamr decodes meter transmissions, filters for your meter ID, and pipes data through ingest.py into InfluxDB

Requirements

  • RTL-SDR compatible USB dongle (e.g., RTL2832U)
  • macOS with Homebrew
  • InfluxDB 2.x instance (the .env.example assumes an Umbrel setup, but any InfluxDB 2.x will work)
  • tmux

Setup

  1. Install dependencies:

    brew install rtl-sdr rtlamr tmux

    Python dependencies are installed automatically in a .venv on first run.

  2. Clone the repository:

    git clone <repo-url>
    cd utilitymeter
  3. Create your .env file:

    cp .env.example .env
  4. Edit .env with your values:

    Variable Description
    INFLUX_URL InfluxDB URL (e.g., http://192.168.1.100:8086)
    INFLUX_TOKEN InfluxDB API token with write access to your bucket
    INFLUX_ORG InfluxDB organization name
    INFLUX_BUCKET InfluxDB bucket name (default: water_meter)
    WATER_METER_ID Your water meter's ERT endpoint ID
    GAS_METER_ID Your gas meter's ERT endpoint ID
    RTL_TCP_PORT Host port for the rtl_tcp server (default: 1235)
  5. 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_ID and/or GAS_METER_ID in .env once identified.

  6. Plug in your RTL-SDR dongle and start the monitor:

    ./start.sh
  7. Verify data is being captured in the right tmux pane. You should see lines like Written: 12345 as readings come in.

InfluxDB Data

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.

Troubleshooting

  • No output in the right pane — Make sure the RTL-SDR dongle is plugged in and recognized by the host.
  • rtlamr connection errors — The right pane starts 2 seconds after rtl_tcp. If it still fails to connect, check that RTL_TCP_PORT matches in both panes (default: 1235).
  • Wrong or no meter data — Verify your WATER_METER_ID and/or GAS_METER_ID are correct. If you're unsure of the message type, your meter may use a protocol other than scm or scm+.

License

MIT

About

Gets Data over the air from a Software Defined Radio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages