Qwiic PIR Motion Binary Sensor

The Qwiic PIR Motion binary sensor allows you to use your Qwiic PIR (EKMC4607112K basedExternal link, EKMB1107112 basedExternal link, firmware documentationExternal link) sensors from SparkFun with ESPHome.

SparkfunExternal link

The SparkFun Qwiic PIR Motion binary sensor uses PIR sensors to detect motion. It communicates over I²C. There are two models currently available. One uses the Panasonic EKMC4607112K sensorExternal link, and the other uses the Panasonic EKMB1107112 sensorExternal link.

You can configure a debounce mode to reduce noise and false detections. See Debounce Modes for the available options.

To use the sensor, first set up an I²C Bus and connect the sensor to the specified pins.

# Example configuration entry
binary_sensor:
  - platform: qwiic_pir
    name: "Qwiic PIR Motion Sensor"

Configuration variables: Copy link to header

  • debounce_mode (Optional, enum): How the component debounces the motion sensor’s signal. Must be one of HYBRID, NATIVE, or RAW. See Debounce Modes for details. Defaults to HYBRID.

  • debounce (Optional, Time): Only valid when using NATIVE debounce mode. Configures the debounce time on the sensor to reduce noise and false detections. Defaults to 1ms.

  • All other options from Binary Sensor.

Debounce Modes Copy link to header

There are three options for debounce_mode.

  • HYBRID:

    • Use a combination of the raw sensor reading and the sensor’s native event detection to determine state.
    • Very reliable for detecting both object’s being detected and no longer detected.
    • Use binary sensor filters to reduce noise and false detections.
  • NATIVE:

    • Use the sensor’s native event detection to debounce the signal.
    • Logic follows SparkFun’s reference example implementationExternal link.
    • May be unreliable at detecting when an object is removed, especially at high debounce rates.
    • Binary sensor filters are not necessary to reduce noise and false detections.
  • RAW:

    • Use the raw state of the PIR sensor as reported by the firmware.
    • May miss a very short motion detection events if ESPHome’s loop time is slow.
    • Use binary sensor filters to reduce noise and false detections.

See Also Copy link to header

CURRENT