Introduction
Modern utility meters communicate consumption data through standardized optical interfaces, but accessing that data typically requires either logging into the utility’s web portal (which may not offer real-time readings) or buying expensive commercial gateway hardware. Self-hosted smart meter readers bridge this gap by reading data directly from the meter’s optical port or wireless interface and feeding it into your home automation or energy monitoring system. This article compares three leading open-source solutions: the Volkszähler ecosystem, vzlogger, and ESPHome’s SML parser.
These tools all support the SML (Smart Message Language) protocol used by IEC 62056-21 compliant meters, which covers most modern electricity, gas, water, and heat meters installed across Europe. By reading OBIS (Object Identification System) codes, you can extract voltage, current, power, energy totals, and tariff information directly from the meter — no cloud dependency required.
| Feature | Volkszähler | vzlogger | ESPHome SML |
|---|---|---|---|
| Primary function | Full web dashboard + data collection | Lightweight data collection daemon | Firmware-level meter reading |
| Architecture | PHP web application + middleware | C/C++ daemon with plugin system | ESP32/ESP8266 microcontroller firmware |
| Hardware platform | Raspberry Pi / Linux server | Raspberry Pi / Linux server | ESP32, ESP8266, ESP32-C3 |
| Web dashboard | Built-in (charts, statistics, widgets) | None (feeds to external systems) | Home Assistant integration |
| Data storage | MySQL with middleware pipeline | Direct to InfluxDB, MQTT, or Volkszähler | Direct to Home Assistant |
| Meter protocols | SML, D0, IEC 62056-21 | SML, D0, IEC 62056-21, OMS, wMBus | SML via UART |
| Docker support | Docker Compose available | Docker image available | N/A (firmware) |
| GitHub stars | 230+ (volkszaehler.org) | 162+ (vzlogger) | 87,500+ (ESPHome core) |
| Resource usage | Moderate (web stack + DB) | Lightweight (headless daemon) | Minimal (runs on microcontroller) |
| Alerting | Via frontend widgets | External (MQTT → Home Assistant) | Home Assistant automations |
Volkszähler: The Full Dashboard Platform
Volkszähler (German for “people’s meter”) is a complete web application that reads, stores, and visualizes utility meter data. It consists of the vzlogger middleware daemon for data collection and the Volkszähler.org PHP frontend for visualization.
| |
The frontend provides interactive charts with zoom, multi-channel overlays, cost calculations based on tariff configurations, and export capabilities. Widgets can be embedded in external dashboards.
vzlogger: The Lightweight Data Collector
vzlogger (162+ GitHub stars) is the C/C++ daemon that handles the actual meter communication. While it’s often used as part of the Volkszähler stack, it can operate standalone, pushing data to InfluxDB, MQTT brokers, or any HTTP endpoint.
| |
vzlogger supports a wide range of meter protocols beyond SML: D0 (IEC 62056-21 Mode C), OMS (Open Metering System), wireless M-Bus (wMBus), and various proprietary formats. This makes it the most flexible option for multi-meter households with different meter types.
ESPHome SML Parser: Microcontroller-Level Reading
ESPHome (87,500+ stars) brings meter reading to low-cost ESP32 microcontrollers. The SML component reads SML telegrams directly via UART from an IR optical reader head or TTL interface.
| |
ESPHome’s SML integration pushes data directly into Home Assistant, where you can build energy dashboards, set up automations (e.g., notifications when power exceeds a threshold), and track consumption trends using the Energy dashboard.
Hardware Interfaces: Connecting to Your Meter
Smart meters expose data through several physical interfaces. The most common for DIY reading is the optical D0 interface — an infrared LED and phototransistor behind the meter’s front panel. An optical reading head (TCRT5000-based, ~€10-25) clips onto the meter face and converts IR pulses to a serial signal.
For wireless meters, a wMBus USB dongle (based on TI CC1101 or similar) can receive OMS telegrams broadcast by gas and water meters. The IMST iM871A-USB and Amber Wireless AMB8465-M are popular options supported by vzlogger.
Choosing Your Smart Meter Reader
The right choice depends on your existing infrastructure and goals:
If you already run Home Assistant: ESPHome with SML is the most power-efficient solution. An ESP32 draws under 1 watt and integrates natively with the Home Assistant Energy dashboard.
If you need a standalone dashboard: Volkszähler provides beautiful charts and statistics without requiring Home Assistant. It’s also the best choice if multiple household members need browser-based access.
If you have a heterogenous meter fleet: vzlogger standalone with MQTT output can handle different meter types (electricity SML, gas wMBus, water pulses) from a single Raspberry Pi, feeding data into InfluxDB and Grafana.
Why Self-Host Your Smart Meter Reading?
Utility companies collect meter data for billing but don’t always expose real-time readings to consumers, or they gate access behind proprietary apps that stop working when the manufacturer discontinues support. Reading your meter directly gives you second-level resolution on power consumption, voltage quality, and phase balance — data that enables informed decisions about solar sizing, heat pump optimization, and appliance-level energy auditing.
For integrating this data with broader home automation, see our ESPHome smart home bridges guide. If you’re building a complete energy management system, check our MQTT platform comparison for the messaging layer. For visualizing time-series data from your meters, our time-series database guide covers the storage backend options.
Deployment Architecture for Multi-Meter Households
In a typical home with separate electricity, gas, and water smart meters, a single Raspberry Pi running vzlogger can read all three simultaneously. Electricity data comes via the optical SML interface, gas via wMBus at 868 MHz, and water via pulse counting on GPIO pins. Data flows through MQTT to InfluxDB for long-term storage and Grafana for visualization. Home Assistant’s Energy dashboard consumes the MQTT topics to present a unified view of total household energy, water consumption, and associated costs.
For larger properties or multi-tenant buildings, deploy one ESP32-based reader per meter cluster connected over WiFi, with all data aggregating to a central MQTT broker and InfluxDB instance. This distributed architecture avoids long cable runs and isolates meter communication issues to individual reader nodes, making troubleshooting straightforward.
FAQ
Do I need permission from my utility company to read my own meter?
In most jurisdictions, the data on your meter belongs to you. Reading the optical port is non-invasive — it only receives the same data the meter broadcasts for its own display. However, physically tampering with meter seals or internal connections is illegal. Always use the optical port or wireless interface; never open the meter enclosure.
What if my meter uses a different protocol than SML?
Older meters may use the D0 protocol (IEC 62056-21 Mode C), which vzlogger and Volkszähler support natively. For pulse-output meters (flashing LED on the front panel), you can use an ESP32 with a photodiode and ESPHome’s pulse meter sensor. For Modbus meters common in industrial settings, ESPHome and vzlogger both have Modbus RTU/TCP support.
How often can I read data from the meter?
SML meters typically broadcast telegrams every 1-10 seconds continuously, so you can capture data at sub-second resolution. D0 meters require a request-response cycle and can be polled every 1-5 seconds depending on the meter model. The limiting factor is usually your data storage backend, not the meter itself.
Can I read gas and water meters with these tools?
Yes. Many modern gas and water meters broadcast consumption data via Wireless M-Bus (wMBus) at 868 MHz. vzlogger supports wMBus through USB dongles (iM871A, AMB8465-M). For pulse-output water meters, ESPHome’s pulse counter sensor can count each unit of flow and calculate consumption rates.
How does the total cost of ownership compare to commercial solutions?
A commercial smart meter gateway costs €80-300 and often ties you to a specific vendor’s cloud platform. A DIY solution costs €10-25 for an optical reading head plus an ESP32 (€5-10) or a used Raspberry Pi (€30-50). The open-source software is free, and you retain full data sovereignty — your consumption data never leaves your local network.
💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com**