Growatt Shine WiLan X2 integrated into Home Assistant - Easy Solution

Hi, not sure if this is really the right place for this, so please move it if it isn’t.

This isn’t so much a cool project or addon, rather using things that exist to make a Growatt Inverter work. I searched for hours before finding this, so thought it would be useful to add a post.

I have now had 3 growatt invertors and got them all to work with Home Assistant, mainly using Grott which has been an excellent HACS addon for me. But my latest upgrade was an SPL-5000 TL HUB which comes with the newer Shine-WiLan-x2 dongle the absolutely doesn’t work with Grott as the new Shine X series use a different comms protocol with the Growatt Servers and Grott doesn’t understand it, it doesn’t even use the same port, so no logs or anything show up in Grott when you change the monitoring IP in the Growatt server website application. :weary:

I looked around and came across things for the Shine-WiLan-X that cover things like re-flashing the module, adding ESP devices and messing around with Modbus to IP configurations, hardware alterations etc. Too messy for me.

Then I came across a white paper from Growatt showing that the Shine-WiLan-X2 actually contains a ModBus to TCP interpreter, and it works out of the box. Whilst trying to get this to work with the inbuilt ModBus for Home Assistant (which does work BTW) I came across the SolaX Inverter Modbus HACS plugin. This is for SolaX inverters, but also handily supports Growatt too. This leads to a super simple solution.

Installation:
Find the IP address of your Shine-WiLan-X2 on the local network, you will probably need to look at the DHCP on your router for the MAC, mine started f0:24:f9 - Its host name was the serial of the dongle, would look something like VWQ0ABC0JK. I would HIGHLY recommend you then set a reservation for it do it doesn’t change in the future. You could also set the dongle to a static IP, but that’s a bit of a faff to be honest with the X2, but there are videos online if you want to do this.

In HACS search for the “SolaX Inverter Modbus” and install it

Add the integration and add the invertor, make sure you select “Select Inverter Type” as Growatt, Interface as “TCP / Ethernet”, give it a sensible name.
On the next screen put in the IP address of the Shine-WiLAN-X2 that you got earlier. leave the port as 502 and the default “Modbus TCP”

Click submit

That’s it, you then get a full feed of all the Growatt data, updated every 15 seconds over the local network without needing the cloud at all. You also get to control many aspects of the invertor including altering scheduling, operating mode etc etc, just as sliders and buttons.

Hope this helps other people

4 Likes

Thanks, am a grott user myself and just for completeness, you donot need the cloud when using grott, that is the whole idea behind grott.

Can you tell if this setup is providing more data than via grott?
What I like most is having the inverter control elements. Also noted that the Shine-WiLan-X2 can be found for about 30EUR (up to a lot more) which is quite a bit cheaper than my old one.

A bit more data than Grott, but main advantage is the ease of setup.
15 seconds polling (or even less if you want), Grott is 5min, or 1min if you fiddle)
Plus the ability to write data back to the invertor, so you can programmatically change battery charging speeds or grid modes

1 Like

And no additional software in the middle that depends on model settings… seems another win (compared to grott sometimes now showing all), really appreciating the feedback !

Just to be clear, for me grott has been super stable for almost 3y except for 2 days where due to unknown reason it needed a restart.

Update this morning, appears SolaX crashed during the night, possibly, rebooted HA and all running again, not sure if this is going to be a recurring thing

Hmmm, that is not helping my earlier reduced risk statement :rofl: Any idea of the cause? Just to be clear, there are plenty integrations that faulter at times, e.g. my netatmo being the biggest pita. But locally run add-ons/integrations should be stable.

So now a few weeks in and that crash appears to be a one off that got fixed, no issues since.
I have integrated the Growatt over Modbus into an EV charging routine and it’s working perfectly.

I have been using the Solax integration for sometime as was frustrated by other integrations. However I can never get it to control the inverter or update schedules. They change for 5 seconds then reset back. Any pointers as to how you get yours to control the growatt inverter?

I find the same thing for some things but not others, so the clock setting works without issue, but settings that go together in groups don’t seem to work e.g. the times for enabling battery mode. I am wondering if this happens to have anything to do with the Growatt web implementation where it sets these things together in a single press i.e. does it reject one time because it conflicts with another entry and you need to set them all at once?

This post saved me so much time and headache, and I was shocked at just how easy it actually was… it just WORKS.

I can’t express how thankful I am.

Thank you so much for taking the time to discover this and document it.

1 Like

Perfect, that’s exactly why I did it, glad it helped. Been running it for 2 months now, no issues at all after that first reboot.

Hi Ramshaw,

Thank you very much for this super easy solution to get the ShineWiLan-X2 dongles working directly with Home Assistant without having to go via the Growatt cloud.

I have been struggling with my ShineWiLan-X2 for days and had already given up all hope to get things working. I even ordered a Shinelan-X hoping that it would solve the problem. But it did’nt.

Your solution is super easy to set up. I had it running in a couple of minutes and now all the data from my MOD 5000TL3-XH is going to InfluxDB and Grafana in my Home Assistant system every 10 seconds. Simply beautifull.

