Home Automation

Using a Raspberry Pi 4 as a hub through Home Assistant as well as several esp32 microcontrollers with sensors and custom code, I've created a fluid and effortless home automation system which can prompt me questions like whether music should be played or if the TV should be turned on by simply understanding my location in my room.

Raspberry Pi 4

Raspberry Pi 4

The Raspberry Pi 4 is essential this home automation system as it acts as the hub or brains of the operation. The Pi is flashed with an OS called Home Assistant which makes it very easy to link commercial products, like light switches, and custom elements, like the esp32, in order to make automation routines or scripts. Home Assistant is also very useful in accessing various smart devices from a single, good-looking app as almost any smart device can be connected and the dashboards are very easy to customize. For example, using another Pi flashed with OctoPrint, I can easily monitor my 3d Printer statistics and I can watch a camera feed through the Home Assistant Dashboard.

ESP32

ESP32

ESP32s are also quite useful in the home automation system since they provide lots of customizability. I've used the wifi-enabled microcontroller along with various sensors such as presence detectors like the ld2410 sensors or loadcells to measure presence in specific parts of a room. The integrate bluetooth and Wifi are very useful since they allow me to use MQTT (a simple messaging system) to easily and reliably send data back to the Home Assistant Hub. Also the Bluetooth functionality allows the esp32 to be used on its own to understand the rough presence of a person in a given area based on their phone's bluetooth signals which is very useful in identifying who might be in a room at a certain time to customize automations based on each person.

Various Sensors

mmWave Sensor

Various sensors like the ld2410 are also just as important as any other part of this home automation system. White the esp32 can provide a simple boolean expression of whether a person is in a room, the ld2410 can figure out where that person is within the room with much higher accuracy. This creates the possibility of having individualized automations based on whether someone is at their desk or on their couch. Load Cells are also quite useful as they can easily detect presence on a bed or couch which can be used similarly to the ld2410. Ambient light sensors are also great for home automation since they can be used to easily trigger the opening or closing of shades or blinds, or the activation of lights in a room.