Automation

Radar, UWB Sensors: Next-Gen Automations in Home Assistant

In the evolving landscape of smart homes, basic presence detection—reliant primarily on Passive Infrared (PIR) sensors—is fast becoming a relic of the past. While effective for simple on/off automations, these traditional methods often fall short in providing the nuanced, context-aware control that truly intelligent environments demand. We’ve all experienced the frustration of lights turning off because we’re sitting still, or the heating kicking in unnecessarily because a pet triggered a sensor. This article delves into the transformative potential of advanced sensor technologies, specifically Radar and Ultra-Wideband (UWB), in revolutionizing home automation within platforms like Home Assistant. By moving beyond mere occupancy to understanding granular details like precise location, activity, and even micro-movements, we can unlock a new generation of smart home experiences that are intuitive, efficient, and genuinely responsive to our needs, ushering in an era of truly proactive and intelligent living spaces.

AliExpress

The Shortcomings of Conventional Presence Detection

For years, the backbone of smart home presence detection has been the humble PIR sensor. These devices work by detecting changes in infrared radiation, which typically occurs when a warm body moves within their field of view. While inexpensive and easy to integrate, PIRs come with significant limitations. Their primary flaw is their inability to detect static presence; if you’re reading a book on the couch or working at a desk, a PIR sensor will eventually report no presence, leading to lights turning off or climate control disengaging prematurely. Similarly, door and window sensors provide binary open/closed states, offering no insight into whether a person is merely passing through a doorway or actively occupying a space. This often results in a reactive, rather than proactive, smart home experience, where automations are triggered only after a distinct, often large, movement occurs, or conversely, turn off despite continued occupancy. Such basic tools simply lack the fidelity to build truly intelligent, human-centric automations.

Radar and UWB: Technologies for Advanced Sensing

To overcome the limitations of traditional sensors, we turn to more sophisticated technologies: Radar and Ultra-Wideband (UWB).

Radar Sensors (mmWave)

Millimeter wave (mmWave) radar sensors operate by emitting electromagnetic waves and analyzing the reflections. Unlike PIR, which detects heat, radar detects motion, including incredibly subtle micro-movements like breathing and heartbeats. This allows mmWave sensors to accurately detect sedentary presence—meaning they can tell if a person is present even if they are perfectly still. They can often penetrate non-metallic materials like drywall, offering discreet installation. For example, a mmWave sensor mounted subtly on a ceiling can reliably detect if someone is asleep in bed or simply sitting at a desk, without needing a direct line of sight in the same way a camera would. This capability is game-changing for automations that need to understand continuous occupation rather than just initial entry.

Ultra-Wideband (UWB) Sensors

UWB technology utilizes short, low-power electromagnetic pulses to determine precise distances and locations. By measuring the Time-of-Flight (ToF) of these pulses between a UWB transmitter (often a tag or a device like a smartphone) and multiple UWB receivers, it can achieve sub-meter, and often centimeter-level, accuracy. This precision allows for highly localized presence detection and even real-time tracking within a defined space. Imagine not just knowing someone is in a room, but knowing exactly which side of the bed they’re on, or how close they are to the coffee machine. This directionality and accuracy open doors for incredibly specific, proximity-based automations. UWB can also be used for secure, keyless entry systems where your door unlocks only when you are within a very specific, close range.

Elevating Automations with Granular Data

Integrating Radar and UWB sensors into your Home Assistant setup transcends basic functionality, enabling a new class of intelligent automations:

  • Contextual Lighting: Instead of lights simply turning on when motion is detected, UWB can determine your position within a room. Imagine walking into your living room, and only the lights above your favorite reading chair gently illuminate as you approach it. Radar can ensure the lights remain on only while you are actively present, even if you are engrossed in a book and sitting perfectly still.
  • Intelligent Climate Control: With mmWave radar, your smart thermostat can learn not just if a room is occupied, but if it’s sedentarily occupied. This prevents unnecessary heating or cooling of empty rooms, or conversely, ensures comfort when you’re relaxing without having to wave your hand to trigger a PIR. You could even use it to ensure the fan only runs in the area of a large open-plan room where a person is detected.
  • Personalized Media Experiences: Combine UWB with Home Assistant’s media controls. As you move from the kitchen to the dining room, your podcast or music could seamlessly follow you, switching playback to the nearest speaker. If a specific UWB tag (perhaps on a remote control or a person) approaches the TV, the universal remote automation could prepare the TV for use.
  • Enhanced Security & Safety: Radar’s ability to detect presence through walls can augment security by alerting you to presence in an unexpected area, even if obscured. UWB’s precision can create virtual geofences within a home, notifying you if a child approaches a hazardous area or leaves a designated safe zone.

