OpenAmpere

Device knowledge

These pages are technical. They collect what the OpenAmpere contributors have found out about the devices, each fact with its source and how sure it is. They show the latest state of development, which can be ahead of the version you have installed. They are not official manufacturer information. You don't need them to set up OpenAmpere; the app explains everything you need.

FoxESS H3, H3 Smart, H3 Pro

Not official manufacturer information: compiled by the OpenAmpere contributors, possibly incomplete or wrong. Changing inverter settings can affect warranty and grid connection rules. No affiliation with FoxESS or EKD, not legal advice. See Device knowledge.

Applies to: FoxESS H3 (classic), H3 Smart, H3 Pro, three-phase hybrid inverters with battery · Sold as: "Ampere.StoragePro E3" by EKD, 12 kW and 22 kW (which variant and register map is open; see names.md) · OpenAmpere: driver foxess, register maps foxess_h3_new (h3-new-map.md) and foxess_h3_legacy (h3-legacy-map.md) · Support: display and control · Confirmed on a real device: partly (H3 with newer firmware: reading and control; older firmware, H3 Smart, H3 Pro: no)

Summary

Registers

The register tables are on the map pages: new map (foxess_h3_new) and legacy map (foxess_h3_legacy). Only the model string is shared by both maps:

RegisterMeaningType, scale, signR/WStatusSource
30000–30015Model string, e.g. H3-10.0-Smart; 2 characters per register, high byte first, leading spaces strippedASCII, 16 registersR (detection tries FC04, then FC03; diagnostics' connection test reads 30000 with FC03 on extra connections)derivednathanmarlor/foxess_modbus; driver.py, diagnostics.py

Behaviour

Models and detection

FactStatusSource
OpenAmpere treats H3, H3 Smart and H3 Pro with one driver, labelled "FoxESS H3 / H3 Smart / H3 Pro". Connection: Modbus TCP, port 502, device address (unit id) 247; detection tries only 247 for FoxESS.derivednathanmarlor/foxess_modbus; registry.py, docs/registers.md
EKD sold storage systems based on the FoxESS H3 series as "Ampere.StoragePro E3". See names.derivedREADME
Model string patterns, checked in this order: H3-<kW>-Smart or H3-<kW>-M → H3 Smart (new map); H3-Pro-<kW> or P3-Pro-<kW> → H3 Pro (new map); H3-<kW> → classic H3 (legacy map).derivednathanmarlor/foxess_modbus; driver.py
Classic H3 devices with newer firmware answer on the new map; a classic H3-<kW> model string on the new map is normal.deriveddocs/devices.md, #11
The maps are told apart by their energy counters: 39601 (2 registers) answers on the new map, 32000 (2 registers) on the legacy map.deriveddriver.py
The rated power is part of the model string ([HP]3-(Pro-)<kW>, e.g. H3-10.0-Smart → 10 kW).deriveddriver.py
Firmware is in three registers (master, slave, manager): 36001–36003 on the new map, 30016–30018 on the legacy map. The serial number (30016–30031) exists only on the new map; on the legacy map 30016–30018 are the firmware registers.derivednathanmarlor/foxess_modbus; registers.py
Which function code serves the measurement registers is disputed: foxess_modbus reads the new map with FC03, other sources with FC04.opendocs/registers.md

Connection

FactStatusSource
Allows only very few Modbus TCP connections at a time. When all are taken, it accepts the TCP connection and closes it right away (FIN or reset) before any request; reads then fail with "connection reset by peer".confirmed#311, #312
The limit is "very few", not one (the first assumption in #311 was wrong): after a barely used Modbus setup in Home Assistant was removed, OpenAmpere connected while the previous IQ box stayed connected. The number may differ between systems.confirmed#311
Typical holders of the slots: Home Assistant Modbus setups, dashboards with their own collector (e.g. Grafana), own scripts, a second OpenAmpere, the previous IQ box (iq-box).confirmed#311, README
On one owner's device the diagnostics' connection test got 0 of 3 extra connections answered, so a second Modbus client (e.g. Home Assistant with foxess_modbus) and OpenAmpere block each other.confirmed#19, #44, #76
Recommended access: one persistent connection, requests strictly one after another, 1 s pause after connecting, 30 ms between requests, at most 100 registers per read, polling every 5–10 s.derivednathanmarlor/foxess_modbus; docs/registers.md, modbus.py
32-bit values have the high word at the lower address. Single registers are written with FC06, 32-bit values (remote power, export limit) with FC16, high word first.derivednathanmarlor/foxess_modbus; modbus.py, regs.py
More on connections and proxies: topics/modbus.md.––

Battery, BMS and measurements

FactStatusSource
The "battery temperature" register (37611 on the new map) is the temperature of the BMS electronics, not of the cells: on one owner's system about 15 °C above the cell temperatures, matching what another dashboard calls "BMS1 internal".confirmed#16, #41
A BMS-connected flag (37002 on the new map) reads 1 while the battery is connected.confirmed#19, #44
A second battery module (BMS2) has its own temperature registers on the new map; devices without it read zeros there or reject the block.derivednathanmarlor/foxess_modbus; driver.py, diagnostics.py
Datasheet of a FoxESS-based battery built from 3.3 kWh modules: maximum charge/discharge power depends on the usable capacity (6.6 kWh → 5.5 kW, 9.9 kWh → 8.5 kW, 13.2 kWh → 11.5 kW, 16.5 to 23.1 kWh → 12 kW), at most 50 A; 12,000 cycles; power reduced outside 21–35 °C, no charging below 0 °C.documentedbattery datasheet quoted in #23, #49
Rated cycle counts differ between batteries: datasheets state between 6,000 and 12,000 cycles.documented#49
An H3 reports three PV inputs even when only two module arrays are connected; the unconnected input has neither voltage nor power.confirmed#20, #38, #58
The inverter has no registers for an attached FoxESS AC EV Charger; the car's power is part of the house load and cannot be separated without reading the charger (ac-charger.md).documentedFoxESS inverter Modbus definition, nathanmarlor/foxess_modbus, OpenAmpere's maps; #318
Off-grid (backup) operation shows in bit 0 of 39065 (new map). On one owner's system a single reading had the bit set while several kW were exported, followed by minutes without readings: the bit can be set spuriously.confirmed#89, #90
An inverter and battery switched off on purpose were recorded as a power outage by OpenAmpere running on separate power.confirmed#93, #94
Assumed explanation for #93: disconnected at its AC switch, the inverter treats it like a grid failure, briefly runs in backup mode with the off-grid bit set until the battery is off too, then delivers no readings.open#93, #94

Energy counters

FactStatusSource
Counter resolution: new map 0.01 kWh, legacy map 0.1 kWh.derivednathanmarlor/foxess_modbus; registers.py, #194
Some newer firmware may report 0.01 kWh units but count in 0.1 kWh steps.open#194, #195
The daily counters measure PV on the DC side and house consumption on the AC side, so the daily balance does not close; the gap is the conversion loss in the inverter (on one owner's system several percent of the day's generation).confirmed#15, #36
The inverter's energy values deviate somewhat from the grid operator's meter and have gaps when the connection was disturbed.confirmed#60, #63
The inverter resets its daily counters by its own clock, possibly without daylight saving time.opencollector.py, diagnostics.py

Battery settings and work mode

FactStatusSource
Work mode, outage floor (min_soc, lowest SoC in backup/off-grid operation), charge limit (max_soc) and backup reserve (min_soc_on_grid) are holding registers on both maps (addresses on the map pages). Work mode values differ between the maps.derivednathanmarlor/foxess_modbus; registers.py
Control with the new map works on a real system: work mode, backup reserve and limits, remote control for grid charging, export limit. Earlier only partly confirmed (#25).confirmed#196, #197, #25
Owners' inverters can have the outage floor set to 0 % on the device.confirmed#69
Writing 0 % for the outage floor via Modbus: tested only in the simulator; foxess_modbus offers 10 % as the lowest value for writing but reads 0–100 %.open#72, nathanmarlor/foxess_modbus
A backup reserve below 10 % is accepted and kept by a real H3. The earlier 10 % floor was OpenAmpere's own limit (commented "FoxESS rules" without a source), not one of the inverter.confirmedtest on a real H3 in #313, #314
While the inverter is remote controlled (grid charging), it takes over a newly written backup reserve only a few seconds later; a read-back right after the write still shows the old value.confirmedtests at a real system, #322, #323
The previous smartbox fetches its targets from the EKD cloud about every 100 s and overwrites settings OpenAmpere wrote; an owner kept changes to the backup reserve and price-based grid charging after blocking the smartbox's internet access (iq-box).confirmed#25
There are no registers for scheduled charging windows; charging by electricity price therefore has to use the remote control.derivednathanmarlor/foxess_modbus; docs/registers.md
The export limit register (46616–46617) exists on the new map only; per foxess_modbus it belongs to the H3 Smart. It works on a real system with the new map. No register is known on the legacy map.confirmednathanmarlor/foxess_modbus; #196
The export limit usually equals 60 % or 70 % of the system's kWp, so its exact value reveals the system size.derived#149

Remote control (grid charging)

FactStatusSource
Remote control block: enable (a bit field on the new map: bit 0 on, bits 3:2 target; see 46001 on the new map), watchdog timeout in s, active power (I32 W, + = discharge/export, − = battery charges). New map 46001–46004, legacy map 44000–44003.derivednathanmarlor/foxess_modbus (remote_control_manager.py); registers.py
Order of writing: timeout first, then enable (each single with FC06), then the active power with FC16 (2 registers, high word first).derivednathanmarlor/foxess_modbus
According to foxess_modbus the inverter's watchdog ends remote control after the timeout without a new command, and a sensible fallback work mode should be set before activating it.derivednathanmarlor/foxess_modbus; docs/registers.md
On one owner's H3 the watchdog did not switch the remote control off: long after the 180 s timeout, 46001 still read 1 with 46002 = 180 (OpenAmpere's values) and 0 W. A leftover command then holds the battery at 0 W until 0 is written to the enable register.confirmed#141, #142
The earlier assumption that an active setpoint must be renewed all the time within the watchdog time turned out wrong (see the row above).confirmed#135, #136, #141
Suspected: the inverter restores its last remote control values after its own restart. On one owner's H3 OpenAmpere's values (1/180, 0 W) reappeared days after grid charging had ended and the storage had been switched off and on; OpenAmpere's switch-off had been verified before.open#143, #144
Other energy managers and the FoxESS cloud use the same registers. The previous smartbox was reported to use 46001 = 5 (on with the battery as target, per FoxESS's bit field), 46002 = 30 and to write 20162 = 1.derivednathanmarlor/foxess_modbus; docs/registers.md, #141
With 46001 = 1 (target AC) the power setpoint applies to the inverter's AC side, not to the battery. A charge setpoint is taken in at the AC side on top of PV: the house is supplied from the grid, and when the battery cannot take PV plus import, the inverter curtails PV. With 0 W nothing leaves the AC side: the house runs from the grid, PV only charges the battery, and with a full battery PV is curtailed completely. foxess_modbus regulates its import against the battery's charge limit for this reason; evcc dropped holding the battery with 0 W because it curtailed PV on real hardware.derivedFoxESS Modbus interface definition V1.05.04.00, table 3-8; nathanmarlor/foxess_modbus (remote_control_manager.py, force charge); evcc (templates/definition/meter/fox-ess-h3-smart.yaml); #509
Without PV (at night) target AC and target battery charge about the same, apart from conversion losses; grid charging working on a real H3 (#196) fits both. The difference shows in the sun.derived#509
Whether PV was curtailed while the leftovers of #141 and #143 (1 / 180 s, 0 W) were on was not checked.open#141, #143, #509
The inverter does not respect its own charge limit (max_soc) during forced charging; the software must stop by itself at SoC ≥ max SoC.derivednathanmarlor/foxess_modbus via docs/registers.md; #242
The sign of the power setpoint (negative = battery charges) is not verified on every device.opencharging.py
During grid charging the battery may legitimately stop taking power: the inverter's charge limit is below the target, the BMS tapers near full, or the battery is derated because of its temperature.derived#218, #225
If the power setpoint is refused after the enable was written, the remote control stays on with whatever power the inverter holds (0 W or another controller's value); re-enabling on every tick keeps the watchdog from ending it.derived#258, #261
At one installation grid charging seemed to stop at the backup reserve instead of the target, and raising the reserve let it charge further (led to 0.23.1).confirmed#315, #316
A later test on a real system showed the reserve is not the general cause: charging past the reserve worked before 0.23.1. Left over: a battery that starts below the reserve stops at the reserve instead of going on to the target; cause unclear.open#320, #321
FoxESS's Modbus definition defines the timeout (46002) and a read-only countdown (46007, s) but not what the inverter does when the countdown ends. No other function that stops or limits the inverter when an external controller falls silent was found in it; the remote control timeout is the only mechanism known.documented (timeout, 46007; no other such function in the definition)FoxESS Modbus interface definition V1.05.04.00, table 3-8; iq-box.md
A lost grid meter is an alarm ("Meter Lost"). On the H1/AC1, FoxESS states that a lost CT connection turns the system off within 5 s (export limiting fail-safe); for the H3 no such statement was found.documented (alarm, H1), open (H3)FoxESS Modbus interface definition V1.05.04.00; FoxESS H1/AC1 G100 declaration (2021)
How the inverter reacts to an active remote command during a power cut (backup operation) has not been checked on a real device.open#242, #246

Decisions in OpenAmpere

DecisionWhyIssue/PR
The model string is only a hint: the map is always confirmed by the counters (39601 → new map, else 32000 → legacy map), the new map is preferred, a device answering on neither is unsupported. A new-map model string answering only on the legacy map is logged as a warning.Older H3 devices with newer firmware use the new map.driver.py, docs/devices.md
The read function code is detected: the start of the map's last block is probed with the map's native code first (new FC04, legacy FC03), then the other one.The sources disagree.driver.py
Register map and read function can be chosen by hand (Mehr → Verbindung → Für Experten), e.g. behind a data logger that hides the model string. Settings are then written only if the model string matches a FoxESS pattern or the counter registers of that map answer; otherwise the device is read-only with a warning.Before, any Modbus device at that address could receive settings and remote commands.#279, #280
The rated power from the model string limits the remote power (−rated..+rated W, 10 kW when unknown) and the export limit.Plausibility limit before writing.driver.py
OpenAmpere waits 1 s after connecting; a connection closed in that time is reported as "busy" ("Modbus-Gerät, gerade belegt", until #433 "Wechselrichter, gerade belegt") instead of an unknown device. Tested only against local test servers.A FoxESS with all slots taken closes the connection before any request.#311, #312
The optional connection test opens 3 extra connections, reads 30000 on each and checks whether the main connection survived.Shows whether other programs can read in parallel.diagnostics.py, #19
OpenAmpere stays the only Modbus client; Home Assistant gets data and control through OpenAmpere's external API.Few connection slots; two writers would overwrite each other's settings.#76, #77
From Home Assistant at most 6 changes per hour per battery setting; the export limit and the remote power are not offered to Home Assistant.Protects against looping automations and wear of the settings memory; the export limit is legally sensitive.#76, #77, docs/homeassistant.md
Limits: 0 ≤ outage floor ≤ backup reserve < charge limit ≤ 100; the charge limit is at least 10 %. The reserve can be set from 10 % freely and below 10 % (down to the outage floor) only with an explicit confirmation every time, with a warning; Home Assistant cannot confirm. The driver's own check allows 0–100 % for floor and reserve, 10–100 % for the charge limit.Owners' devices have 0 % as outage floor (#69); a real H3 keeps a reserve below 10 % (#313), but deep discharge can shorten battery life and affect the warranty.#69, #72, #313, #314
Limits are written one register at a time in an order that keeps every intermediate state valid.A plain order can pass through an invalid set of limits.#203, #208
Every written setting is read back; the read-back is repeated after 1, 2 and 3 s before a mismatch is reported. Written values are read again 45 s and 150 s after a write.Delayed take-over under remote control (#322); the previous smartbox overwrites values about every 100 s (#25).#322, #323, control.py
The export limit can only be raised with control enabled and the declaration that the grid operator's written approval is on hand; its reference is logged. Lowering is always possible.The limit is part of the grid connection approval.docs/registers.md, control.py
Grid charging uses the remote control with a 180 s watchdog and re-sends the command; order timeout → enable → power.No scheduled charging registers; the watchdog ends charging if OpenAmpere stops.charging.py, driver.py
Grid charging levels are 50/75/100 % of a configurable permitted battery charge power (from the datasheet), capped at the inverter's power; higher values are rejected.The earlier 30/60/100 % of the inverter's power was too much for small batteries.#23, #49
Grid charging charges only up to min(target, inverter's charge limit); the charge limit is read at most every 10 minutes (100 % if unreadable) and the remote control is released when it is reached.The inverter ignores its charge limit during forced charging.#242, #246
Once per session, 90 s after the first command, OpenAmpere checks that the battery charges. Not charging within 5 % below the inverter's charge limit pauses without error (restart after the SoC dropped by 5 %); not charging far below it is a fault (stop, error, grid charging off). A battery at most 5 % above its reserve gets up to 10 minutes before it counts as a fault (all devices).A normal end of charge must not count as a fault; the sign is not verified on every device. A battery that switched itself off at its reserve took longer than 90 s to take a charge again (SAJ). Simulator tests.#218, #225, #666
A refused remote command releases OpenAmpere's own remote command at once, logs "Befehl abgelehnt" and is not retried in the same quarter hour.A half-applied command must not leave the remote control on.#258, #261
Grid charging tick and stop are serialised with a lock.A stop during a running tick must not be followed by the tick switching the remote control on again.#271, #272
OpenAmpere switches the remote control off only while it shows OpenAmpere's own values (enable 1 or 5 with its 180 s timeout; 1 also from older versions); never another device's (e.g. the smartbox's 5/30, recognised by its timeout). Release: read enable and timeout, write 0, read back after 0, 1, 2, 3 s, error if still on. Releasing is written even with the master switch off or in test mode.Switching off is the safe direction, but OpenAmpere ends only what it started; the watchdog may leave the switch on (#141).#141, #142, #297, #298, #509
Ownership of the remote command is stored persistently (remote_command meta), not only in memory; a pending release is retried on every tick without charging.The in-memory flag was lost after a restart or when the driver object was replaced.#141, #142
For 10 minutes after each new connection, a remote command with enable 1 or 5 and exactly 180 s counts as OpenAmpere's own and is switched off while OpenAmpere does not charge. Another controller using exactly these values would be switched off as well.Suspected restore of the values after an inverter restart (#143).#143, #144, #377, #509
Grid charging writes 46001 = 5 (target battery) on the new map when 46007 is readable (its own read, a refusal tolerated) and 5 reads back the first time on a connection (checked after the power is written, so the inverter never follows an old setpoint meanwhile). Otherwise it writes 1 (target AC) as before, says why in the control log (at the start and when it changes during a charge) and in the diagnostics, and goes on charging. A refused 46007 or a 5 not read back is remembered for the connection; a read that gets no answer for now only affects that command and is not logged. The legacy map keeps 1.Target AC curtails PV during grid charging in the sun, and a leftover 0 W command curtails it completely. 46007 marks the newer layout of 46001 (bits 3:2 changed in the definition versions V1.05.01 and V1.05.02); a read-back of 5 alone does not prove that older firmware reads bits 3:2 the same way.#509, driver.py
0.23.1 raised the backup reserve during grid charging; rolled back in 0.24.0. A reserve still raised by 0.23.1 is set back to the owner's value (also with the master switch off or in test mode), only for a device with supports_control, a valid stored pair and within the current limits; otherwise nothing is written.The reserve was not the general cause (#320); setting back is the safe direction.#315, #316, #320, #321, #350, #367
With cell temperatures available, the battery temperature shown is the cell range; 37611 is labelled "electronics (BMS)".37611 is not the cell temperature (#16).#41
All PV inputs the inverter reports are listed in the settings (also hidden ones); in the analysis an input without yield over the whole period counts as unconnected, unless no input produced anything. Hidden inputs are still stored.Unconnected third input (#20).#40, #61
The flow direction to or from the grid is shown only from 50 W.Small values looked like export at 0.0 kW.#20, #45
An outage starts only with the second off-grid reading in a row (at most 5 minutes apart); the bit is ignored while the grid meter shows more than 100 W flow. Notifications and Home Assistant follow the confirmed outage.The bit can be set spuriously (#89).#89, #90
A gap in readings during an outage means "battery probably empty" only if the SoC before was at most 15 %; if OpenAmpere polled in vain it is "inverter not reachable" (takes precedence); otherwise missing readings.Originally any gap over 5 minutes meant "battery empty"; a deliberately switched-off inverter counted as outage (#93).#52, #90, #94
Outage records compute house consumption and the shares from sun and battery from the inverter's lifetime counters.–#52
The measured consumption is kept and the daily gap shown as "losses in the inverter"; on the first day the inverter's daily counters are used for the whole day.DC/AC measuring points (#15); recording covers only the time since installation.#15, #36
Billing uses the grid operator's meter values where available, inverter values otherwise.Inverter values deviate and have gaps (#60).#60, #63
The counter step comes from the driver (new map 10 Wh, legacy 100 Wh) and is detected from recorded quarter hours; 0.1 kWh counters are shown with one decimal.Some firmware may count coarser than its unit.#194, #195
Diagnostics record the observed reset times of the daily counters and warn when they are not 00:00–00:02.The inverter's clock may differ (daylight saving time).collector.py, diagnostics.py

Open questions

Sources

View and improve this page on GitHub