There is no static url, you need to point your webhook url to the one you create as an automation …
Look on this page, in section: webhook trigger…
There is no static url, you need to point your webhook url to the one you create as an automation …
Look on this page, in section: webhook trigger…
Thanks! I think I have it figured out.
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.
I am running into some issues and am unsure where exactly. I’ll recap the steps I took:
configuration.yaml
to contain:homeassistant:
auth_providers:
- type: trusted_networks
trusted_networks:
- 10.0.1.xx #This is my NAS IP
automations.yaml
to contain:- alias: 'Porch Camera Motion' ## http://10.0.1.56:8123/api/webhook/motion_porch ##
hide_entity: true
trigger:
- platform: webhook
webhook_id: home_porch_motion
action:
- service: camera.snapshot
data:
entity_id: camera.home_porch
filename: '/config/www/snapshot-porch.jpg'
- service: script.turn_on
entity_id: script.snapshot_porch_camera
scripts.yaml
to contain: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.
The blueprint is expecting a binary_sensor
as that’s the way it was designed. What cameras are you using?
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
Thank you for the quick response!
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?
Yep, you need to make sure you have that entity first.
Thank you, I just got it working! Here’s an updated guide of what I did:
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
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:
Use @xbmcnut’s modified blueprint in this post: Send Synology Surveillance motion events to HA switch.
At the end of it all, you should be able to test it by clicking Test Send within the Action Rule app. Thanks everyone!
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.
- 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
Just tried it out, you are correct! I will update my previous post. Thanks again, I really appreciate how this community helps beginners.
I’ve been trying to get this working, where do i find the correct “ID:” to enter? Also in the automations.yaml should the first line be
-alias: 'Porch Camera Motion" 192.168.0.133
As an example?
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.
Glad you got it working.
@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?
Did you download the original version of the blueprint, create a renamed copy and edit that one line?
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.
@xbmcnut @FlyersPh9 is there a way to make these notifications clickable to where they take you directly to a Lovelace Camera dashboard?