Integrating Radar and UWB into Home Assistant

Bringing these advanced sensors into your Home Assistant ecosystem often involves a bit of DIY, primarily leveraging ESPHome for robust, local control.

Hardware Selection

For mmWave radar, popular modules include the DFRobot mmWave Human Presence Sensor (HLK-LD2410B) or similar modules, which are cost-effective and have excellent Home Assistant/ESPHome integration. For UWB, options range from modules like the DWM1000 with ESP32-based setups for custom ranging solutions to commercial tags like Apple AirTags (with community integrations) or dedicated UWB development kits for more complex localization. For beginner DIYers, starting with an mmWave sensor is often the easiest entry point.

ESPHome Integration: A Practical Guide

ESPHome allows you to flash custom firmware onto ESP32/ESP8266 microcontrollers, turning them into smart, Wi-Fi connected sensors that seamlessly integrate with Home Assistant. This is the recommended path for most DIY radar and UWB implementations.

Action Item: Setting up an HLK-LD2410B mmWave Sensor with ESPHome

  1. Gather Materials: An ESP32 development board (e.g., NodeMCU ESP32), an HLK-LD2410B sensor, jumper wires, and a USB cable.
  2. Wiring: Connect the HLK-LD2410B’s TX pin to an ESP32 RX pin (e.g., GPIO16), and the RX pin to an ESP32 TX pin (e.g., GPIO17). Connect VCC to 5V and GND to GND.
  3. ESPHome Configuration: In your Home Assistant, navigate to ESPHome and create a new device. Use the following YAML as a starting point, adjusting GPIOs as needed:
    uart:
      id: radar_uart
      tx_pin: GPIO17
      rx_pin: GPIO16
      baud_rate: 256000
    
    sensor:
      - platform: hlk_ld2410b
        uart_id: radar_uart
        moving_target_distance:
          name: "Radar Moving Target Distance"
        stationary_target_distance:
          name: "Radar Stationary Target Distance"
        detection_distance:
          name: "Radar Detection Distance"
    
    binary_sensor:
      - platform: hlk_ld2410b
        uart_id: radar_uart
        presence:
          name: "Room Occupancy Radar"
        has_moving_target:
          name: "Room Moving Target"
        has_stationary_target:
          name: "Room Stationary Target"
  4. Flash & Integrate: Compile and flash this firmware to your ESP32. Once connected to your Wi-Fi, the device will appear in Home Assistant, exposing binary sensors for presence (moving and stationary) and sensors for distance.

Home Assistant Automations

Once configured, these new entities behave like any other sensor in Home Assistant. You can create automations that trigger when binary_sensor.room_occupancy_radar changes from off to on (or vice-versa) for advanced lighting, or use the sensor.radar_stationary_target_distance to create zones or more precise actions based on proximity.

For UWB, the integration can be more complex, often involving custom ESPHome code for ranging between multiple DWM1000 modules or utilizing community integrations for commercial UWB tags. The principle remains the same: expose distance or positional data to Home Assistant, then use that data in your automations.

Conclusion

The journey from basic motion detection to sophisticated, context-aware automations marks a significant leap in smart home intelligence. By embracing technologies like Radar and Ultra-Wideband, Home Assistant users can move beyond simple triggers to create environments that genuinely anticipate needs and react with unprecedented precision. Radar’s ability to discern sedentary presence ensures comfort and efficiency, eliminating the frustration of lights or climate control prematurely disengaging. UWB, with its sub-meter accuracy, unlocks a world of hyper-localized automations, allowing our homes to interact with us based on our exact position and proximity. While these technologies require a slightly more hands-on approach, particularly through platforms like ESPHome, the reward is a smart home experience that feels truly intuitive and responsive. As these sensors become more accessible and easier to integrate, the potential for deeply personalized and energy-efficient living spaces will only continue to grow, inviting everyone to explore the next generation of home automation.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.