SmartHomeShop Docs

DSMR Reader (Docker)

DSMR Reader is an optional, self-hosted application for storing raw P1 telegrams and analysing electricity and gas usage over a longer period. It runs as a separate container service on a server, NAS or Raspberry Pi. The WaterP1MeterKit can forward a copy of every raw P1 telegram to its local REST API.

DSMR Reader is not required for the SmartHomeShop App or Home Assistant. Adding this forwarding package does not replace the normal WaterP1MeterKit entities and does not send data through the SmartHomeShop cloud.

What Is This For?

Use DSMR Reader when you want:

  • a separate, locally hosted archive of raw smart-meter readings;
  • DSMR Reader dashboards, comparisons and tariff calculations;
  • access to the original telegram data outside Home Assistant;
  • to keep this additional energy history on hardware you manage yourself.

The data follows this route:

  1. The smart meter sends a raw DSMR telegram through its P1 port.
  2. WaterP1MeterKit processes the telegram for its normal ESPHome, Home Assistant and SmartHomeShop functions.
  3. The optional package sends a second copy over your local network.
  4. DSMR Reader stores and visualises the reading in its own database.

The DSMR Reader project is free for non-commercial use. Review its current license before using it in a commercial or business environment.

What Is and Is Not Forwarded?

The package forwards the complete raw P1 telegram. DSMR Reader can therefore process electricity, tariff, returned-energy and M-Bus values that are present in that telegram, such as gas or a supported digital water-meter reading.

It does not forward separate WaterP1MeterKit measurements that are not part of the P1 telegram:

  • pulse-based water readings;
  • temperature and humidity;
  • leak input;
  • diagnostic and connection sensors;
  • calculated SmartHomeShop or Home Assistant entities.

Requirements

Before starting, you need:

  • a working WaterP1MeterKit connected through WiFi or Ethernet;
  • the device adopted in ESPHome Device Builder, so you can edit and install custom YAML;
  • a DSMR Reader container that is reachable from the WaterP1MeterKit on the local network;
  • the DSMR Reader REST API enabled and its API key;
  • the normal WaterP1MeterKit package that matches your hardware and network connection.

This guide is intended for WiFi and Ethernet configurations. DSMR Reader forwarding through the Thread firmware is not documented or supported.

1. Install DSMR Reader

Install DSMR Reader on a separate Docker- or Podman-capable host. Follow the official DSMR Reader container installation guide.

For an API-fed setup:

  1. Complete the container and database installation.
  2. Expose the DSMR Reader web interface to your local network. For example: http://192.168.1.10:7777.
  3. Remove or disable the direct /dev/ttyUSB0 device mapping in the Compose file when DSMR Reader does not use its own P1 cable.
  4. Confirm that you can open the web interface and sign in.

The official guide uses Podman, but also states that Docker and compatible Compose implementations can be used.

2. Enable the DSMR Reader API

The REST API is disabled by default.

  1. Sign in to DSMR Reader.
  2. Open Configuration.
  3. Enable the REST API.
  4. Copy the generated API key. DSMR Reader creates a random key by default and lets you replace it.

The WaterP1MeterKit package sends readings to:

http://<docker-host>:7777/api/v1/datalogger/dsmrreading

3. Add the API Key to ESPHome

Open the secrets.yaml file in ESPHome Device Builder and add:

dsmr_reader_api_key: "your_dsmr_reader_api_token"

Do not publish this file or paste the real key into a public support request.

4. Add the Forwarding Package

Open the adopted WaterP1MeterKit YAML. Keep the existing WaterP1MeterKit package for your hardware and add the DSMR Reader package below it:

substitutions:
  dsmr_reader_host: "http://192.168.1.10:7777"
  dsmr_reader_api_key: !secret dsmr_reader_api_key

packages:
  smarthomeshop.waterp1meterkit:
    github://smarthomeshop/waterp1meterkit/waterp1meterkit-v4/waterp1meterkit-wifi.yaml@main
  smarthomeshop.dsmr_reader:
    github://smarthomeshop/waterp1meterkit/packages/dsmr-reader.yaml@main

Replace 192.168.1.10 with the fixed local IP address or resolvable hostname of your DSMR Reader host. Keep your existing smarthomeshop.waterp1meterkit line when it uses a different hardware directory or the Ethernet package.

The forwarding package:

  • listens to the raw telegram already decoded by the normal DSMR component;
  • URL-encodes the telegram;
  • sends it as an authenticated HTTP POST;
  • logs a warning when the upload cannot be completed.

5. Validate and Install

  1. Select Validate in ESPHome Device Builder.
  2. Resolve any duplicate packages, substitutions or http_request configuration errors.
  3. Install the configuration wirelessly or over USB.
  4. Wait for a new P1 telegram.
  5. Check DSMR Reader for a recent reading.

Normal WaterP1MeterKit measurements continue even when DSMR Reader is offline. Failed telegrams are not queued for later delivery by this package.

Security and Reliability

  • Keep DSMR Reader and port 7777 on your trusted local network. Do not expose it directly to the internet.
  • Give the Docker host a fixed DHCP reservation so the configured address does not change.
  • Store the API key only in secrets.yaml. It is compiled into the ESPHome firmware.
  • Back up the DSMR Reader database according to its own documentation.
  • Avoid SD cards for long-term database storage; the official DSMR Reader documentation recommends more reliable storage.

Troubleshooting

No readings appear

  • Confirm that the WaterP1MeterKit itself receives current P1 values.
  • Open the configured address, such as http://192.168.1.10:7777, from another device on the same network.
  • Check that the REST API is enabled.
  • Verify the API key and the dsmr_reader_host value.
  • Check firewalls, VLAN rules and container port mapping.

The device logs DSMR Reader upload failed

The WaterP1MeterKit cannot reach the configured endpoint. Check the host address, port, DNS resolution and whether the DSMR Reader container is running.

DSMR Reader rejects the request

Create or copy a new API key in DSMR Reader, update secrets.yaml and reinstall the ESPHome configuration. Also confirm that the REST API is enabled.

Readings are duplicated

Use one input route per smart meter. Disable DSMR Reader's serial or network datalogger when the same telegrams are already supplied through this REST API forwarding package.

Official Resources