Unable to read Modbus Values from Huawei Wallbox

Installation OpenHab 5.1 on a Raspberry Pi 4

Im using a HUAWEI SUN2000-8KTL-M1 and added a Huawei Wallbox to my system.
It is displayed in the Fusion solar App and it`s working.
I added my Inverter to Openhab reading the values with modbus a year ago.
It works fine.
So I tried to add my wallbox also to Openhab
I got the registers from here https://github.com/evcc-io/evcc/discussions/10262
The value I need is Total Output Power (register 4108)
So I tried to add a Modbus Poller to my system and a data Modbus Reader
But after a view seconds I get an Error

21:02:26.583 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=4108, length=2, maxTries=3]). Aborting. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 2 [operation ID 8bba1d76-f4bd-4522-a4eb-977b85f66c47]

I don“t know hot to fix ist.

Modbus Error 2 means ā€œwrong address or register spaceā€. While register 4108 seems correct, are you connecting to the Inverter or the Wallbox? I’d think you need a new Modbus thing (bridge) to connect to the Wallbox for the Poller and Data things.

I contacted the Huawei support.
I’m connected to the converter whitch is correct.
There is no possibility to connect to the wallbox.
Maybe these registers are only available if the car is connected to load.
I’m waiting, but the car isn’t delivered until now:-(

Hi,

ok, I see - understand now the Inverter is feeding through the Modbus registers from the connected devices.

You may check out the register file here: huawei-solar-lib/src/huawei_solar/registers.py at v2 Ā· wlcrs/huawei-solar-lib Ā· GitHub

There is a section for the SCharger registers like this - maybe that works?

SCHARGER_REGISTERS = {
    rn.CHARGER_SOFTWARE_VERSION: StringRegister(30031, 16, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_ESN: StringRegister(30015, 16, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_MODEL: StringRegister(30078, 14, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_RATED_POWER: U32Register("kW", 10, 30076, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_PHASE_A_VOLTAGE_SENSOR: U32Register("V", 10, 30500, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_PHASE_B_VOLTAGE_SENSOR: U32Register("V", 10, 30502, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_PHASE_C_VOLTAGE_SENSOR: U32Register("V", 10, 30504, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_TOTAL_ENERGY_CHARGED_SENSOR: U32Register("kWh", 1000, 30506, target_device=TargetDevice.SCHARGER),
    rn.CHARGER_TEMPERATURE_SENSOR: I32Register("°C", 10, 30508, target_device=TargetDevice.SCHARGER),
}

Good luck!

1 Like