Added docs

This commit is contained in:
Ard Kuijpers
2023-02-12 14:26:37 +01:00
parent 521881a81a
commit 1732181fbb
2 changed files with 34 additions and 1 deletions

View File

@@ -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 \

33
README.md Normal file
View File

@@ -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://<hostname>:<port>`, 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-user>
MQTT_PASSWORD=<mqtt_passwrd>
```