Hi, I made an automation that will send me an email with a snapshot of my front camera when ever someones triggers it. see attached code:
- id: '1576949983926'
alias: Send pic to phone
description: Send a pic to my phone if alarm is on and line is crossed
trigger:
- entity_id: binary_sensor.framsidan_line_crossing
platform: state
to: 'on'
condition:
- condition: state
entity_id: input_boolean.alarm_on
state: 'on'
action:
- data:
filename: /config/cctv/framsidan_1.jpg
entity_id: camera.framsidan
service: camera.snapshot
- data:
data:
images:
- /config/cctv/framsidan_1.jpg
message: Vem är detta?
title: Larm
service: notify.hemma_larm
When I trigger it through hassio it does as it should, sends me a pic.
When I try to trigger it by crossing the line IRL, it sends me an email with a corrupt (or empty) jpg… When I try to open the jpg through ssh to view it manually it is also corrupt (or empty).
Any ideas on what is going on, is there a bug here? Since I can not figure out why triggering it though hassio would function and triggering it IRL would not… Code is the same…
Hey, no it started working much better after an update, I think it was 101, so now it works 90% of the time, I am waiting for the push notification system to enable local images to be pushed to solve this issue.
Hi, this is still an issue even when sending snapshots through the mobile app, I can access them on lan and wan, there is no issue with connection or permission, when triggering the automation manually I get the desired behavior with the app showing me a snapshot, but sometimes I do not get an image even thou I get the notification, when trying to open the image manually through the web adress to the storage path “myip”/local/“image path”, the image is just a grey frame on black screen, so it is corrupt in some ways. Any idea on how to fault search this?