diff --git a/Dockerfile b/Dockerfile index 356e0e3..a773961 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # For more information, please refer to https://aka.ms/vscode-docker-python -FROM python:3.9-slim as base +FROM python:3.11-slim as base FROM base as builder RUN apt-get update \ diff --git a/README.md b/README.md new file mode 100644 index 0000000..357d113 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# DSMR 2 MQTT bridge + +## Introduction + +This bridigng component reads Dutch Smart Meter Requirements (DSMR) telegrams and sends them to a MQTT broker using the [Homie convention](https://homieiot.github.io/). The component is written in Python and is based on the execelent work of others: + +* [DSMR Parser](https://github.com/ndokter/dsmr_parser) +* [Homie4](https://github.com/mjcumming/homie4) + +![Works with Homie](https://homieiot.github.io/img/works-with-homie.png). + +## Configuration + +Create some environment variables (e.g. with a .env file) to specify the required settings: + +```bash +PYTHONPATH="." +MQTT_HOST=mqtt.local +DSMR_PORT=/dev/ttyUSB0 +``` + +If you have forwared the raw serial signal through ser2net, you should use `DSMR_PORT=remote://:`, e.g.: + +```bash +DSMR_PORT=remote://forwarding-pi.local:3333 +``` + +If you use credentials to access the MQTT broker, then alsp specify: + +```bash +MQTT_USERNAME= +MQTT_PASSWORD= +```