Growatt Inverter Mode Switch

i solved changing the plant in line 21 in growatt_api.py :+1:t2:


Changing 0 to 1. and in line 24, 45 and 48 too. (for my system)

Today i will work more on my node.red flow - here in my country we have differented tariff, so i will make a flow to cut discharging at 50% and wait to start discharging again at 1700


And ofcause to stop discharging when EV is charging so i wont empty battery to car :smiley:

thanks muppet3000 and mjdyson, you saved my day - and vacation . i am no programmer so slowly progressing :smiley: looking very much forward to changes in the future - many people are asking for automation of their growatt hybrid inverters, BZ.

@affer, that sounds pretty interesting!

Is the flow working? I would be very interested in getting a copy of the code (to node-red) to implement in my system. Exact same reasons as you, dont want the car to empty the battery, and dont want to pay too much after 1700 hrs :slight_smile:

(And i blow my fuse on one phase when exceeding 25 amps. Car + solarbattery charging at the same time = 30 amps)

Thanks alot :+1:

the screenshot from node red is the interface to HA - and that is working, now i am doing the other stuff to talk with my ev charger etc, but the above is on pastebin here:

everything from mjdyson HA implementation is controllable from node red, except time slot… i run 00:00 to 00:00 just turning on/off timeslot.

my idea is to when i charge my car i set my growatt to batterymode and 10% SoC - from what i understand the batteri will start to charge to 10% - but actually never will because my bms stops before that. but when i have set to charge yes - the battery wont discharge - remember, work in progress, and i am no coder, so it will be trial and error :smiley:

1 Like

You got some good stuff going on :slight_smile:

I like your thinking (Battery on, charge to 10 %) :+1:

Hi. I’m also interested in this hybrid inverter solution. I now have a Growatt TLX ( no battery possible) and want a hybrid growatt with some kind of battery.

One question. Do you just need a hybrid inverter or do you also need the modbus rs485 connection to the smart meter like a Acrel or Eastron meter?

Except my theory did not work as expected. - but my node-red script works. yay… investigating. Battery is still discharging. :-/

But it did :smiley: yay - i could not use time 00:00 to 00:00 it have to be 00:00 to 23:59 :slight_smile:

i got working concept of stop discharge battery when ev is charging
and
stop discharging at 60% and resume discharge at 1700 for high tariff periods.

Thanks again devlopers. i am a happy man :joy:

1 Like

Hi muppet3000

Dont know if it is any use for you… but for reference when you get to this.
i have 2 powerplants in my account.

it works switching between them with altering 0 and 1 in plant = plant_list[‘data’][1] in growatt_app.py

in one plant i have two inverter, a sph online 24/7 and a mid online when it is not dark.

when the mid is online it get device = plant_info[‘deviceList’][0]. <<-- 0 and when it is offline my SPH gets the 0. (as in the first) device… so for now im am changing the 1 and 0 for day and night. my skills is not to figure out what to do about this for now… but just reference info for you when you get to the task in the future.

I might tweak my fork to bring across device IDs into HA and store those in a non-volatile sensor value for your plants.

The interaction with growattserver will largely be the same but you’d need to let the updater know which inverter you want to adjust.

1 Like

Sign me up if i need to test… for now i have moved my MID to another plant… so the ID wont change during on/off.

Hello all,

For those feeling adventurous… I’ve created a test branch on github. I’ll try my best to keep everything in there working. Just keep a copy of anything you’ve got working! You’ve been warned :slight_smile:

See the Testing page on the wiki - Testing · mjdyson/ad-growatt Wiki (github.com)

First change is to simplify the configuration a little more. There’s no new functionality this time. All of the configuration aspects (script, sensors, inputs / helpers) are now provided in a single package file. It will break your GUI until you change it to read from the new sensors / helpers.

Any feedback is welcomed.

2 Likes

Hello @affer - I’ve got something for you to test with multiple device options. See another new branch linked below. I will merge this in with the other Test branch if it seems to work ok.

I’ll advise you take a backup of your working code before testing this - I’ve tested it here, but I only have one device.

Also, it might be worth getting the first Test up and running first as this changed how some of the entity ids were created / configured.

Testing Multi Device Plants · mjdyson/ad-growatt Wiki (github.com)

I will take a look at it asap :slight_smile: looking forward to it :smiley: Btw,., been running flawlessly the last couple of days… i love it :smiley:

Hi Guys,

I’m making this blanket post in loads of different locations, but just so you’re in the loop, I’ve just made a big post over here: Growatt Integration - Roadmap (see the original post and my latest comment) about moving the integration out of home assistant core and into HACS.

If some of you are still interested in using it, please take a look at the new incarnation of the integration (it’s currently identical to the version available in Core but will diverge in the next few releases), then please go ahead.

If you can’t be bothered to read the other post, just take a look here: GitHub - muppet3000/homeassistant-growatt_server_api: Home Assistant Integration for Growatt - Replacement for the original growatt_server integration that used to be part of the core Home Assistant repository

2 Likes

Hi mark

At last i got some time to update. Update to test branch went fine (and working) great update, makes set up a lot easier :+1:t2:

the branch with multi device i had some troubles… the first error was kind of my fault. i had an plant with no inverter in, deleting this plant could get the next plant to load… But i only get one plant (i have two plants, both with SPH inverters in it)

Screenshot 2023-01-13 at 20.34.08

We should be thankful for some great work from the community for the new setup file. It’s made things very simple.

Currently I only have an iterator each ‘device’ within a single ‘plant’. Without multiple inverters it’s hard to test. However, I think I’ve got a solution - I’ll try to code up something tomorrow and get it out for testing. If this doesnt work, I might need to get some more data.somehow. A long day moving earth around in the garden has wiped me out :laughing:

One thing I’ve noticed, calls to the server time out a lot. Traceroute shows it’s not getting to the end server after 10+ hops… rather than the server calls being blocked. As a future update, I’d like to build a timestamp / response code from the server back into the UI. Maybe even a request timestamp too. Watch this space :slight_smile:

1 Like

@affer - new code on multi-device branch if you’d like to try. It should iterate through all plants to get all devices, Dropdown box still needs to be refreshed to be selectable. Weird interaction between AppDaemon and HA i need to see if it can be resolved.

1 Like

getting settings works :smiley: and both plants are beeing listed now :smiley: i can read and write settings as expected :+1:t2:

Nice! I’d say it’s time to merge multi plant into test.

Once I’ve updated the docs I’ll merge into main. Thank you for testing :slight_smile:

1 Like

No problem. with your and others input, and my nodered scripting i got a really good integration working with charging batteries overnight at cheapest price and discharging at high tariff. :slight_smile: ofcause work in progress… but this is really going somewhere :smiley:

I guys, I’ve been watching this one from the sidelines what with all of the stuff I’ve been doing to move the Growatt Integration into HACS I’ve had my hands full.

I’ve still got some other bits I need to wrap up on that front and also add the support for the systems that are currently missing, but I’d love to try and integrate what you’ve been doing in to the HA Integration.

I already have an email chain going with @mjdyson from before Christmas so I’ll resurrect that and see what we can do, especially if there’s stuff to feed back into the core python library.

Keep doing what you’re doing! Just wanted to check in and let you know I’m still paying attention.

2 Likes