Hi,
Solved: by using /media instead of /tmp
I’m trying to create an automation to take a picture and send it as a notification to my phone when my entrance door opens. (door sensor).
To do so, I’m trying to take a snapshot. Save it in the /tmp/snapshots folder and get it from there when the notification is generate. The problem is that I can’t figure out how to save the snapshot. When I run the actions, home assistant says “action ran successfully”, but nothing is being saved in the snapshots folder.
I have set /tmp and /tmp/snapshots to 777, but that didn’t change anything.
I have also added /tmp/snapshots to allowlist_external_dirs
Since it’s not giving me any error, I’m not sure what to do next.
Any help would be really appreciated.
Thank you
Here is my yaml code for the automation;
- id: "1656279294449"
alias: Entrance Snapshot
description: ""
trigger:
- type: opened
platform: device
device_id: 69392729e1adfaed546201ba9f839ff3
entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_161be107_on_off
domain: binary_sensor
condition: []
action:
- service: camera.snapshot
data:
filename: /tmp/snapshots/entranceSnapshot.jpg
target:
entity_id: camera.camera1_mediaprofile_channel1_mainstream
mode: single
Here is my camera onvif config:
"data": {
"config": {
"entry_id": "56768d5aa6711ee4059fe874c0646465",
"version": 1,
"domain": "onvif",
"title": "Camera1 - 9c:8e:cd:18:90:4f",
"data": {
"name": "Camera1",
"host": "**REDACTED**",
"port": 80,
"username": "**REDACTED**",
"password": "**REDACTED**",
"snapshot_auth": "digest"
Here is my configuration.yaml:
homeassistant:
internal_url: "http://homeassistant-local.ootechnologies.ca:8123"
external_url: "https://homeassistant.ootechnologies.ca"
allowlist_external_dirs:
- /tmp/snapshots