hansij66 / dsmr2mqtt

DSMR to MQTT; Smartmeter to MQTT; Slimme meter naar MQTT
GNU General Public License v3.0
9 stars 14 forks source link
dsmr dsmr-reader dsmr5 ha home-assistant mqtt p1 python slimme-meter

DSMR MQTT

MQTT client for Belgian and Dutch Smart Meter (DSMR) - "Slimme Meter". Written in Python 3.x

Connect Smart Meter via a P1 USB cable to e.g. Raspberry Pi.

Application will continuously read DSMR meter and parse telegrams. Parsed telegrams are send to MQTT broker.

Includes Home Assistant MQTT Auto Discovery.

In dsmr50.py, specify:

A typical MQTT message broadcast looks like:

{
"V1":226.0,
"V2":232.0,
"V3":229.0,
"database":"dsmr",
"el_consumed":24488767.0,
"el_returned":21190375.0,
"p_consumed":1130.0,
"p_generated":0.0,
"serial":"33363137",
"timestamp":1642275125
}

A virtual DSMR parameter is implemented (el_consumed and el_returned, which is sum of tarif1 and tarif2 (night/low en day/normal tariff)) - as some have a dual tarif meter, while energy company administratively considers this as a mono tarif meter.

Requirements

Install following python3 libraries

Test the P1 adapter & USB connection:

Test if P1 adapter is functional and is providing dsmr data by running in a bash shell:

Installation & Configuration

A test/dsmr.raw simulation file is provided. Set PRODUCTION = False in config.py to use the simulation file. No P1/serial connection is required.

Tested under Debian/Raspbian. Tested with DSMR v5.0 meter in Netherlands and Belgium. For other DSMR versions, dsmr50.py needs to be adapted. For all SMR specs, see netbeheer For Belgium/Fluvius, open your P1 port through Fluvius portal:

For encrypted P1/dsmr, there is a fork available.

Licence

GPL v3

Versions

4.0.2

4.0.1

4.0.0

3.0.0

2.0.0 - 2.0.1

1.0.13

1.0.12

1.0.2 - 1.0.4:

1.0.0: