Hi there,
I have an automation with my Dahua VTO portier which works perfectly (see code below).
Yesterday, for some reason, the screen of the tablet didn’t switch on and basically I see full automation was stopped at the very beginning for some reason related to the camera snapshot was not taken → and consequently all other steps were not executed, including switching on the tablet screen, playing a music, showing camera feed etc … :
id: 4cf62087-4164-4685-be6d-2ede8401d5fa
alias: Dahua VTO
trigger:
- platform: event
event_type: dahua_vto
event_data:
Code: BackKeyLight
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.Data.State | int in [1, 2] }}'
sequence:
- data:
title: >-
{{ 'Doorbell Ring' if trigger.event.data.Data.State | int in [1,
2] else 'Doorbell No Ring' }}
message: '{{ trigger.event.data }}'
action: persistent_notification.create
- target:
entity_id: camera.192_168_1_110
data:
filename: /config/www/Camera-snapshots/ced-snapshot.jpg
action: camera.snapshot
- data:
title: Portier VTO2000
message: Quelqu'un sonne à la porte !!
data:
content-type: jpg
image: >-
http://www:8123/local/Camera-snapshots/ced-snapshot.jpg
clickAction: http://www:8123/smartphone-cameras/0
action: notify.mobile_app_sm_a536b
- data:
title: Portier VTO2000
message: Quelqu'un sonne à la porte !!
data:
content-type: jpg
image: >-
http://www:8123/local/Camera-snapshots/ced-snapshot.jpg
action: notify.mobile_app_sm_a515f_nada
- metadata: {}
data: {}
target:
entity_id: switch.lenovo_tab_m10_plus_3rd_gen_screen
action: switch.turn_on
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- target:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
data:
media_content_type: music
media_content_id: http://www:8123/local/Lili25.mp3
action: media_player.play_media
- data:
value: '300'
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
enabled: true
action: number.set_value
- data:
title: Caméra Extérieure
dismissable: false
content:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.192_168_1_110
timeout: 120000
size: fullscreen
browser_id:
- Lenovo-tablette
right_button: Raccrocher
right_button_action:
service: media_player.media_stop
data:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
left_button: Laisser vidéo 5m
left_button_action:
service: browser_mod.sequence
data:
sequence:
- service: browser_mod.popup
data:
title: Caméra Extérieure
dismissable: true
content:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.192_168_1_110
timeout: 300000
size: fullscreen
browser_id:
- Lenovo-tablette
- service: media_player.media_stop
data:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
action: browser_mod.popup
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- data:
value: '30'
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
action: number.set_value
- conditions:
- condition: template
value_template: |
{{ trigger.event.data.Data.State | int == 6 }}
sequence:
- data:
title: Dahua_VTO - Not answered - type 6
message: '{{ trigger.event.data }}'
action: persistent_notification.create
default:
- data:
title: Unknown state {{ trigger.event.data.Data.State | int }}
message: '{{ trigger.event.data }}'
action: persistent_notification.create
mode: queued
Is there a way I can see what really happens ?
Camera not available or … ?
Is there a way I can tell if a step is not executing, to “ignore” it ? Because specifically here taking the camera snapshot is not really important, but I missed the call on my tablet
Many thanks !!