Command-line interface to control GivEnergy systems via the local network
Project description
GivEnergy CLI
A command-line tool for monitoring and exporting data from GivEnergy inverters over the local network, built on givenergy-modbus.
Requirements
- Python 3.14+
- A GivEnergy inverter accessible on the local network
Installation
uv sync
After uv sync the givenergy-cli command is available at .venv/bin/givenergy-cli, or via uv run givenergy-cli.
Usage
host and port are shared options on the root command. They can also be supplied via the GIVENERGY_HOST / GIVENERGY_PORT environment variables.
tui — interactive terminal UI
uv run givenergy-cli --host 192.168.x.x tui
Live Inverter / Power Flow / Battery panels, a modbus log panel, and a status bar showing connection state and the time of the last refresh. The Inverter panel has collapsible Charge Slot and Discharge Slot sections. The status indicator cycles through Connecting… / Probing… / Reconnecting… / ● Connected / ● Disconnected to show the live transport state; an automatic reconnect is attempted whenever the connection drops.
| Key | Action |
|---|---|
r |
Refresh now (re-reads instantaneous measurements) |
Shift+R |
Full refresh — also re-reads the holding-register config blocks |
l |
Toggle the modbus log panel |
q |
Quit |
capture — record wire frames for a bug report
uv run givenergy-cli --host 192.168.x.x capture --output frames.log --duration 60
Connects and records raw redacted Modbus frames for the given duration (default 60 s). Writes one line per frame: a UTC timestamp and the hex payload. The output file is safe to attach to a GitHub issue.
probe — read an arbitrary register range
uv run givenergy-cli --host 192.168.x.x probe --type hr --base 4080 --count 60 --device 0x31
Issues raw Modbus read requests, bypassing the normal capability-driven polling. Useful for exploring undocumented register blocks — e.g. checking whether HR(4080+) holds battery energy totals on AC-coupled models. Requests are split into 60-register chunks automatically; timeouts are reported per-chunk rather than aborting the whole probe.
| Option | Description | Default |
|---|---|---|
--type / -t |
Register bank: hr (holding) or ir (input) |
required |
--base / -b |
First register address (decimal or 0x-hex) |
required |
--count / -n |
Number of registers to read | 60 |
--device / -d |
Modbus device address, decimal or 0x-hex (e.g. 0x11 inverter, 0x31 AC) |
0x11 |
export — dump registers to a portable JSON file
uv run givenergy-cli --host 192.168.x.x export -o plant.json
Connects, runs detect to discover the plant topology, loads the holding-register config, fetches the input registers, and writes every register from every discovered device address. Partial captures are still written on timeout, with a warning.
inspect — render an exported plant
uv run givenergy-cli inspect plant.json
Reconstructs the Plant from the JSON, then prints the Inverter and Battery model fields plus per-device raw register dumps (decimal + hex). No network required.
Environment variables
| Variable | Subcommand | Default |
|---|---|---|
GIVENERGY_HOST |
all | — (required) |
GIVENERGY_PORT |
all | 8899 |
GIVENERGY_REFRESH_INTERVAL |
tui |
15.0 |
GIVENERGY_LOG_LEVEL |
tui |
INFO |
Project structure
givenergy_cli/
__init__.py
__main__.py — Typer entry point (tui / capture / probe / export / inspect subcommands)
app.py — Textual TUI app
capture.py — frame-capture logic for bug reports
registers.py — export, load, and rich-formatted display of register dumps
tests/
fixtures/ — anonymised plant JSON fixtures (good + bad-enum cases)
Dependencies
| Package | Purpose |
|---|---|
givenergy-modbus |
Modbus TCP client and data model for GivEnergy inverters |
textual |
Terminal UI framework |
typer |
CLI argument parsing |
rich |
Console formatting for export / capture / inspect output |
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 givenergy_cli-1.3.0.tar.gz.
File metadata
- Download URL: givenergy_cli-1.3.0.tar.gz
- Upload date:
- Size: 102.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7365f5f52d9269f867acedc7bb9363e0a9ed75e09ba0f99a51504579330812b7
|
|
| MD5 |
44b20b3ee16d8dec84e11a6f828830fb
|
|
| BLAKE2b-256 |
ae7cedd1996a7a0aa7cf569bbf9ca2f2073d60796dc2d78713601b81a7c6bf0e
|
Provenance
The following attestation bundles were made for givenergy_cli-1.3.0.tar.gz:
Publisher:
release.yml on dewet22/givenergy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
givenergy_cli-1.3.0.tar.gz -
Subject digest:
7365f5f52d9269f867acedc7bb9363e0a9ed75e09ba0f99a51504579330812b7 - Sigstore transparency entry: 1697552660
- Sigstore integration time:
-
Permalink:
dewet22/givenergy-cli@4ebf88209aeab9b50dff7245783be29167748670 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dewet22
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ebf88209aeab9b50dff7245783be29167748670 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file givenergy_cli-1.3.0-py3-none-any.whl.
File metadata
- Download URL: givenergy_cli-1.3.0-py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e873b79a9c653a228106a95f36484f68edfee5f0e99824bbb7d416d7ee0e6d10
|
|
| MD5 |
6820115489f872c8f31d6cb2c22702f2
|
|
| BLAKE2b-256 |
a4db947fdd3415a8c86cbd5de5fbf26a46392ac2abea36dee47791d5a52e525f
|
Provenance
The following attestation bundles were made for givenergy_cli-1.3.0-py3-none-any.whl:
Publisher:
release.yml on dewet22/givenergy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
givenergy_cli-1.3.0-py3-none-any.whl -
Subject digest:
e873b79a9c653a228106a95f36484f68edfee5f0e99824bbb7d416d7ee0e6d10 - Sigstore transparency entry: 1697552698
- Sigstore integration time:
-
Permalink:
dewet22/givenergy-cli@4ebf88209aeab9b50dff7245783be29167748670 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dewet22
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ebf88209aeab9b50dff7245783be29167748670 -
Trigger Event:
workflow_dispatch
-
Statement type: