FoxESS FoxESS Avocado (pv) Modbus TCP template

FoxESS Avocado (pv)

The FoxESS Avocado is a compact all-in-one balcony PV storage system combining a bidirectional inverter, battery, and PV inputs in a single unit. Sold under the Avocado, Avocado Pro, ONE, and MQ2200 names, it targets residential and small-site installations with plug-and-play AC connection. This Modbus TCP template reads two core PV registers over port 502: instantaneous total PV input power (address 39118) and cumulative PV energy generation (address 39149). Connecting the ModbusCloud Gateway to the same LAN as the Avocado gives you continuous PV yield visibility without relying on the FoxESS cloud.

Protocol
Modbus TCP
Connection
Ethernet, Modbus TCP
Registers
2, read only
Brand
FoxESS
Compatible models
Avocado · MQ2200 · ONE · Avocado Pro
Last updated

Registers (2)

2 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
powerWRead
energyWhRead

Loading registers…

Send your device list

If a device is not in the library yet, we build the template for free as soon as we have the register data.

Number of installations (optional)

Use cases

  • Monitor real-time total PV input power to verify panel output matches expected irradiance conditions.
  • Track cumulative PV energy generation over time to produce monthly yield reports for building owners.
  • Alert on sustained zero power readings during daylight hours to detect inverter faults or connectivity loss.
  • Compare daily PV generation trends across seasons to identify gradual panel degradation.
  • Verify PV production figures against utility import data to confirm self-consumption ratios on a site.

Installation

  1. Connect the Avocado to your local network via its LAN port or Wi-Fi, then confirm Modbus TCP is active by opening a TCP connection to the device's IP address on port 502. No separate Modbus enable step is required on most firmware versions.

  2. Connect the ModbusCloud Gateway to the same network segment as the Avocado, ensuring no firewall rules block port 502 between the Gateway and the inverter IP address.

  3. In the ModbusCloud portal, add a new device, import the FoxESS Avocado (pv) template, and set the unit ID to 1. Assign the Avocado's LAN IP address as the target host.

  4. Trigger a manual poll in the portal and spot-check register 39118 against the live PV output shown on the Avocado's LED display or app to confirm correct data flow.

Things to watch for

The gateway connects but both registers read zero at midday.

Register 39118 reports total PV input power as a signed 32-bit integer scaled by 1000 (value in milliwatts divided by 1000 gives watts). If the raw value looks correct but the displayed figure is zero or implausibly small, verify that the portal template is decoding the register as int32 and not int16. Reading only the lower word of a 32-bit pair will return zero when the upper word is non-zero.

Modbus poll returns exception code 1 (illegal function) on register 39118.

The Avocado firmware on some variants restricts which register ranges respond to function code 3. Confirm you are using FC3 (holding registers) and that the unit ID is set to 1. Some firmware versions do not expose the full register map without a prior authentication or specific firmware update. Check the FoxESS Modbus protocol document version against your device firmware.

The gateway receives a response but the unit ID in the reply is 0, not 1.

A known behavior on certain Avocado firmware builds is that the device responds with unit ID 0 regardless of the requested ID. In the ModbusCloud Gateway configuration, enable the option to accept responses with unit ID 0, or set the configured unit ID to 0 and verify that readings then appear correctly.

Cumulative energy at register 39149 seems too low or resets unexpectedly.

Register 39149 stores cumulative generation as a uint32 value scaled by 100 (the raw value divided by 100 gives kWh). Ensure the template applies the correct scaling. A value that resets may indicate a firmware update that cleared non-volatile counters. Cross-check against the FoxESS app total generation figure to confirm baseline.

Want to see how it works?

Electrician working in an open distribution board