My front camera displays video but I can’t get the motion automation working.
I manually changed the id after copying the id (changed some hex values to make it unique) from another camera that works.
I don’t know how to get HA to reset the id since this does not work.
- alias: Notify iOS Front Camera
initial_state: true
trigger:
- platform: state
entity_id:
- camera.front_camera
to: 'on'
action:
- service: notify.mobile_app_iphone_13
data:
message: Front camera motion detected
data:
push:
sound: Front camera motion detected.wav
id: e53d14a2474249f0955197bfc439972f
The cameras all work using the Hikvision app… I am still working with redoing the automations using the UI. The automations are still not working. I send another message this afternoon with an example.
They were visible with my YAML automations but now I deleted all four camera automations and used the UI to create them (See screenshot).
Looks like I got the generic camera automations working. I will test when I get home.
Just noticed that the entitiy id use to be “binary_sensor.front_yard_motion”. and now it is “camera.front_camera”.
None of the cameras trigger off motion but I have been getting push notifications throughout the day. I do still have a “/homeassistant/binary_sensors.yaml” file
Old yaml code
#Front Camera Motion Detection
- alias: Notify iOS Front Camera
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.front_yard_motion
to: 'on'
action:
- service: notify.mobile_app_keith
data:
message: Front camera motion detected
data:
push:
sound: Front camera motion detected.wav
New yaml configuring with GUI
alias: Front Camera Detected Motion
description: ''
trigger:
- platform: state
entity_id:
- camera.front_camera
condition: []
action:
- service: notify.mobile_app_iphone_13
metadata: {}
data:
message: Front camera motion detected
mode: single
- id: '1712711483881'
Okay… Getting closer… Now when I run action for any of the cameras I get barraged with push notifications. I have disable that automation and restart HA.
I’m open for suggestions… As I mentioned before. My yaml automations worked accept for one camera. I no longer have the option of “binary_sensor.bbq_motion” as an entity.
Old yaml automation:
#BBQ Camera Motion Detection
- alias: Notify iOS BBQ Camera
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.bbq_motion
to: 'on'
action:
- service: notify.mobile_app_keith
data:
message: Barbeque camera motion detected
data:
push:
sound: Barbeque camera motion detected.wav
All four camera’s are Hikvision POE powered connected to an NVR. I still have not been able to get any of the camera’s to detect motion (me walking around). With the current configuration, I am getting intermittant push notifications that seem like motion is being detected.
Here is my latest automation for the BBQ camera.
- id: '1712966749466'
alias: BBQ Camera Detects Motion
description: ''
trigger:
- alias: When BBQ Camera Detected Motion
platform: state
entity_id:
- camera.bbq_camera
id: 'On'
condition: []
action:
- service: notify.mobile_app_iphone_13
metadata: {}
data:
message: BBQ camera detected motion
mode: single
I have been reading about having to run the “enable_motion” service. I have tried this but get an error.