Nest thermostat, door sensors and saving the environment

Moderator: leecollings

Post Reply
User avatar
LdV46
Posts: 6
Joined: Thursday 01 October 2015 9:39
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Netherlands
Contact:

Nest thermostat, door sensors and saving the environment

Post by LdV46 »

I'm trying to implement some scripting and logic in to domoticz to save a few pennies (and the environment as well..).

Is basic, what I'm trying to accomplish is to prevent my heater to turn on if one or more doors are opened for a set period of time. Before writing any code I'm trying to figure out the logic behind it to make sure I don't miss out on anything and having the heater turned off on the wrong moments and thus freeze my *ss of.

The logic I came up with, and forgive my markup-skills, is as follows;

First the script needs to know the state of the doors and how long they are open. The [door1] is just one example, I want to add at least one more, perhaps another.
If [door1] = open > 5 min but < 10 min and [door1_variable= 0] set [door1_variable] = 1
If [door1] = open > 10 min and [door1_variable= 0] set [door1_variable] = 2
If [door1] = closed set [door1_variable] = 0

Then we need to determine if the heater 'wants' to turn on. My idea is to compare the setpoint of the Nest-thermostat to the outside temperature. My presumption is that if the outside temperature is lower than the set temperature and the doors are open, the temperature inside will drop beneath the set temperature, causing the heater to turn on and the heat to disappear through the open doors. I deliberatly did not use the inside temperature because then you will already have lost heat before the logic kicks in. So:

If [Nest_set_temp] > [outside_temp] set [heater_demand] = 1

We now know that the door is open and the heater want to turn on (or is turned on). Next the steps to save on gas.

Now I know the door is open and the heater needs to be on. I first want a subtle reminder to close the doors and keep the warmth inside. If I don't act on it, because I'm lazy, I want to prevent the heater to turn on.

If [door1] = 1 and [heater_demand] = 1 send message "Close doors to save on heating"

If [door1] = 2 and [heater_demand] = 1 send message "Close doors to save on heating" and set [Nest_status] = ECO-mode

Now the heater should not be on. Hurray I guess. The only concern I have in this stage is that the heater won't go out of ECO-mode by itself and I need to set it to 'active' by hand. And that defeats the whole purpose of automating things.

Do I miss some logic, am I overcomplicating this or do you see any other concerns? Please feel free to add, correct and help me save the environment.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest