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 givenergy_modbus.client import GivEnergyModbusClient
from givenergy_modbus.model.register_banks import HoldingRegister
with GivEnergyModbusClient(host="192.168.99.99") as client:
data = client.refresh()
client.write_holding_register(HoldingRegister.WINTER_MODE, 1)
# Data is returned as an instance of `model.Inverter` which allows indexing and attribute access
assert data.serial_number == 'SA1234G567'
assert data['model'] == 'Hybrid'
assert data.v_pv1 == 1.4000000000000001
assert data.v_battery_cell01 == 3.117
assert data.e_grid_out_total == 0.6000000000000001
assert data.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.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf8aa317f8fe9941fa17b72df9f4f2bb3183877be81c0de71eaff86ec2ca302 |
|
MD5 | a6404a5d677c704469399daf99926fc4 |
|
BLAKE2b-256 | 413ea33f8ef6a99ee6c81dc53ba15b6f2756f3e47061a4918b0675644a981ada |