Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

SMA-EM

> 编程语言
Open source

SMA Energymeter measurement

100 stars0 likes0 views
WebsiteGitHub

About

SMA Energymeter measurement

SMA-EM

a detailed german description could be found here https://www.unifox.at/software/sma-em-daemon/

translated by google https://translate.google.com/translate?sl=de&tl=en&u=https://www.unifox.at/software/sma-em-daemon/

SMA Energymeter / Homemanager measurement

sma-em-measurement.py: Python3 loop display SMA Energymeter measurement values

sma-daemon.py: Python3 daemon writing consume and supply values to /run/shm/em-[serial]-[value]

# HINT #
Sma homemanager version 2.3.4R added 8 Byte of measurement data.
This version trys to detect the measurement values on obis ids, so it should be save if new values were added or removed.

Requirements

python3 sys time configparser (SafeConfigParser) signal

some features require additional python modules features/README.md should give an overview of maintained features. features-outdated/README.md: other features untested because I do not have the appropriate hardware / software could be found in features-outdated.

Configuration

create a config file in /etc/smaemd/config

Use UTF-8 encoded configfile

Example:

…

Routing

maybe you have to add a route (example: on hosts with more than one interface)

bash
sudo ip route add 224.0.0.0/4 dev interfacename

Install / Copy (tested on Raspbian 9.1)

bash
sudo apt install git
sudo apt install python3 cl-py-configparser
sudo mkdir /opt/smaemd/
sudo mkdir /etc/smaemd/
sudo useradd -c "smaemd-user" -d /opt/smaemd -M -N -r -s /usr/sbin/nologin smaemd
cd /opt/smaemd/
sudo git clone https://github.com/datenschuft/SMA-EM.git .
sudo cp systemd-settings /etc/systemd/system/smaemd.service

Create a /etc/smaemd/config file

bash
sudo cp /opt/smaemd/config.sample /etc/smaemd/config

Edit the /etc/smaemd/config file and customize it to suit your needs (e.g. set SMA energy meter serial number, IP address, enable features)

bash
sudo nano /etc/smaemd/config

Update systemd

bash
sudo systemctl daemon-reload
sudo systemctl enable smaemd.service
sudo systemctl start smaemd.service

feel lucky and read /run/shm/em--

Testing

sma-em-capture-package - trys to capture a SMA-EM or SMA-homemanager Datagram and display hex and ascii package-info and all recogniced measurement values. Cloud be helpful on package/software changes.

Issues· 17 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言