this is the call from hassio:
pics_telegram_entrance: bash '/config/cam_script/snapshot_entrance.sh'
This is the actuall bash script:
#!/bin/sh
# do stuff
rm -f /share/entrance1.jpg
rm -f /share/entrance2.jpg
echo "deleted entrance pics"
# tp-link nc260
wget --output-document '/share/entrance1.jpg' --user='xxx' --password='xxx' 'http://xxx:8080/stream/snapshot.jpg'
sleep 10
wget --output-document '/share/entrance2.jpg' --user='xxx' --password='xxx' 'http://xxx:8080/stream/snapshot.jpg'
sleep 2
echo "done"
rm -f ${LOCKFILE}
echo 'exit'
when I call the script from terminal:
Connecting to 192.168.4.42:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Digest realm="TP-Link IP-Camera",algorithm="MD5",qop="auth",nonce="374d98e80cf812ddbe6191c049faf8ab000102a9216f4161",opaque="64943214654649846565646421"
Reusing existing connection to 192.168.4.42:8080.
HTTP request sent, awaiting response... 200 OK
Length: 101792 (99K) [image/jpg]
and when running from inside hassio the pics is removed but the wget command don’t seem to work, could it be the 401 response that cause this?