What code do I need to add to the automation to save the file form this URL to the folder " /share/snapshots/".
I know almost nothing about coding, so I would appreciate it greatly if someone could please type up some sample code, rather than directing me to the help page. I’ve read it but don’t understand most of it.
This is roughly what I have already, it’s just a modified version of what I use for other camera with a snapshot feature. The motion sensor is OK, the email is OK, I just don’t know how to save the image from that URL to my share folder:
alias: Send a picture when loading dock#1 camera#1 one senses motion
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.LD1C1_cell_motion_detection
from: "off"
to: "on"
condition: []
action:
get the image from this URL http://(IP Address)/webcapture.jpg?command=snap&channel=0&user=user&password=password and save it to the folder /share/snapshots/LD1C1.jpg (folder already set up with all permissions in place)
- service: notify.email_notification
data:
message: There is Activity on Loading Dock#1
title: There is Activity on Loading Dock#1
target: email~address.com
data:
images:
- /share/snapshots/LD1C1.jpg
mode: single
Please don’t just say that I need to read the help file, I’m not yet in a place where I understand it.
add an new automation to call the shell command with ever trigger you consider:
action:
- service: shell_command.get_it
That will download the immage. Verify the immage filename
Sorry for bumping, but i wanted to download a menu and feed it to Gemini and spent quite some time with figuring out how to pass parameters to wget and just simply download a file to the folder without specifying the filename. So enjoy my findings Finally managed to do so and the only option was to create a .sh script and run it. Then it: