Motion detection solution needed to ignore cars

Hi,

I‘m using HA on PI4 together with Zigbee2mqtt and have some bulps and outdoor motion sensors from Philips Hue running around my house.

Is a motion detected i use the blueprint „Sensor Light“ automation to turn the light on if movement happen at specific sun state. This is working good for weeks now.

So far so good, now i found out that my motion sensor on street side also turn always the lights on if a car drive at the street in front of my house. Here i look for ideas to fix this. Replace the motion sensor is not an option and the motion sensitivity is already set to low but not helpful.

I would be happy if someone can guide me to possible solutions to avoid that the light turns on when a car for a second past my house.

What i have in mind is turn only light (or start automation) if two movements happened and triggered by the street side motion sensor within 20 or 30 seconds otherwise do nothing.

If other solutions existing also good to hear.

I‘m not an HA expert, sorry for that.

Hope the question is clear and any help or other ideas are welcome.

You can fulfill that with a wait_for_trigger action.

Thanks for your fast feedback.

I read the details provided with your link but maybe I’m short on HA knowledge and have no plan how to put the puzzle together and where to implement that at the end after wait for trigger is going to start the existing blueprint automation.

Some more details:

If a motion is detected by the philips hue motion sensor the following street side sensor: “binary_sensor.motion_str_nord_occupancy”

switch to “on” (motion detected) and if no further movement detected
it switch automatically to “off” after 10 seconds.

A car crossing my house is less than 2 seconds in the detection radius mean
from detection switch to “on” to detection switch to “of” status it take 12 seconds.

If a person is going this way it is minimum 7 to 10 seconds in the detection radius which mean here 7-10 seconds moving + 10 seconds after last move detection the of status come after 17 to 20 seconds.

Giving this details i would be happy if you can give some more advice how
i implement the wait for trigger so that after for example 15 seconds sensor in state “on” start the automation named “Auto_Outdoor_Light”.

Sorry for taking your time.

As i’m willing to learn i tried now following:

  • Removed the start trigger entity from the automation blueprint “Sensor Light” copy named “Auto_Outdoor_Light”. Mean it will never start alone now.

  • I created another automation using the motion sensor as trigger and added duration 12 seconds and as action i added run automation “Auto_Outdoor_Light”

yaml code in new automation looks like this:

alias: MotionStreetDelay2Sec
description: “”
trigger:

  • type: motion
    platform: device
    device_id: 745929c61adde232e58991ef820xxxxx
    entity_id: ff12c8fe64157dfbb6079d803f9xxxxx
    domain: binary_sensor
    for:
    hours: 0
    minutes: 0
    seconds: 12
    condition:
    action:
  • service: automation.trigger
    target:
    entity_id: automation.auto_outdoor_light
    data:
    skip_condition: true
    mode: single

This is working so far but i do not know if this is best praxis and stable or should i do it on other way?

What is not so good and was not expected is the fact that if i go to my door it took now 12 seconds before i get light. Good side cars ignored now but persons have to wait now until light goes on.

Seems not perfect for the moment. Any chance to improve further?

Or just a side question: Has someone tried to tape off the motion sensor a bit to not goes as long with detection radius? Make this sense and what stuff can be taken if tape off make sense?

If I understood you, your goal is to turn on the light when movement is detected for more than 2 seconds and turn it off 10 seconds after detection stops. This example automation does that:

alias: Movement Detection Light
description: "Turn on the light when movement is detected for more than 2 seconds and turn it off 10 seconds after detection stops."
trigger:
  - platform: state
    entity_id:
      - binary_sensor.garage_multi_motion_detection
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 3
    id: "on"
  - platform: state
    entity_id:
      - binary_sensor.garage_multi_motion_detection
    to: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 0
    id: "off"
condition: []
action:
  - if:
      - condition: trigger
        id:
          - "on"
    then:
      - service: light.turn_on
        target:
          entity_id: light.all_garage_lights
        data: {}
    else:
      - delay:
          hours: 0
          minutes: 0
          seconds: 10
          milliseconds: 0
      - service: light.turn_off
        target:
          entity_id: light.all_garage_lights
        data: {}
    alias: Conditions per trigger
mode: restart  # Turn on again if movement occurs during the wait period.

I accomplish this using video cameras (even a video doorbell will work), combined with BlueIris and Deepstack. Deepstack can recognize and identify all sorts of stuff - people, deer, dogs, cats, horses, bicycles, boats, cars, trucks, etc. Then you can configure it to only send alerts when one of the objects you specified is identified. Don’t want it to do anything when a car or truck is identified? Don’t send alerts for those objects.

Detailed info on how to set it up and configure notifications (part 1 of 3):

1 Like

Thanks again for supporting me. Maybe i confused you with all my numbers and i will try to bring more clarity in the as is state.

If i did not something wrong or missed a setting as i implemented the Philips Hue Motion Outdoor Sensors (black devices) i see as an entity which i can use for motion one called occupancy and this seems to have a shortest interval of 10 seconds between a motion detection ON state and going back to OFF state.

Is it possible to get another entity enabled to see the seconds of motion in real which i have to activate somewhere?

As per current limit without knowing better ways my idea was using time of motion by car 2 seconds + 10 seconds which the sensor wait after last motion detected would set occupancy to OFF after 12 seconds.

Thanks, very interessting but currently not planend to Nix or available hardware to do this. But I saved the Video for later usage. :grinning:

If the motion sensor itself has a timeout of 10 seconds then there’s nothing you can outside of it to get more a real-time detection.

I’ve been meaning to go down this road for some time. Been using Zoneminder for a while, but the software it’s getting creaky do to waning maintenance.

Thanks for your help and explanations.

In summary i use now a regular motion detection blueprint but put some tape on the motion detector sensor street side. This limit now the detection radius to not monitor the street any longer. Not perfect but seems best solution for now.

Wish you all a Happy New Year!

1 Like