batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Support for Growatt inverters?

Open SwiftRR opened this issue 1 year ago • 4 comments

Are you looking to expand predbat support into Growatt? Is there an api?

This enquiry is on behalf of a friend who is interested in predbat but has Growatt inverter and battery.

Thanks

Rob

SwiftRR avatar Apr 08 '24 16:04 SwiftRR

I don't own a Growatt so I don't know.

Is Growatt integrated into home assistant and if so can you provide documentation of the controls?

springfall2008 avatar Apr 12 '24 07:04 springfall2008

It may be easier said than done. In HA, there are links to a Growatt integration: Screenshot 2024-04-12 at 10 02 20

Screenshot 2024-04-12 at 10 02 30

But searching web for Home assistant Growatt reveals a lot of frustration from users. See https://community.home-assistant.io/t/is-there-any-hope-for-the-growatt-integration/627221 There is a link to a GitHub project.

To me it looks as if Growatt are reluctant to offer control of their inverters to third parties. They also seem to 'farm out' Pone app software to ShinePhone.

All a pity as there are quite a few Growatt systems out there.

Rob

SwiftRR avatar Apr 12 '24 09:04 SwiftRR

Growatt control via the Grott addon from muppet3000 is limited as far as I know and works best when combined with an on-premise Grott by Johan Meijer which listens in on the packages between your inverter and Growatt. This setup is far more stable than the cloud version of the "default" Growatt integration in Home Assistant.

However growatt inverters can be Modbus controlled as well. There are differences in the registers used by different models.

Personally I have a MOD7000TL3-XHBP which I can control via Modbus and am willing to make available for development. At the moment I still have a fixed price contract but when that ends I would like to start using PredBat.

MuadDib007 avatar Aug 06 '24 17:08 MuadDib007

I have a Growatt MID 15KTL3-XH hybrid inverter and APX batteries and would love to get it to work with batpred. In addition to the access issues mentioned above, the Growatt HA integration does not support these newer hybrid inverters so I've added that myself. There is no documentation from Growatt but I've reverse engineered the API calls from their phone and web UI. Happy to provide the python code, and support in getting it to work on my system. Just found PredBat yesterday so need to read up a bit on what API calls are required as well.

johanzander avatar Sep 17 '24 21:09 johanzander

Solar-Assistant can integrate with Growatt inverters. Small expense but worth it. Can hook into Home Assistant via MQTT.

sparkyhughes avatar Dec 18 '24 22:12 sparkyhughes

As far as I can see it does not support the MIC/MOD/MIN/MAX range of inverters. These inverters only come with RS485, not RS232.

It is possible to connect these Growatt series with ESPHome and an RS485 converter.

The problem for me is the control / mapping of the entities that BatPred requires to the registers of the inverter.

Op wo 18 dec 2024 23:24 schreef sparkyhughes @.***>:

Solar-Assistant can integrate with Growatt inverters. Small expense but worth it. Can hook into Home Assistant via MQTT.

— Reply to this email directly, view it on GitHub https://github.com/springfall2008/batpred/issues/927#issuecomment-2552384712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO2XOYSCWQGRXXLSJZXD532GHY3TAVCNFSM6AAAAABF5BEA3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGM4DINZRGI . You are receiving this because you commented.Message ID: @.***>

MuadDib007 avatar Dec 19 '24 06:12 MuadDib007

I am chugging away on this. https://github.com/PhillyGilly/Predbat-for-Growatt-SPH/ You can talk to the inverter via its RS485 port using an interface device - exactly the same idea as the supported sofar2mqtt inverter - but using ESPHome platform. Lile other people, it's not my inverter (I went GivEnergy exactly because of its connectivity) so I'm waiting to be able to test my interface. But once that's working, I should be ready to move forward. One thing that I'm not clear about is the right way to deal with differences in data structure between systems. For example charging slot times. As far as I can see from mqtt explorer GivTCP is working with Charge_start_time_slot_1 = 11:30:00 whereas my growatt integration is creating Battery BatteryFirst Timeslot 1 start Hour = 11 and Battery BatteryFirst Timeslot 1 start Minute = 30. One approach is to write ESPHome automations to update these two registers on reciept of an mqtt message, which looks do-able, but is that the best approach?

PhillyGilly avatar Feb 12 '25 11:02 PhillyGilly

As far as I can see from mqtt explorer GivTCP is working with Charge_start_time_slot_1 = 11:30:00 whereas my growatt integration is creating Battery BatteryFirst Timeslot 1 start Hour = 11 and Battery BatteryFirst Timeslot 1 start Minute = 30. One approach is to write ESPHome automations to update these two registers on reciept of an mqtt message, which looks do-able, but is that the best approach?

There's a few ways this could be done

Obviously could change Predbat to deal with different data structure format and write the data the Groatt inverter needs natively. It is possible but adds to the Predbat code complexity especially if lots of different formats get added for other inverter types over time

Could use ESPHome to do the conversion

Could create Home Assistant automations to convert when a dummy helper input_datetime (that predbat writes to)

Could use template sensors that will be automatically triggered when the dummy input_datetime changes.

The difficulty is how you get the data into ESPhome. If ESPhome can read a HA sensor/pair of sensors the last might be the easiest otherwise you'll have to do something inside the 'ESP world'

gcoan avatar Feb 12 '25 17:02 gcoan

If it's of any use for anyone, I've extended the official Growatt Home Assistant integration with support for Growatt TLX inverters and APX batteries. Many have taken the Solar Assistant approach, but I pursued the growatt API path, and it's been running stable in my system for many months now. My intention was to contribute it back to the community, but the maintainers wanted me to submit small Pull Request iteratively, but I've made a bit of refactorisations and I'm not sure if/when I'll find the time to contribute it back. Anyway here it is: https://github.com/home-assistant/core/pull/133319.

Once I was done with the HA Growatt integration, my idea was to use batpred for control, but I ended up developing my own simple control algorithm while exploring and understanding how to actually control my Growatt system. The biggest challenge is/was that the Growatt settings (especially TOU) are really not designed for automatic hourly control, and there are so many limitations I'm not sure how to make this generic for batpred use.

johanzander avatar Feb 12 '25 19:02 johanzander