--- id: pysml version: "0.1.8" license: MIT license_treatment: permissive maintenance: active --- # pysml — Python library for EDL21 smart meters using Smart Message Language (SML) License: permissive · Maintenance: active · Downloads: 77.8K/mo ## What it is and what it does pysml is a Python library that reads and decodes Smart Message Language (SML) protocol data from EDL21 smart electricity meters. It abstracts away low-level SML parsing and provides access to OBIS meter values. The library supports multiple transport mechanisms—direct serial connections, serial-over-TCP bridges, and HTTP endpoints—making it flexible for different deployment scenarios. The package is actively used by Home Assistant's EDL21 integration and includes example code for publishing meter readings to MQTT. It depends on aiohttp, bitstring, and serialx for async HTTP, binary protocol handling, and serial communication. With MIT licensing and support for Python 3.11 through 3.14, it suits home automation, energy monitoring, and utility data collection workflows. Use it for: - Read energy consumption data from EDL21 meters in Home Assistant or other home automation systems. - Build an MQTT bridge to publish smart meter OBIS values to a message broker for real-time monitoring. - Collect meter readings over serial-over-TCP links in remote or networked meter deployments. - Parse and log SML protocol data from HTTP-accessible meter endpoints for analytics or billing systems. - Integrate smart meter data into custom Python applications for demand-side energy management. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and parses Smart Message Language (SML) data from EDL21 smart meters via serial ports, serial-over-TCP, or HTTP connections. Yes, if you need to read EDL21 smart meters. The library is actively maintained, has low install friction, carries no known vulnerabilities, and is proven in Home Assistant. MIT license is unrestrictive. Main consideration: ensure your meter model and transport method are supported, and your Python environment is 3.11 or later. ## Install pip install pysml uv add pysml poetry add pysml ## Installing pysml Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release 75 days ago. Requires Python 3.11 or later. License in practice: MIT license permits commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install pysml import pysml # Read SML data from serial port, serial-over-TCP, or HTTP endpoint # See examples/sml-mqtt-bridge.py for MQTT publishing pattern Requires Python 3.11 or later; meter must be accessible via serial, serial-over-TCP, or HTTP. Verify before relying: - Whether aiohttp, bitstring, and serialx are stable and well-maintained for production use. - Performance characteristics when reading from high-frequency meter streams or concurrent connections. - Completeness of SML protocol support and compatibility with specific meter models. - Whether example code for MQTT publishing is production-ready or demonstration-only. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 77.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags EDL21 smart meter reading, SML parser Python, smart meter data collection, OBIS value extraction, serial meter communication, smart message language, energy meter integration, smart-meter, energy-monitoring, iot-integration [View on SkillFed](https://skillfed.io/packages/pysml) · [View on PyPI](https://pypi.org/project/pysml/)