Schedule script for heating management - python
Posted: Thursday 14 November 2019 21:57
Now updated with a Docker image.
------------------------
Hello everyone,
I have been working on the following python script, to manage the heating in my home.
Basically, the purpose is to enable easy scheduling of Domoticz switches across several conditions. For example, I need the living room radiator to heat up in some circumstances (e.g. in the evening in a normal work day) but at other times during particular days (full day during home office or week end). But wait, sometimes Grandpa and Grandma also come in the afternoon, so they need heating only in the afternoon!
Domoticz does provide a way to handle these needs, but a fine configuration gets quickly very complicated using Timers and timer Plans.
With this script instead, the whole set of configurations sits in a single spreadsheet, that is very easy to manipulate, with LibreOffice for example. Every hour, the script parses the spreadsheet, thus extracting the scheduling information. Based on that information, it decides what should be the state of each device, and sets it in Domoticz.
Check out the Spreadsheet screen capture attached, it will make things clearer.
The code is here: https://gitlab.com/jjouifi/schedule-for-domoticz
Hope it will be useful to you, and thanks a million times for your feedback.
JJD.
------------------------
Hello everyone,
I have been working on the following python script, to manage the heating in my home.
Basically, the purpose is to enable easy scheduling of Domoticz switches across several conditions. For example, I need the living room radiator to heat up in some circumstances (e.g. in the evening in a normal work day) but at other times during particular days (full day during home office or week end). But wait, sometimes Grandpa and Grandma also come in the afternoon, so they need heating only in the afternoon!
Domoticz does provide a way to handle these needs, but a fine configuration gets quickly very complicated using Timers and timer Plans.
With this script instead, the whole set of configurations sits in a single spreadsheet, that is very easy to manipulate, with LibreOffice for example. Every hour, the script parses the spreadsheet, thus extracting the scheduling information. Based on that information, it decides what should be the state of each device, and sets it in Domoticz.
Check out the Spreadsheet screen capture attached, it will make things clearer.
The code is here: https://gitlab.com/jjouifi/schedule-for-domoticz
Hope it will be useful to you, and thanks a million times for your feedback.
JJD.