Skip to main content

A python library to access GivEnergy inverters via Modbus TCP, with no dependency on the GivEnergy Cloud.

Project description

GivEnergy Modbus

pypi python Build Status codecov

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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

givenergy-modbus-0.7.0.tar.gz (36.6 kB view hashes)

Uploaded Source

Built Distribution

givenergy_modbus-0.7.0-py3-none-any.whl (28.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page