A python library to access GivEnergy inverters via Modbus TCP, with no dependency on the GivEnergy Cloud.
Project description
GivEnergy Modbus
A python library to access GivEnergy inverters via Modbus TCP on a local network, with no dependency on the GivEnergy Cloud. This extends pymodbus by providing a custom framer, decoder and PDUs that are specific to the GivEnergy implementation.
⚠️ This project makes no representations as to its completeness or correctness. You use it at your own risk — if your inverter mysteriously explodes because you accidentally set the
BOOMTIME
register, or you consume a MWh of electricity doing SOC calibration, you really are on your own.
- Documentation: https://dewet22.github.io/givenergy-modbus
- GitHub: https://github.com/dewet22/givenergy-modbus
- PyPI: https://pypi.org/project/givenergy-modbus/
- Free software: Apache-2.0
Features
- Reading all registers and decoding them into their representative datatypes
- Writing data to individual holding registers that are deemed to be safe
How to use
Use the provided client to interact with the device over the network:
from datetime import time
from givenergy_modbus.client import GivEnergyClient
client = GivEnergyClient(host="192.168.99.99")
client.refresh()
client.set_winter_mode(True)
# set a charging slot from 00:30 to 04:30
client.set_charge_slot_1(time(hour=0, minute=30), time(hour=4, minute=30))
# Data is returned as an instance of `model.Inverter` which
# allows indexing and direct attribute access
client.refresh()
assert client.inverter.serial_number == 'SA1234G567'
assert client.inverter['model'] == 'Hybrid'
assert client.inverter.v_pv1 == 1.4000000000000001
assert client.inverter.v_battery_cell01 == 3.117
assert client.inverter.e_grid_out_total == 0.6000000000000001
assert client.inverter.winter_mode
Credits
This package was created with Cookiecutter and the waynerv/cookiecutter-pypackage project template.
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
Hashes for givenergy_modbus-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e925bdcaed8637e5eef3ace2a592a7f65c86ef25fc44e4e194df1e0b088abf60 |
|
MD5 | 5c2716e5cbc9aeb0e51ad886bd5e3412 |
|
BLAKE2b-256 | 761d013cb15c873007896214dd3a2278c190521c50598e8ad6f6b3dd1c016e54 |