Skip to main content

Command-line interface to control GivEnergy systems via the local network

Project description

GivEnergy CLI

GivEnergy

license Ruff

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

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 / export / inspect subcommands)
    app.py         — Textual TUI app
    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 / inspect output

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_cli-1.0.0.tar.gz (96.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

givenergy_cli-1.0.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file givenergy_cli-1.0.0.tar.gz.

File metadata

  • Download URL: givenergy_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 96.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for givenergy_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4af741d55b591e57e610b33bef6c4a0fe90fb38d36a965def81d7d7d57616b75
MD5 ecc568ff143fd5469103bacb4203f382
BLAKE2b-256 165d0b4119dbfc8a35e307bbd37d1dbec0951cfe67ae5ec64be155b28994c696

See more details on using hashes here.

Provenance

The following attestation bundles were made for givenergy_cli-1.0.0.tar.gz:

Publisher: release.yml on dewet22/givenergy-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file givenergy_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: givenergy_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for givenergy_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4fcfeb1a4ab2a73fbf9c76a3ac56ba0f8e0f045f27bbd9b57641dab86e4dbe2
MD5 d165cb703b662de723b61ef9da39578f
BLAKE2b-256 ffe056c92ce17f1d6ad02c2f31ee9120068b2f07663d252f1e03cfee3943f691

See more details on using hashes here.

Provenance

The following attestation bundles were made for givenergy_cli-1.0.0-py3-none-any.whl:

Publisher: release.yml on dewet22/givenergy-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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