This package can be used to read values from a SMA inverter through Modbus TCP.
Project description
py-sma-modbus
This project is based on maluramichael py-sma-modbus and StefanLSA py-sma-modbus2 with the goal to make it more slim and available as a package.
If you prefer to use the functionality through a cli, I encourage you to use one of the above mentioned projects. This implementation is intended to be used as part of a larger code-base.
The solution is tested on my local sma inverter for some registers. I cannot guarantee full functionality and use this package, as always, on your own risk.
Example
from py_sma_modbus.modbus import Modbus
from py_sma_modbus.registers import Register
wr = Modbus(ipAdress="ip-address of the inverter, e.g. 192.168.178.12", ipPort=502, modbusUnit=3)
wr.poll_register(30535)
wr.poll_register(30531)
responses: list[Register] = wr.run()
for response in responses:
print(response.value)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_sma_modbus-0.2.0.tar.gz.
File metadata
- Download URL: py_sma_modbus-0.2.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1023-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bb3e6ec706bef64659ee7d454b4bf579993fc7c85306e7b249b70b09a44c343
|
|
| MD5 |
82f0a3f3a6018d051adf9a3dfbf434cc
|
|
| BLAKE2b-256 |
1a2f456e7384f3cc782720c7536c15ed151a12c729b757d1485d4818a552ce23
|
File details
Details for the file py_sma_modbus-0.2.0-py3-none-any.whl.
File metadata
- Download URL: py_sma_modbus-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1023-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d04ef30c14773f08a526a2eb5cfd6118e74b67a0a736c2fda74592eaf3858eb
|
|
| MD5 |
2e558968a196d0ccb548e486ee656510
|
|
| BLAKE2b-256 |
68f232f1d8d826915781d6fb8c9c9416396efebfd4429cc8e099453f55c1a571
|