
Evidence at a glance
Loading source evidence…
What was done
This emulator replicates the FranklinWH aGate Direct Connect and Modbus TCP protocols to enable testing without physical hardware. It provides a site model for battery and grid control, though it is not 100% accurate and does not connect to real aGate devices.
The franklinwh-gateway-emulator is a software-based imitation of the FranklinWH aGate designed for testing purposes without requiring physical hardware. It implements the undocumented Direct Connect local protocol on TCP port 9000 and the SunSpec Modbus TCP protocol, including FranklinWH extension registers. The emulator maintains a closed-loop site model that coordinates battery and port states. It supports running a single gateway or a fleet of them. The project documentation is available at The emulator does not connect to real aGate hardware. Users are cautioned that real gateways may have managed settings for grid profiles, import/export limits, and VPP restrictions; the emulator does not replicate these official management layers, and bypassing such settings on real hardware is at the user's risk. The software is provided as-is and is not 100% accurate, as it relies on incomplete documentation and observations of a limited number of real devices. Development of the emulator involved collaboration with Claude Opus 5.5, as documented in commit logs.
Reproduce it
python3.12 -m venv .venv && .venv/bin/pip install -e ".[dev]" && .venv/bin/franklinwh-emulator serve --port 5020 --dc-port 9000 --setup in-service
Community
Ask a question, share what worked, or follow the next milestone.