Qwiic PIR Motion Binary Sensor

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

../../_images/qwiic_pir.jpg

SparkFun Qwiic PIR sensor. (Credit: Sparkfun, image cropped and compressed)

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 sensor, and the other uses the Panasonic EKMB1107112 sensor.

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:

  • 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

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 implementation.

    • 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