Also, if I understand correctly, once other modes disabled, it revers back to load first mode?
p.s. I cannot also load setting for the server, looks like… or nothing I change are seen on the Growatt server
There are 2 buttons in the config.yaml file - see the image above. Adjust the lovelace card to use these names instead (and remove the one not working)
Sorry for my lack of understanding, could you please clarify a bit more what and where to make these changes?
Below is my code from the dashboard, and attached screenshot of the dashboard
I wonder if anyone here has experience with automation of Intelligent Octopus and inverter??
I am trying to write script where binary sensor is set to ON as trigger - then Growatt is set to battery first.
Once the same sensor is set to OFF - then Battery First is disabled.
p.s. also I have a strange bug where I create new automation - go to YAML editor - copy paste the code… and after hitting save - it looks like automation is saved… but if I leavee editor and get back in - it just shos empty automation. what am I missing?
guys, sorry to be annoying, but can someone assist how to use these entities which I can find as “state entity” in the automations?
I have this Intelligent Octopus (IO) tariff which is a bit flexible:
by default off-peak super low rate is provided between 23:30 and 5:30
however sometimes these super cheap tariffs can be allocated at different times, i.e. 22:00-23:00 and then the standard slot as above.
I want to create an automation where once the car charging cable is plugged into the car and the Slot is allocated - it switches Growatt to Battery first.
I can create automation for the initial action of IO is set and cable is plugged in
but I struggle to understand what function to use to change the Growatt setting into Battery first.
Then I will need to disable battery first once the IO slot is set to OFF.
@mjdyson could you guide me towards right direction? is there something I do wrong?
I got the Lovelace card working but i seem not to be able to connect to Growatt server/cloud.
Tried all combinations in /config/secrets.yaml with inverter device number, data logger and plant name but they all return API status = error Msg 502
What is the reason for API status = error Msg 502 ? I have only an installer account and I’m trying to log in with the installer admin account
works fine in the ShinePhone and on server.growatt
Awesome!
created, edited name (by the way - got error then realised that needed to cut your code in half
Nevertheless, I will try tonight once the IO is enabled! and will post an update!
p.s. automation check/confirmation might happen some time later (in few days) as the on-peak IO slot allocation happen sporadically and cannot predict…
@KasperHolchKragelund great code you wrote. I use it to control my SPH inverter to. really nice.
The only thing missing for me is the Charge Power Rate when enabeling battery first mode. Its always going to 100% and I want it to be lower.
As far as you know, is there any API limitation why you did not add it? Or diddnt you needed it? I want to try adding it, but not such a Python hero as you are
@KasperHolchKragelund I managed to get it working for me. I wrote my changes to github and created a pull request. My first one actually. feels like it could have been in one pull request, but I really dont know how to add all three files in it.
Battery First for Growatt works with your script - I got the automation running. However I cannot confirm if it will work 100% if one-off Intelligent slots. will update later.
@Jasperw I merged your changes and also added reading the charge power parameter, otherwise it would always show 0 after getting parameters. Thanks for the input on adding charge power.
Great @snu-snu-snu I have included the battery first on/off services in v.04 on GitHub. You can set the time and other parameters for battery first in the fields from Lovelace (can be scripted) and it will save all battery first parameters when calling the service.
great. just a question, as I want to understand the whole logic of how it works.
So by default it is 23:30 to 5:30. this is now set as default time to start on and off. these are the manually entered values from the lovelace.
If I am at some point assigned some additonal slots, let’s say at 22:00 to 22:30 (all of them are 30 minute intervals) - will it overwrite the times or it just going to switch into battery mode on without any scheduling?
Currently only one timeslot is used, from the logic that you will always set the next timeslot that’s relevant and thereby overwrite the previous timeslot you used. You can set the date/time via script once you have calculated the best timeslots.
Another method is to have the timeslot always on (00:00 to 23:59) and then just operate the Battery First Enabled switch whenever you want to charge the battery or stop charging. This is might be a simpler solution.