Pysml
Decoder library for SML (Smart Meter Language) - specifically for the EMH ED300L meter
Install / Use
/learn @huirad/PysmlREADME
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
References Protocol
- Technische Richtlinie BSI TR-03109-1 - the main specification
- DLMS blue book - contains OBIS codes and measurement units
- EDI@Energy Codeliste der OBIS-Kennzahlen für den deutschen Energiemarkt
- Beschreibung SML Datenprotokoll für SMART METER
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
- Stefan Weigert - great approach, Python script
- msxfaq.de 1
- msxfaq.de 2
- volkszaehler.org
- schatenseite.de
- kabza.de
ED300L specific Links
- EMH ED300L
- Data Sheet
- User Manual
- Produkthandbuch - section 5.3 contains list of data sets
- Another list of the parameters
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 9600stty -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)
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
50PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
