Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maluramichael/py-sma-modbus
https://github.com/maluramichael/py-sma-modbus
modbus pv python sma
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/maluramichael/py-sma-modbus
- Owner: maluramichael
- Created: 2019-08-23T20:11:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-23T20:33:02.000Z (over 4 years ago)
- Last Synced: 2024-01-27T13:42:36.617Z (9 months ago)
- Topics: modbus, pv, python, sma
- Language: Python
- Homepage: https://malura.de
- Size: 51.8 KB
- Stars: 14
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py-sma-modbus
## Installation
```sh
git clone [email protected]:maluramichael/py-sma-modbus.git
cd py-sma-modbus
pip install -r requirements.txt
```## Usage
```sh
usage: main.py [-h] [-d] [-i INTERVAL] -a ADDRESS -p PORT -u UNIT
registers [registers ...]Gather data of your sma inverter
positional arguments:
registers list of register numbersoptional arguments:
-h, --help show this help message and exit
-d, --daemon keep polling
-i INTERVAL, --interval INTERVAL
time between polls
-a ADDRESS, --address ADDRESS
modbus ip
-p PORT, --port PORT modbus port
-u UNIT, --unit UNIT modbus unit
```## Examples
```sh
$ python main.py -i10 -a"192.168.178.46" -p502 -u3 30775
Namespace(address='192.168.178.46', daemon=False, interval=10, port=502, registers=[30775], unit=3)
30775 GridMs.TotW (Leistung) added
30775 GridMs.TotW (Leistung) => 4186
``````sh
$ python main.py -d -i1 -a"192.168.178.46" -p502 -u3 30775
Namespace(address='192.168.178.46', daemon=True, interval=1, port=502, registers=[30775], unit=3)
30775 GridMs.TotW (Leistung) added
30775 GridMs.TotW (Leistung) => 4193
30775 GridMs.TotW (Leistung) => 4194
30775 GridMs.TotW (Leistung) => 4194
30775 GridMs.TotW (Leistung) => 4193
30775 GridMs.TotW (Leistung) => 4194
30775 GridMs.TotW (Leistung) => 4190
``````sh
$ python main.py -d -i5 -a"192.168.178.46" -p502 -u3 30775 30529
Namespace(address='192.168.178.46', daemon=True, interval=5, port=502, registers=[30775, 30529], unit=3)
30775 GridMs.TotW (Leistung) added
30529 Metering.TotWhOut (Gesamtertrag Wh) added
30529 Metering.TotWhOut (Gesamtertrag Wh) => 2410952
30775 GridMs.TotW (Leistung) => 4190
30529 Metering.TotWhOut (Gesamtertrag Wh) => 2410958
30775 GridMs.TotW (Leistung) => 4186
30529 Metering.TotWhOut (Gesamtertrag Wh) => 2410964
30775 GridMs.TotW (Leistung) => 4189
```