Good morning automation - tilting at windmills for fun

I am having a really hard time coming up with good automation for a good morning routine. My actions are very simple, once we are both up, or one person is awake if the other person isn’t home, then turn on a couple of lights and raise the bedroom blinds. Maybe if it’s the weekend turn on the TV or play some music. If one of us is up or moving about while the other sleeps I’d like timed pathway lighting (our bedroom is a cave when we sleep). I also want to avoid false positives - trips to the bathroom, check on the kids, whatever.

My wife and I both work M-F and we generally both get up at the same time except my wife travels frequently and gets up earlier or later on those days. We both have random days where the schedule changes. On these days the routine is very set. The weekends are rule-less. We wake up at whatever time and not always together. The routine we follow upon waking is very fluid.

I realize that saying, “Hey Google, good morning,” would solve my problem but where’s the fun in that? I’m also not going to lengths to try and schedule this all in a calendar. Early on I’d thought about a momentary switch attached to a relay but I’m trying to do this without having to take a specific non-normal action.

Random musings
To get to our bathroom one has to go through our closet/changing room and I’ve considered door positioning as part of a condition/trigger. There’s also a separate door for a powder room that might be useful. There are three doors in total. First, bedroom to closet; second, closet to bathroom; third, bathroom to powder room. I don’t know that there are discrete patterns in door usage but there might be.

The easiest answer would be check home/away and no weight in the bed but this fails if one person is traveling and the other uses the bathroom or one person wakes and the other gets up momentarily and goes back to bed.

I could use pieces of our set morning routine (doors/lights/showers to recognize and trigger but this wouldn’t work well on the weekend when the normal routine might not be followed.

Solving for the weekend gets tough. I could make assumptions like I tend to wake first and my wife is unlikely to return to bed after using the bathroom so if there’s no weight in the bed and the bath room light toggles then trigger. While this assumption is generally true, it’s not absolute. I’ve considered making the weekend pathway lighting only until both phones are no longer charging or assuming that after a certain time bringing the lights up to 10% wouldn’t be the end of the world but all of this feels like cheating the true intent.

Patterns of movement is probably the most interesting idea I’ve had. I suspect that patterns of movement differ between returning to bed and we’re both up and ready to face the day. The biggest downside I see is the inherit delay; at the point I’ve left the bedroom and it’s finally figured out I’m up and turns on the lights then it’s too late.

I realize that this is probably an unsolvable problem within a rule-based system but it’s still a fun problem to solve - how does one figure out when two people are truly up and react quickly enough to matter. What ideas do others have?

The problem you have here is that you try to automate rules where there really aren’t clear rules; there are so many parameters that change over time that make it difficult to automate.
I would suggest a couple of things to get you started:

  • look into the Bayesian sensor, that seems pretty suited to your situation
  • compartialise the “problem”. Try to fix a small part first and then add the next part, instead of doing it all at once
  • look into the work day sensor as an easy way to decide between workday and weekend.

To be fair, I’m trying to make it complicated because it’s Friday and I’m bored but I’m also realizing that “smart” homes are simple rule-based systems and people generally are not rule-based.

Yes, I could definitely break the problem down, define all my known use cases, and write rules for each. My wife would then make me very aware of my exception cases as they happen. I may even do that. I probably won’t. I’ll throw a stupidly expensive zwave button on my nightstand and call it a day.

I think I’m more interested in some of the underlying concepts and the direction that sensors need to go in order to make tasks like this work. I mean, shouldn’t my smart home be analyzing me and looking for patterns? I know for a fact that I’m an unreliable narrator in terms of rules I give my home but I’m convinced there is something discrete that could be sensed (which there probably isn’t a sensor for yet) that could trigger this.

1 Like

I’m with you - I’m the same, I also like to tinker just for the sake of it.

The issue is that it will come with a lot of trial and error before you get it perfect and your wife might kill you before you get it to the perfect state :wink:

You could put a sensor in the bed itself and use that as input into the Bayesian sensor.
see an example here (Scroll down to about halfway the page, SleepIQ. https://github.com/CCOSTAN/Home-AssistantConfig

I would also suggest you check out Phil’s blog - he has some really interesting concepts going and they will probably provide you with some inspiration too. Especially the post about non-binary presence detection might be useful.

oops, i should have clicked that link first… i thought it was a bed sensor that you put in an existing bed, turns out that is a completely new bed - that might blow your budget… There must be sensors that you can put in afterwards though…

You know, the whole WAF is the reason this thing will probably never be more than a hobby. I really wish there was something between DIY and control4/creston/savant. I would happily pay, not creston money but not nothing, to have a rock solid system that worked and would allow me to tinker around the edges in a sandbox when she’s traveling.

On a tangent, I’m sick of the SmartThings lag and bothered by the need to run to the internet for every command but when I look at something like a HomeSeer controller it’s a windows box, or windows software, which means nothing is going to work Wednesday mornings. I’d love to see an inexpensive, embedded, rock-solid, rack-mounted system that runs locally handles its own updates. How hard can that be…yeah, I know…

I’ve seen some DIY sensors that people have built that use a relay. I’m not sure how my wife would feel about sleeping on one. Actually, I am sure.

nothing like a nice electric shock to spice things up! :wink: