Hello,
I have a Huawei SUN2000 6KTL-L1 Solar Inverter with WiFi interface. I like get data value from local Inverter without retrive from FusionSolar Cloud.
I try to get value from modbus-tcp with QModMaster and work. The problem is polling data with OpenHAB Modbus Binding. I search from forum community and found the same my problem (SUN2000-6KTL-L1 Modbus TCP).
After many test also with cli modbus command (mbpoll) I think I understand the openhab modbus binding problem:
If I try to execute this command from CLI
mbpoll [HUAWEI_LOCAL_IP] -1 -a 0 -r 30071 -c 1
it’s try 1 time, go in timeout and exit.
If I try polling (without -1 option)
mbpoll [HUAWEI_LOCAL_IP] -a 0 -r 30071 -c 1
this first time go in timeout but the second request return 342 (the correct device model).
The problem of mbpoll and OpenHAB Binding are that you try to send modbus message immediately after opening the TCP / IP connection. I modify source code of mbpoll and add 1 second of delay after open TCP/IP connection. The command return the value also after first command. Surely there is a bug on the inverter which requires some delay before being able to accept modbus messages
Unlike mbpool, OpenHAB Modbus Binding after command go in timeout, close the connection and opens a new one. It would be interesting to add a delay parameter after TCP/IP connection but before sending modbus commands. Do you think it is possible ?
The modbus id of the Inverter is correct to be 0.
Massimo