Setting max charge via API
Posted: Fri Oct 04, 2024 9:03 am
Hi,
I've been using the API to get general status out of the inverter to show on an in-home display ; this is working well so far. I use the charge scheduler to buy power at the cheap Octopus flux rate and sell it at the peak rate.
What I would like to do is hook up the charge scheduler to a weather forecast so I can decide if there is likely to be sunlight in the morning and if not, top the battery up. The level of battery would be related to how sunny it is likely to be.
I've discovered though that the max SoC parameter is not available in the API - this is what I get from a /op/v0/device/scheduler/get call:
{
"endHour": 5,
"fdPwr": 0,
"minSocOnGrid": 10,
"workMode": "ForceCharge",
"fdSoc": 30,
"enable": 1,
"startHour": 2,
"startMinute": 27,
"endMinute": 0
},
In the web interface I see 70% MaxSoC(%) and that appears to be honoured if I look at the charge stats in the morning.
Is this a bug or a deliberate design choice? The rate that it charges appears to be non-linear so I can't easily just charge for, for example 30 minutes at 5kw and expect it to be 50% charged.
Many thanks,
A.
I've been using the API to get general status out of the inverter to show on an in-home display ; this is working well so far. I use the charge scheduler to buy power at the cheap Octopus flux rate and sell it at the peak rate.
What I would like to do is hook up the charge scheduler to a weather forecast so I can decide if there is likely to be sunlight in the morning and if not, top the battery up. The level of battery would be related to how sunny it is likely to be.
I've discovered though that the max SoC parameter is not available in the API - this is what I get from a /op/v0/device/scheduler/get call:
{
"endHour": 5,
"fdPwr": 0,
"minSocOnGrid": 10,
"workMode": "ForceCharge",
"fdSoc": 30,
"enable": 1,
"startHour": 2,
"startMinute": 27,
"endMinute": 0
},
In the web interface I see 70% MaxSoC(%) and that appears to be honoured if I look at the charge stats in the morning.
Is this a bug or a deliberate design choice? The rate that it charges appears to be non-linear so I can't easily just charge for, for example 30 minutes at 5kw and expect it to be 50% charged.
Many thanks,
A.