FranklinWH Gateway Emulator¶
An emulator of the FranklinWH aGate for testing without hardware. It serves the Direct Connect local protocol (TCP/9000) and Modbus TCP (SunSpec chain plus FranklinWH extension registers), both in front of one closed-loop site model, so control commands actually move the battery and both ports always agree. It runs one gateway or a fleet, with an optional web UI.
With --cloud-port it also serves the FranklinWH Cloud API, the REST API the
official FranklinWH app, franklinwh-cloud and homeassistant-franklinwh use, from the same
gateways, so cloud, Modbus TCP and Direct Connect clients all see one site. It never contacts the
real cloud.
Unofficial, and an emulation
Not affiliated with FranklinWH. It can never be 100% accurate: it may behave differently from a real aGate, now or in the future, and may have bugs or omissions a real aGate doesn't. Read the Disclaimer before relying on any result.

Start here¶
- Getting started: install, run one gateway or a fleet, use it from Python.
- Model baseline: the hardware, and how location, weather, placement and controls drive the model (with a diagram).
- Configuration: describe each site (aGate, aPowers, PV, grid, accessories, location) in a fleet file.
- Web UI: cards, the energy diagram, actions, TOU editor, sessions, grouping.
- What is emulated: protocols, firmware profiles, and the choices where sources disagree.
- FranklinWH Cloud API and Cloud API clients: serve the cloud's REST API and point a client (franklinwh-cloud, homeassistant-franklinwh, the official app) at it.
Reference¶
- Grid, grid codes, export limits and phases
- The site model: TOU, energy, location and time, weather, loads, generator
- Control API and
ctl - Scenarios and replaying recorded data
- Direct Connect, design, calibration, findings, weather and loads
Built for franklinwh-modbus, franklinwh-modbus-bridge and franklinwh-direct-connect-bridge.