I've been using Pulsor under-floor strain gauges for many years. Currently they are connected through an alarm panel into the home automation system but I plan on connecting them directly to an HX711 and reading analog values from them.
Strain-gauges vary their resistance as they flex. By gluing them to the underside or side of a joist they can detect someone standing in an area about 2m x 1m above. The exact area covered depends on the direction of the joists and the stiffness of the floor but even through a hardwood floor and 0.75" subfloor they can detect an adult above.
If you need more sensitivity you can put a very shallow saw cut in the beam and glue them across the gap, this concentrates the stress on the sensor.
By wiring them in a wheatstone bridge you can compensate for any temperature sensors. An ideal set up has four sensors connected together but two with 1k ohm resistors works well too and if necessary a single sensor and three 1k ohm resistors will work.
Pulsor sensors are also ideal for situations where a regular PIR sensor cannot work. People use them on boats where the rocking motion and sunlight would trigger many other sensor types. I use them under outdoor decks and indoors on stairs and some room floors. The biggest issue is that you need access under the floor to install them.
Long term plans include using the HX711 (a digital scale chip with an accurate ADC) to read them. Can I detect who is above by their weight? or the shape of the impulse as they walk over the sensor?
I've been working on home automation for over 15 years and I'm close to achieving my goal which is a house that understands where everyone is at all times, can predict where you are going next and can control lighting, heating and other systems without you having to do or say anything. That's a true "smart home".
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.
Having at least one light sensor is critical for any home automation system that controls lightng. Lights need to be turned on when it's dark not at specific times of day, especially here in Seattle when it can be dark and cloudy at any time of day.
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.
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.