Modbus Errors on SunSynk

Hi All

I have just managed to get modbus connection working on SunSynk inverter after a struggle. I apologize, iam still very new to espHome, this is my first node and attempt with espHome. I noted that most of the values iam getting seem wrong. However i decided to start troubleshooting the most obvious first. In this it is the following lines

[E][modbus_controller:068]: Modbus error function code: 0x3 exception: 2 [E][modbus_controller:077]: Modbus error - last command: function code=0x3 register address = 0xC2 registers count=1 payload size=0

I noted that these errors appear, even when there is no sensors defined on Modbus. What do they mean.

hi all

seeing no response, I have a little bit more and enabled the debug on my device and the following is i what i noted

[00:37:58][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x4F count 1
[00:37:58][V][modbus:199]: Modbus write: 01.03.00.4F.00.01.B5.DD (8)
[00:37:58][V][modbus_controller:486]: Command sent 3 0x4F 1
[00:37:58][D][uart_debug:158]: >>> "\x01\x03\x00O\x00\x01\xB5\xDD"
[00:37:58][V][modbus:042]: Modbus received Byte  1 (0X1)
[00:37:58][V][modbus:042]: Modbus received Byte  3 (0X3)
[00:37:58][V][modbus:042]: Modbus received Byte  2 (0X2)
[00:37:58][V][modbus:042]: Modbus received Byte  0 (0X0)
[00:37:58][V][modbus:042]: Modbus received Byte  107 (0X6b)
[00:37:58][V][modbus:042]: Modbus received Byte  249 (0Xf9)
[00:37:58][V][modbus:042]: Modbus received Byte  171 (0Xab)
[00:37:58][V][modbus_controller:055]: Modbus response queued
[00:37:58][V][modbus:042]: Modbus received Byte  1 (0X1)
[00:37:58][V][modbus:042]: Modbus received Byte  3 (0X3)
[00:37:58][V][modbus:042]: Modbus received Byte  2 (0X2)
[00:37:58][V][modbus:042]: Modbus received Byte  19 (0X13)
[00:37:58][V][modbus:042]: Modbus received Byte  129 (0X81)
[00:37:58][V][modbus:042]: Modbus received Byte  117 (0X75)
[00:37:58][V][modbus:042]: Modbus received Byte  20 (0X14)
[00:37:58][V][modbus_controller:055]: Modbus response queued
[00:37:58][W][component:204]: Component modbus took a long time for an operation (0.11 s).
[00:37:58][W][component:205]: Components should block for at most 20-30ms.
[00:37:58][V][modbus_controller:063]: Process modbus response for address 0x4F size: 2
[00:37:58][V][modbus_controller:098]: data for register address : 0x4F : 
[00:37:58][D][modbus_controller.sensor:025]: Sensor new state: 107.00
[00:37:58][V][sensor:043]: 'SunSynk Grid Frequency (079)': Received new state 107.000000
[00:37:58][D][sensor:094]: 'SunSynk Grid Frequency (079)': Sending state 1.07000 Hz with 2 decimals of accuracy
[00:37:58][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[00:37:58][V][json:056]: Size after shrink 92 bytes
[00:37:58][V][mqtt:486]: Publish(topic='sunsynk/sensor/sunsynk_grid_frequency_079/state' payload='1.07' retain=1)
[00:37:58][W][component:204]: Component modbus_controller took a long time for an operation (0.07 s).
[00:37:58][W][component:205]: Components should block for at most 20-30ms.
[00:37:58][D][uart_debug:158]: <<< "\x01\x03\x02\x00k\xF9\xAB\x01\x03\x02\x13\x81u\x14"
[00:37:58][V][modbus_controller:063]: Process modbus response for address 0x5A size: 2
[00:37:58][V][modbus_controller:098]: data for register address : 0x5A : 
[00:37:58][D][modbus_controller.sensor:025]: Sensor new state: 4993.00
[00:37:58][V][sensor:043]: 'SunSynk DC Transformer Temperature (090)': Received new state 4993.000000
[00:37:58][D][sensor:094]: 'SunSynk DC Transformer Temperature (090)': Sending state 399.30002 °C with 1 decimals 

The values received seem incorrect, I am not sure if something is wrong on my device or not.

without verbose logging

18:02:53	[D]	[uart_debug:158]	

<<< "\x01\x83\x02\xC0\xF1\x01\x03\x04\x00(\x00(z%\x01\x83\x04@\xF3"

18:03:47	[D]	[sensor:094]	

'SunSynk WiFi Status': Sending state -48.00000 dBm with 0 decimals of accuracy

18:04:47	[D]	[sensor:094]	

'SunSynk WiFi Status': Sending state -45.00000 dBm with 0 decimals of accuracy

18:05:23	[D]	[uart_debug:158]	

>>> "\x01\x03\x00\x9A\x00\x01\xA4%"

18:05:23	[D]	[modbus_controller.sensor:025]	

Sensor new state: 11589.00

18:05:23	[D]	[sensor:094]	

'Grid Inverter Voltage (154)': Sending state 1158.90002 V with 1 decimals of accuracy

18:05:23	[D]	[modbus_controller.sensor:025]	

Sensor new state: 2261.00

18:05:23	[D]	[sensor:094]	

'SunSynk Battery Voltage (183)': Sending state 22.61000 V with 1 decimals of accuracy

18:05:23	[D]	[modbus_controller.sensor:025]	

Sensor new state: 30806.00

18:05:23	[D]	[sensor:094]	'Battery SOC (184)': Sending state 30806.00000 % with 0 decimals of accuracy
18:05:23	[W]	[component:204]	Component modbus_controller took a long time for an operation (0.05 s).
18:05:23	[W]	[component:205]	Components should block for at most 20-30ms.
18:05:23	[D]	[uart_debug:158]	<<< "\x01\x03\x02-Ed\xE7\x01\x03\x02\b\xD5~\e"
18:05:23	[D]	[uart_debug:158]	<<< "\x01\x03\x02-Ed\xE7\x01\x03\x02\b\xD5~\e"
18:05:23	[D]	[uart_debug:158]	>>> "\x01\x03\x00\xC2\x00\x01%\xF6"
18:05:23	[W]	[modbus:108]	Modbus CRC Check failed! 3051!=8479
18:05:23	[D]	[uart_debug:158]	<<< "_\x01\x03\x02\x00\x01y\x84"
18:05:23	[D]	[uart_debug:158]	>>> "\x01\x03\x00\xC2\x00\x01%\xF6"
18:05:23	[D]	[modbus:119]	Modbus error function code: 0x83 exception: 2
18:05:23	[E]	[modbus_controller:068]	Modbus error function code: 0x3 exception: 2 
18:05:23	[E]	[modbus_controller:077]	Modbus error - last command: function code=0x3  register address = 0xC2  registers count=1 payload size=0
18:05:23	[D]	[uart_debug:158]	<<< "\x01\x83\x02\xC0\xF1\x01\x03\x02\x00\x01y\x84"
18:05:23	[D]	[uart_debug:158]	>>> "\x01\x03\x01\f\x00\x02\x05\xF4"
18:05:23	[D]	[uart_debug:158]	<<< "l\x02\xC0\xF1\x01\x03\x04\x00(\x00(z%\x01\x83\x04@\xF3"
18:05:23	[D]	[uart_debug:158]	>>> "\x01\x03\x01\f\x00\x02\x05\xF4"
18:05:23	[D]	[modbus:119]	Modbus error function code: 0x83 exception: 2
18:05:23	[E]	[modbus_controller:068]	Modbus error function code: 0x3 exception: 2 
18:05:23	[E]	[modbus_controller:077]	Modbus error - last command: function code=0x3  register address = 0x10C  registers count=2 payload size=0
18:05:23	[D][modbus:119]	Modbus error function code: 0x83 exception: 4
18:05:23	[D][modbus:124]	Ignoring Modbus error - not expecting a response

Have you thought about using Solarassitant to interface sunsynk and home assistant?
Ask yourself if all your time is worth the £40 for the license??
Im using it and i think its great. Its written by the home assistant team it seems and is really good i its own right.
It gives far better graphing than HA currently is able to do

Did you ever figure this out? I’ve got exactly the same problem after about 6 months of flawless ESPHOME usage on HASS with a sunsynk inverter. Suddenly my battery SOC, Day PV and another variable would intermittently report absurdly high values.