Page 1 of 1

Schedule script for heating management - python

Posted: Thursday 14 November 2019 21:57
by jjouifi
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.



Screen_capture.png
Screen_capture.png (156.36 KiB) Viewed 757 times

Re: Schedule script for heating management - python

Posted: Friday 15 November 2019 10:55
by MikeF
Clever!

Re: Schedule script for heating management - python

Posted: Wednesday 20 November 2019 7:43
by evertide
Very nice