Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discharge Stopped Soc / Stop using battery at certain time. #53

Closed
fisken opened this issue Jan 10, 2023 · 3 comments
Closed

Discharge Stopped Soc / Stop using battery at certain time. #53

fisken opened this issue Jan 10, 2023 · 3 comments

Comments

@fisken
Copy link

fisken commented Jan 10, 2023

I've read through the documentation and is it correct that you can't set the "Discharge Stopped Soc" with this package?

I'm making a program that decides whether to use power from the battery. And the only way is to set the "Discharge Stopped Soc" in the settings. I hope to use this package, as I use it to determine whether to charge the batteries.

@muppet3000
Copy link
Contributor

You should be able to do that, however you'd need to work out what parameters to set via the settings call. You'd need to monitor the calls that are made via the App and then replicate them with the API

@fisken
Copy link
Author

fisken commented Jan 12, 2023

Thanks for the quick reply. Haven't tried monitoring calls before, but I gave it a try.
The app can't set "discharge stopped Soc" but I figured out I could use the "grid first" setting where I discharge the battery. Then I set the discharge rate to 0, at I now only user power from the grid, great for these winter times when power is cheap at night.

I used NetCapture to figure out the command and parameters it expects. It was more straightforward than I thought. The command to set this is "mix_ac_discharge_time_period", and here is an example with parameters for others to use:

#Set inverter schedule for not charing
schedule_settings = ["0", #Discharging power %
                     "10", #Stop Discharging SoC %
                     "23", "05", #Schedule 1 - Start time
                     "03", "00", #Schedule 1 - End time
                     "1",        #Schedule 1 - Enabled/Disabled (1 = Enabled)
                     "11", "00", #Schedule 2 - Start time
                     "15", "00", #Schedule 2 - End time
                     "1",        #Schedule 2 - Enabled/Disabled (0 = Disabled)
                     "00", "00", #Schedule 3 - Start time
                     "00", "00", #Schedule 3 - End time
                     "0"]        #Schedule 3 - Enabled/Disabled (0 = Disabled)
print("Setting the inverter discharging schedule to:")
pp.pprint(schedule_settings)
response = api.update_mix_inverter_setting(device_sn, 'mix_ac_discharge_time_period', schedule_settings)
print(response)

Closing the thread.

@fisken fisken closed this as completed Jan 12, 2023
@fisken fisken changed the title Discharge Stopped Soc Discharge Stopped Soc / Stop using battery at certain time. Jan 12, 2023
@muppet3000
Copy link
Contributor

Thanks @fisken glad you got it working. Maybe it's worth submitting a PR to the repo with an example, or a new entry to the README.md file with a new bullet point under this section:
https://github.com/indykoning/PyPi_GrowattServer#inverter-settings

That way other people can benefit from this knowledge in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants