I've got a set of home batteries controlled from domoticz. I want to schedule (at least in winter when the solar panels don't fill up the battery entirely) every night a run of 3 hours at the cheapest moment to fill them up for use during daytime. I need to control 2 domoticz devices
- a multi level switch to set the mode to 'open APi' to allow external setpoint
- a thermostat to provide the charging power level
I'm making a script to run around 23:00 to set the charging schedule for the next night by updating the timers for these 2 devices. Using below URL's:
Code: Select all
http://<ip>:8080/json.htm?type=command¶m=updatetimer&idx=33&hour=2&min=0&randomness=false&timertype=2&days=1234567&command=0&active=true&level=30
http://<ip>:8080/json.htm?type=command¶m=updatetimer&idx=12&hour=2&min=1&randomness=false&timertype=2&days=1234567&command=0&active=true&temperature=-3500
Additionally it would be nice to make all parameters for the update optional so we're not forced to provide all timer parameters even when we don't want to change them