hn / ginlong-solis

Solis inverter ESP8266 data logger, S3 WiFi stick reverse engineering and ESPhome firmware
76 stars 13 forks source link

S5-GR1P5K ModBus problems with holding registers #35

Open nextguyover opened 3 weeks ago

nextguyover commented 3 weeks ago

I'm currently using the ESPHome config provided here with a S5-GR1P5K inverter. All the 3000+ read registers are working correctly, all values are being read. However, I am not able to read from 3000+ holding registers.

E.g. when attempting to read the time (holding reg 3000-3005, so 3000-1 = 2999 = 0xBB7), I get the following error:

[W][modbus_controller:030]: Modbus device=1 set offline
[D][modbus_controller:043]: Modbus command to device=1 register=0xBB7 countdown=0 no response received - removed from send queue
[W][modbus_controller:064]: Modbus device=1 back online

I'm wondering whether the register range for settings is possibly different for my model of inverter? I've also tried some of the other possible ranges for time from the documentation PDFs in the readme. I tried 33022-33027, which is the expected range for an ESINV, but this also returns the same error. Range 43000-43005 actually returns data, but the data here doesn't seem correct for a timestamp.

hn commented 3 weeks ago

You're using the inv.yaml for the S5-GR1P5K, right? INV type inverters do not have any registers in the ten-thousands range, to my knowledge.

The inv.yaml has some existing logic to read and set the time (line 355) which works perfectly fine here. Try to de-adjust the inverter time via the LCD display, the yaml will correct it after some time.

nextguyover commented 3 weeks ago

Yep, that's what I've been using for the past few months, however the inverter time never got set correctly during this period.

I found out today that all holding registers in the 3000 range (including time, limit output power, and working mode were not sending back data (which, for the time lambda means the inverter time never gets set either), and the above error was being printed.

Unsure if directly writing to the holding register(s) would work, I haven't tried this.

hn commented 3 weeks ago

Hm, strange. Seems to be a general ModBus issue with this model and not specific to this project.

I suggest to contact Solis support e.g. for an updated inverter firmware.

hn commented 2 weeks ago

I'll leave this issue open for a while, please get back if you make any progress.