I need help with some logic. I know when my family members are awake and when they are sleeping. I know about movement, temperatures and a lot of stuff more around my house, due to a lot of sensors.
Now I want to teach the house something about day mode, evening mode and night mode. Well, at first this is easy. Take a time and set a variable to day, evening or night. But this is not what I want. Each housholdmemeber might get up to different times and for different reasons.
E.g.: Night mode is easy. When everyone is sleeping set variable to night. Now it is 3 o’clock and I am thirsty or I need to go to the toilet. I still want to stay the house in night mode. A few hours later - 5 o’clock - I need to get up for work. Now the house should go to day mode. How to know the difference between 3 and 5 o’clock situation? Already thought about a countdown, start when I get up and stop it when I get back to bed, but this sounds inefficient.
Evening mode looks similar difficult. I already thought about sunset, but what about winter? I don’t want the house to go into evening mode at 4:30. And creating exceptions for the four seasons might be too much expenditure.
For those who might ask why I want these modes: For lighting, heating, etc. I want to reduce the light in the evening and reduce it more throughout the night.
And one more thing : I don’t want to set the mode with a switch or my mobile. I want the house to know it by the sensor values it creates. Otherwise it won’t be a smart home