Hi there,
I use this code to take a snapshot and send it as notification:
action:
- variables:
path: /config/www/tmp/
datetime: "{{as_timestamp(now()) | timestamp_custom('%y%m%d_%H%M%S')}}"
time: "{{as_timestamp(now()) | timestamp_custom('%H:%M')}}"
inturl: http://192.168.100.23:8123/local/tmp/
exturl: http://exturl.net:8123/local/tmp/
- delay: "00:00:01"
- service: camera.snapshot
data:
filename: "{{path}}{{datetime}}_Haustuer.jpg"
target:
entity_id: camera.webcamhaustuer_snapshots_sub
- service: camera.snapshot
data:
filename: "{{path}}{{datetime}}_Pool.jpg"
target:
entity_id: camera.webcampool_snapshots_sub
- delay: "00:00:01"
- service: notify.mobile_app_handynermin
data:
title: Bewegung erkannt
message: >
{% if trigger.entity_id == 'binary_sensor.webcamhaustuer_person'
%}Bewegung vorm Haus um {{time}} Uhr erkannt{% else %}Bewegung vorm Pool
um {{time}} Uhr erkannt{% endif %}
data:
image: "{{exturl}}{{datetime}}_Haustuer.jpg"
clickAction: /dashboard-nermin/sicherheit
group: webcam
channel: SemiCritical
- service: notify.mobile_app_handynermin
data:
title: Bewegung erkannt
message: >
{% if trigger.entity_id == 'binary_sensor.webcamhaustuer_person'
%}Bewegung vorm Haus um {{time}} Uhr erkannt{% else %}Bewegung vorm Pool
um {{time}} Uhr erkannt{% endif %}
data:
image: "{{exturl}}{{datetime}}_Pool.jpg"
clickAction: /dashboard-nermin/sicherheit
group: webcam
channel: SemiCritical
mode: single
The issue is following:
- If my phone is in home WiFi, than snapshots are only shown in notifications, if I use the inturl in the “image:” attribute
- when my phone is on GSM, snapshots are only shown, if exturl is used
Other combination (WiFi+exturl or GSM+inturl) simply show no snapshot in the notification.
Is this normal behavior?
Cheers and thanks,
zavjah