You'll find many articles on home automation under the tag #homeautomation. Here's a
quick overview of the decade-long project to figure out what the ideal home automation system should look like.
My home automation system has over 200 sensors. Most are used to detect people moving around the house. There's a magnetic
sensor at the top of the drive that detects cars, motion sensors by the front door, contacts on every external and most
internal doors, a few PIR motion sensors in ceilings and on walls, and my favorite sensor of all, the Pulsor strain-gauges
under the floor that detect people walking about without any visible sign of a sensor in the room. Many of the sensors are connected through an alarm panel into the main home automation PC using a serial connection but increasingly I'm adding new sensors using Arduinos posting to a RESTful API or Moteino's sending back messages wirelessly.
All the sensor data is stored in a large MongoDB database using my 'variables with history' that make it easy to program complex statistical expressions comparing sensor activity now to the average for the same time of day last week, or every week. From this data a wide-variety of rules are triggered using my 'sequential logic blocks' that make it easy to chain logic together for any situation. The system also uses 'hierarchical state machines' that help track state over time.
The house controls heating, lighting, sprinklers, music. It talks over the speakers, it plays music by tags in any collection of rooms, you can chat to it on messenger, hangouts or Slack. It has a web UI, an Android UI and an iPhone UI.
It saves energy, keeps us informed as to what's happening at home or over at our barn and is generally helpful.
My year long Bluetooth project that won the $20,000 HCI and Microsoft competition during lockdown has continued to grow and now reliably tracks how many people are in the house and outside and can locate any device down to room level.
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.
An overview of the many sensors I've experimented with for home automation including my favorite under-floor strain gauge, through all the usual PIR, beam and contact sensors to some more esoteric devices like an 8x8 thermal camera.
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.
Bluetooth sensing for home automation is a great proxy for people counting as it can detect and locate each cellphone in the house. iBeacons attached to tools, cars and pets can provide a 'find my anything' feature too.
Microwave doppler sensors can be found in some alarm sensors but there are also available very cheaply as a separate component. They offer exceptional range but suffer from false triggers requiring a probailistic approach to people sensing.
Optical-beam sensors are reliable and can cover a long-distance such as across a garage or aisle-way. When they include multiple-beams they have good false-trigger rejection.
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 ...
An if-this-then-that style rules machine is insufficient for lighting control. This state machine accomplishes 90% of the correct behavior for a light that is controlled automatically and manually in a home automation system.