Skip to content
forked from huirad/pysml

Decoder library for SML (Smart Meter Language) - specifically for the EMH ED300L meter

License

Notifications You must be signed in to change notification settings

HomeAsASystem/pysml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pysml

Decoder library for SML (Smart Meter Language)

What and why

Goal of this project is to create a compact python library for decoding SML output from a electric power meter or at least for the one which I am using (the EMH ED300L).

Side goal is to improve my personal skills in python programming.

References Hardware

References Software

From Volkszaehler::Software

References Protocol

On OBIS codes from DLMS blue book

  • An OBIS code consists of 6 octets A B C D E F
  • section 6 / 6.3.2 / 7.2.1: general structure
  • section 7.5: A = 1: Electricity
    • section 7.5.1: C = 1: Active Power +
    • section 7.5.1: C = 2: Active Power -
    • section 7.5.2.1: D = 8: Time Integral 1
    • section 7.5.3.2: E = 0: Total
    • section 7.5.3.2: E = 1: Rate 1
    • section 7.5.3.2: E = 2: Rate 2

References Protocol Analyis

ED300L specific Links

Simple Test: readout data with Linux command line

After plugging, the Weidmann Lesekopf is available as /dev/ttyUSB0

First set the device to 9600 bit/s, raw mode. In particular the raw mode is important!

  • stty -F /dev/ttyUSB0 9600
  • stty -F /dev/ttyUSB0 raw

Now read out the data and pipe through hexdump for nice formatting

  • cat /dev/ttyUSB0 | hexdump -e '16/1 "%02x " "\n"'

Or store it directly in a binary file for later analysis

  • cat /dev/ttyUSB0 > edl300_raw.bin

Own software - requirements

  • Python - portable between Windows/Linux/Raspberry Pi
  • Simple - no full SML decoder to reduce complexity
  • Robust - even if the ED300L specific format is assumed: implement saninty checks (expected values, crc)

About

Decoder library for SML (Smart Meter Language) - specifically for the EMH ED300L meter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%