Calculate with timers
Posted: Tuesday 05 March 2019 14:38
I have recently started experimenting with Domoticz on the Raspberry pi. I chose it because I sofar have come the furtest with implementing my thermostat into it. (I tried Openhab and Home Assistant without luck).
I have manged to install and modify a plugin, so I can now read and control the: current temperature, current setpoint, day setpoint, night setpoint, day/night state, CO2, occupancy,...
I also am monitoring the weather status for my location.
I have also managed to set a timer that toggles the day/night state of my thermostat on specific time schedules.
But the main thing what I want is to go smarter.
I want to calculate with those schedules and act accordingly.
If I want my house to be warm at 07:00, I now need to set the thermostat to On/Day at about 6:00, but when it get warmer outside, I don't need to start until 6:30 before I heating the house.
With the information of my current room temperature, the desired "day" setpoint, and the current outside temperature I can easily predict how long it will take to heat up the room with some calculation.
But how do I create some code and make it run often that will execute this calculation?
And once I calculate that it will for example take 40 minutes to heat up the room, how do I know when it is 40 minutes before my "On" schedule is actived?
Can I somehow find out what the next "ON" schedule event is and what time it is set to?
And how do I create a timer/schedule that does not directly write to my day/night state "switch" of the thermostat? As in, how do I control my self the write it when I want?
I have manged to install and modify a plugin, so I can now read and control the: current temperature, current setpoint, day setpoint, night setpoint, day/night state, CO2, occupancy,...
I also am monitoring the weather status for my location.
I have also managed to set a timer that toggles the day/night state of my thermostat on specific time schedules.
But the main thing what I want is to go smarter.
I want to calculate with those schedules and act accordingly.
If I want my house to be warm at 07:00, I now need to set the thermostat to On/Day at about 6:00, but when it get warmer outside, I don't need to start until 6:30 before I heating the house.
With the information of my current room temperature, the desired "day" setpoint, and the current outside temperature I can easily predict how long it will take to heat up the room with some calculation.
But how do I create some code and make it run often that will execute this calculation?
And once I calculate that it will for example take 40 minutes to heat up the room, how do I know when it is 40 minutes before my "On" schedule is actived?
Can I somehow find out what the next "ON" schedule event is and what time it is set to?
And how do I create a timer/schedule that does not directly write to my day/night state "switch" of the thermostat? As in, how do I control my self the write it when I want?