ESPHome modbus Growatt ShineWiFi-S

Hi. You can try remove the inverter from your account and create a new one then add the inverter.

I was setup by the installer. I will have a chat with them tomorrow. Thanks for the speedy reply.

Maybe because you have a installer code you won’t be authorized to change values.
You may have to choose between guarantee or automations.

I did find this: (register 381)

image
image
I will reprogram and see if i can read it.

Maybe its not relevant.
- platform: modbus_controller
name: "${devicename} password setting"
address: 381
register_type: "read"
value_type: U_DWORD
accuracy_decimals: 0
image

I have a SPH6000 and a similar problem. My plan is to build a RS232 sniffer (https://www.lammertbies.nl/comm/cable/rs-232-spy-monitor) and insert it between the inverter and my stock wifi stick and then send instructions from server.growatt.com to see exactly what is going on.

On the ESP is the hardware serial not on pin 1 and pin 3? I think pin 4 is flow control.

Hi. Why you don’t use you 485 port?

+1 for someone who can make a video how to flash the Shine S.

Because the RS232 is already there and I have the hardware to plug into it. I may go 485 if I have to, but for now I’d like to use the Shine-S I already have. Actually I have 2, one I’m using as a test mule and one I’m keeping stock.

ok, i agree with you. try to use the verbose or very_verbose to see if any codes appear.

logger: level: VERBOSE

Really love your home assistant layout can you share config? :smiley:

Does Grid first work for you?

I think I may have found the issue on the SPH.


That suggests its not as easy as other inverters, in that more settings need to exist. I have found a different modbus register https://www.amosplanet.org/wp-content/uploads/2022/12/通信协议MAX_Growatt-Inverter-Modbus-RTU-Protocol_II-V1_13_20190116-English.pdf which includes options for the additional settings. I have not had a chance to explore how I’m going to do the bitmasks Modbus Controller — ESPHome but will look at it tomorrow. e.g.

I think the SPH6000 is just ignoring the write to 1044 as it is superceded by other registers Sniffing RS232 comms between SPH6000 and a Shine-S - #4 by scudderfish

Yes, but you need to first go the the Growatt web and enable one of the slots for grid first and set it to 00:00 - 23:59 and On, then you can change the overall priority via modbus… You can of course also set the slots via registers but I didn’t bother setting that up.

3 Likes

I was just about to set up my config so that on boot it sets up the first slots for grid/battery/load to 00:00-23:59 and then use the three enable toggles to switch as necessary :slight_smile:

I’ve admitted defeat and I’ve stopped using my Shine-S stick. I was getting a better config but it started crashing with occasional out of memory errors in the logs (if they made it that far). It crashed so hard I had to strip it down and reflash over serial.
I bit the bullet and bodged up an ESP32, an adjustable buck converter, a DB9 port and a MAX232 chip and once I’d got TX and RX the right way around on the DB9 it works swimmingly


The advantage I see of sticking with 232 over 485 is there is a very convenient 12v on pin 9 of the DB9 to power this abomination. Once I’m happy with it all I’ll make something neater and stick it in a case.

All hail the ESP32! :slight_smile:

1 Like

Thanks, this was the last bit of guidance I needed. It might still be good to add something to adjust the power from 5 - 100%; will check during the easter break if I can build upon your design.

I had to setup a similar time slot for battery (00:00 - 23:59) to get that one going. I can now do 4 things with the battery using HA:

  1. Load from grid at maximum charging speed (Battery / AC Charge on)
  2. Use current consumption in the house from grid (Battery / AC Charge off)
  3. Use solar for house consumption and export excess to grid (Load)
  4. Discharge battery to Grid (Grid)

This is everything I had hoped for. Thanks for your help @Plawa - installed the SPH 8k today and my local control is fully operational thanks to you and others on this forum!

2 Likes

That was a lot easier than expected - below 4 write settings to adjust charge speed, charge max SoC, discharge speed, discharge min SoC; all for the SPH 3phase series but most likely compatible with SPA as well - tested this on my set up and this works great; use case, reduce charge speed when simultaneously charging car (to avoid blowing the fuses); automating charging and discharging to a specific SoC to get you “through the night” etc:

number:
  - platform: modbus_controller
    name: "${devicename} Discharge SoC"
    address: 1071
    value_type: U_WORD
    min_value: 10
    max_value: 100
    step: 1

  - platform: modbus_controller
    name: "${devicename} Discharge Power Rate"
    address: 1070
    value_type: U_WORD
    min_value: 10
    max_value: 100
    step: 1

  - platform: modbus_controller
    name: "${devicename} Charge SoC"
    address: 1091
    value_type: U_WORD
    min_value: 10
    max_value: 100
    step: 1

  - platform: modbus_controller
    name: "${devicename} Charge Power Rate"
    address: 1090
    value_type: U_WORD
    min_value: 10
    max_value: 100
    step: 1