Skip to main content

franklinwh-modbus-async

An async Python library for the FranklinWH aGate. It talks Modbus TCP and covers the SunSpec models and the vendor extension registers. It is built on modbus-connection.

This is the asyncio successor to franklinwh-modbus, which is synchronous. It aims to match that library's features and to fix its known connection and threading defects. To find out why it exists and how it compares, read docs/why.md.

Status: pre-alpha (Phase 0 of 7). The tooling and docs are in place, but there is no device API yet. See PLAN.md for the roadmap.

⚠️ Unofficial software

About this software

  • Not affiliated with, endorsed or supported by FranklinWH. FranklinWH and aGate are trademarks of their owners.
  • Provided as is, without warranty, for educational and informational use.

Write commands carry real risk

  • This library can send write commands to grid-connected battery hardware.
  • Used incorrectly, it can discharge your battery when you need it, import power you did not intend to, or leave the system in an unexpected state.
  • You use it at your own risk.

Getting help

  • Do not contact FranklinWH support about this library. Report problems here.

Requirements

  • An aGate with Modbus TCP enabled (ask your installer), reachable on TCP port 502. A fixed IP and a wired LAN are recommended.
  • Python 3.12 or later.

Install

The library is not on PyPI yet. To work on it from source:

git clone git@github.com:david2069/franklinwh-modbus-async.git
cd franklinwh-modbus-async
python3.12 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install
pytest

Roadmap

Phase Scope State
0 Scaffold, CI, PII guard, rationale docs ✅
1 Connection, SunSpec discovery, generated models, FakeAGate —
2 Typed reads and snapshot —
3 Control: M704 dispatch, watchdog, verify, native modes, safety —
4 Virtual modes, TOU schedules, sequencer, discovery —
5 CLI —
6 Emulator and hardware verification —
7 1.0 release, migration guide —

Documentation

Page
Why this library Purpose, basis, why async, why modbus-connection, and how it compares with the alternatives
modbus-connection findings Notes from reviewing the transport library
Plan Design decisions and phases
Changelog

Contributing

PRs are welcome. CI runs ruff, mypy --strict, pytest and a PII guard (tools/pii_check.py).

  • Placeholders only. In code, docs, examples and captured output, use:
    • 192.0.2.10 for hosts
    • FWH-SN-REDACTED for serials
    • 00:00:5E:00:53:00 for MAC addresses
  • Private terms. Put anything you want blocked in a local .pii-denylist. git ignores this file.

License

MIT. See LICENSE.

Metadata

Release files for franklinwh-modbus-async 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for franklinwh-modbus-async 0.0.1
File Size Uploaded
franklinwh_modbus_async-0.0.1.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for franklinwh-modbus-async 0.0.1
File Interpreter ABI Platform
franklinwh_modbus_async-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / franklinwh_modbus_async-0.0.1.tar.gz

Download URL franklinwh_modbus_async-0.0.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8a947fb96d4de59da9e130ece45c57f819bf03807a987a7d9e44f76b9b4da83b
BLAKE2b-256 checksum
How to use checksums
1e6aa43f90dcd1ce86d4d403c9c513836c81bf726a6932c835fe931d7bb5758b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / franklinwh_modbus_async-0.0.1-py3-none-any.whl

Download URL franklinwh_modbus_async-0.0.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7937d5d9f7862f83f4dd82318e4741231078aa986bf4d80d000220a2c02b19f8
BLAKE2b-256 checksum
How to use checksums
9e63c26398d1e3e7cb56db02d7f74155fd60ffe904ebe00b2b22733cb4de870a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page