Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

MarijnS95/iec62056-21-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IEC 62056-21

Publish DSMR P1 telegrams acquired over IEC62056-21 to MQTT.

-21 is the "Direct local data exchange" standard, defining how to communicate with meters directly. This is required for "smart" meters that do not feature a physical RJ12 P1 port but an optocoupler directly on the outside. By default these meters blink 1000 times per kWh, and need to be sent special command sequences from the IEC62056-21 standard to reply with a P1 telegram once (instead of continuously as is common across physical P1 ports).

Usage

Directly on HASS

(This is temporary, until the script is converted to a proper integration to supersede manual MQTT switch configuration below).

Clone this repository inside your /addons folder, and install the local addon from the HassIO store.

Set a device name in the configuration tab (used in published data lines as explained below) before starting the addon.

On an external machine (with access to MQTT)

Install the required dependencies through pip install -r requirements.txt, then start the script using:

$ ./iec62056_to_mqtt.py ZCF120ABd 192.168.1.1

To run it in the background:

$ nohup ./iec62056_to_mqtt.py ZCF120ABd 192.168.1.1 &

Output

Data lines will be published to <device_name>/iec62056_data_line/<address> where <device_name> is the first argument passed on the command line and <address> is an OBIS object identifier.

Note that on some meters, such as the ZCF120ABd, the A-B: prefix is not provided by the meter, only the C.D.E() fields are set.

About

Publish DSMR P1 telegrams acquired over IEC62056-21 to MQTT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published