Anyone care to suggest what sort of latency they are seeing from this? I’m looking into putting some cameras in the hallway of my house and currently use a motion sensor to trigger lighting at night. Would this be a fast enough replacement, or would you get most of the way down a hallway before HA even got the motion detection event?
Understand its going to be camera dependent, but a general idea would be good.
This is pretty fast in my experience, <2s. If you use a Hikvision camera though, HA have native integration for the cameras integrated sensors including motion, line cross and intrusion detection (which I also use), that may be a little faster and be easier to integrate?
OK that sounds interesting, I was actually looking at Hikvision so that might be a better option.
I currently have two types of motion sensors, one hardwired Ness units (painful to run new cabling in the roof for them though) and they are <100ms so pretty great, and Ikea Zigbee ones which are about 500ms or more. 2s sounds like much too much, I’d get most of the way down the hall and/or fall over something in the dark at that point.
snapshot_porch_camera:
alias: Trigger input boolean for motion from API
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.home_porch_motion
- delay: 00:00:05
- service: input_boolean.turn_off
entity_id: input_boolean.home_porch_motion
Now here is where I am getting confused. I’ve installed this blueprint (📸 Send camera snapshot notification on motion) and it needs a binary_sensor to trigger the automation. What do I feed into the motion sensor field in this blueprint from all of this above? I thought it would be input_boolean.home_porch_motion but that doesn’t seem to be an entity? Did I miss a step? Forgive me, I am very new to Home Assistant.
You could also edit the blueprint here config\blueprints\automation\vorion\send-camera-snapshot-notification-on-motion.yaml (create a copy) and change the motion sensor domain to input_boolean?
blueprint:
name: Send a camera snapshot when motion is detected
description: 'This automation blueprint creates a camera snapshot if motion is detected and
sends a notification to your phone with the picture.
'
domain: automation
input:
motion_sensor:
name: Motion sensor
description: The sensor which triggers the snapshot creation
selector:
entity:
domain: input_boolean
device_class: motion
With this modified blueprint, I would fill input_boolean.home_porch_motion for motion sensor? I see that entity listed in scripts.yaml but not mentioned anywhere else. That entity is not showing up in HA for me. Did I miss the instructions to create that entity?
Thank you, I just got it working! Here’s an updated guide of what I did:
In configuration.yaml add these 2 pieces:
homeassistant:
auth_providers:
- type: trusted_networks
trusted_networks:
- 192.168.1.26 # You Synology Surveillance Station IP
input_boolean:
home_porch_motion:
name: Porch camera motion
icon: mdi:cctv
In automations.yaml add the following. Pay attention to the webhook URL and ID.:
- alias: 'Porch Camera Motion' # For reference, paste your webhook URL that you setup in Synology here: http://192.168.1.56:8123/api/webhook/motion_porch
trigger:
- platform: webhook
webhook_id: motion_porch
action:
- service: camera.snapshot
data:
entity_id: camera.home_porch
filename: '/config/www/snapshot-porch.jpg'
- service: input_boolean.turn_on
entity_id: input_boolean.home_porch_motion
- delay: 00:00:05
- service: input_boolean.turn_off
entity_id: input_boolean.home_porch_motion
id: 534b021d797b4db29c9ceabefec0bbc6
In Synology Surveillance Station, open Action Rules and enter these settings. In the third picture it says Action 2, if you are just setting this up you will only have Action 1:
Awesome, well done. If you want to keep things tidy, you could just add the following into your action items without using the script. I only used a script as I had another action after this code that I didn’t want affected by the delay but you don’t need that.
Disregard, i got it working. Thanks for you guys working this out. I have it working well with my Synology Surveillance Station and reolink cameras. Well Done.
@FlyersPh9 I am getting stuck on the “edited” version of the blueprint. I can change the value but but then it’s showing I have “unknown tag !<!input>” errors throughout the blueprint. Did you change any thing else on this blueprint?
Anyway someone can share the entire .yaml for this?
I think my issue may have been the auth_providers line where I placed my Synology as a trusted user. I’ve never set up auth_providers before this and I believe that line ended up locking me out of my Home Assistant when I rebooted.