Thanks again.

I just got my inverter installed today and have setup the very limited core integration, then came across this - thanks for posting as it’s really good news - my SPH had a ShineWiLan-X2 so I’ll be setting it up later.

You mention that groups don’t work - e.g. to setup an overnight battery first schedule I guess. But, does “charge now” - e.g. to enable me to charge automatically when octopus have a free energy window, or I get a cheap charging window from Intelligent Octopus because it decides to charge the EV.

I guess none of this affects the logger talking to the growatt servers - is that correct?

It doesn’t interfere with the Growatt settings or telemetry sent to the Growatt Servers, it’s not like Grott, so not in the path of the data flow to Growatt, but off to the side.

You can set individual settings like charge now, they seem to set fine on mine. Apart from I have schedules set so Charge Now always gets turned off a few seconds later by the schedule for me (even if I set it by the Growatt web service)

Thanks @Ramshaw . All working nicely this morning and made even sweeter because the core growatt integration had caused me to be locked out of my account this morning.

It’s great as well that Growatt actually promote the use of modbus - there’s a nice whitepaper at https://en.growatt.com/media/news/how-third-party-control-enhance-your-pv-system

1 Like

Thanks again @Ramshaw . I’m trying to get the automations working to change the battery to charge if I get a charging slot for the EV from Octopus during the day (and hence cheap rate). The automations all run, but I see the growatt_inverter_priority sensor change to Battery First, but then on the next read, it’s back to Load First, so I guess it never changes. Are you saying that you see this as well, and that it’s due to having a schedule set - I also have schedules enabled to set battery first between 23:30 and 05:30. i.e. does manually setting the priority not work if you have a schedule enabled. Might first disabling the schedule in the automation work? I see @Mark-LewisKuga had the same issue - did you manage to work out how to change to Battery First dynamically?

It also looks like one of the sensors (select.growatt_inverter_battery_first_time_1_begin) is unavailable, so I guess the integration is reading the wrong register from modbus perhaps. Do you see this also?

Edit: Actually looking at this further, I dug out the modbus registers, and it looks like the inverter priority is read only. Also, it looks like the schedules have to be read and written as a group of settings, so likely they won’t work either. Has anyone found a way to set the priority to battery and then back to load?

As far as I can tell if you have a schedule then that takes all precedence, so setting the inverter preference to anything seems to get immediately overridden if you have a schedule. This was my (very limited) experience using the Growatt website to set values.
I’m not at all sure how it works in detail though and if there is any way around it without removing all schedules.

Hi @Ramshaw

You are my hero for today :star_struck:

After a week of failed experiments, I was not able to change my Growatt inverter settings via HA (even with the kind help of Growatt support). Tonight I found your explanation above, and it immediately worked like a charm. Excellent!!

But I am now struggling with 2 things:

  1. Can I change the operation mode via an automation? For example is it possible to set it to ‘Battery first’ as soon when the automation runs?
  2. Can I change the TOU segments via an automation? I only need to update the first segment, but I understood that you have to specify all segments (somehow)?

I would REALLY appreciate if somebody could get me started by sharing a yaml example for both automations. I did search in all kind of places, but didn’t find anything for noobs like me…

From the discussion above I have understood that the operation mode (see 1) is only possible when no TOU segments (see 2) are enabled. So I will not mix them…

Thanks already!!
Bart

I have a Growatt SPH5000TL-HUB inverter and I using the Homeassistant Solax modbus integration via new VPP registers. Note, these VPP registers have only been set up for Gen3 inverters in the latest integration update, as I don’t have Gen4 inverter to test.

I control battery charge/ discharge on and off via automation using these new VPP registers to set time, power, remote enable, then VPP status to enable in this order. The battery charge/discharge stops after the time period entered or you can use a second automation to set timers and power to zero, and VPP the VPP remote and status to disabled.

The automation settings are:

set time (time period for the battery to charge/ discharge),

power(rate of charge/discharge as a percentage - negative value = grid first, positive value = battery first),

remote enable,

then VPP status to enable in this order.

Below is an example of the action part of the automation to start a grid first sequence:
sequence:

  • action: number.set_value
    metadata: {}
    data:
    value: “114”
    target:
    entity_id: number.growatt_inverter_vpp_time
  • action: number.set_value
    metadata: {}
    data:
    value: “-80”
    target:
    entity_id: number.growatt_inverter_vpp_power
  • action: select.select_option
    data:
    option: Enabled
    target:
    entity_id: select.growatt_inverter_vpp_remote_control
  • delay:
    hours: 0
    minutes: 0
    seconds: 1
    milliseconds: 0
  • action: select.select_option
    data:
    option: Enabled
    target:
    entity_id: select.growatt_inverter_vpp_status
1 Like

Excellent info Brad, I was about to start looking into this myself.

As you have a SPH5000TL-HUB, for no particular reason, you might want to have a look at this post :slight_smile:

https://diysolarforum.com/threads/growatt-sph-series-modifying-the-mode-function-learnings-and-help-please.115991/