hn / ginlong-solis

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

S5-GR1P5K ModBus problems with holding registers #35

Open nextguyover opened 5 months ago

nextguyover commented 5 months 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 5 months 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 5 months 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 5 months 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 5 months ago

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

JGeeforce commented 1 month ago

Question: I have a S5-GR3P 6K, will I have this issue too when I will flash ESP firmware? Or is Modbus not used in the default setting?