Why a fully-automated home that just learns from your behavior is so hard
You need far more sensors. Hundreds.
It needs a light sensor: you turned the light on because it's dark not because it's 8:32AM.
Detecting someone arriving in a room is easy, detecting nobody in a room is infinitely harder. It needs to reason.
For every rule there's an exception. The "birthday cake example" is how I explain this: turn the lights on unless I'm carrying a large cake with candles on it.
Routines change over time: kids grow up, guests come to stay, parties happen (BC), ...
It's too slow to learn: not enough examples of each unique scenario in a year; reinforcement is only in the negative when it gets something wrong and you have to override, no positive reinforcement.
It overfits.
You still need a way to override it, and it needs to understand how long that override should last for.
Line of sight isn't good enough: I'm going to be working under the car, you can't see me, but I'm still there.
Asymmetric reward function: if it gets it right 10,000 times nobody cares, but if it turns the lights on when someone's sleeping, or off when they are on a ladder, just once, it is "the absolute worst system in the entire world and needs to be ripped out right now".
Digital Twin are an online representation of a real world object, a copy of its properties in the digital world and a way to send updated and commands to it. In effect I've been making them for years but now they have a trendy name.
One way to reduce the volume of sensor data is to remove redundant points. In a system with timestamped data recorded on an irregular interval we can achieve this by removing co-linear points.
ESP32 provides a great platform for sensors around the house but by the time you've added a USB power brick, cable and enclosure it's quite messy. I wanted a device that I could just plug in with no exposed wires and no mounting needed so I designed one in OpenSCAD.
Home automation systems need to respond to events in the real world. Sometimes it's an analog value, sometimes it's binary, rarely is it clean and not susceptible to problems. Let's discuss some of the ways to convert these inputs into actions.
Another super useful function for handling sensor data and converting to probabilities is the logistic function 1/(1+e^-x). Using this you can easily map values onto a 0.0-1.0 probability range.
In a home automation system we often want to convert a measurement into a probability. The ATAN curve is one of my favorite curves for this as it's easy to map overything onto a 0.0-1.0 range.
Several years ago we did a major remodel. I did all of the finish electrical myself and supervised all of the rough-in electrical. I also put in all of the electrical system and water in our barn. I have opinions ...