shell_command:
# Downloads a nest event video using the supervisor proxy and token
# Accepts variables: camera_id (the Nest Device ID), video_path (relative API path)
download_nest_event_video: '/usr/bin/wget -O "/config/www/nest/{{ camera_id }}/latest.jpg" "http://supervisor/core{{ video_path }}" --header "Authorization: Bearer <manually insert long lived token here>"'
when I drop on the terminal itself, multiple versions of this command works…
I can run it with wget bearer long live token
$/usr/bin/wget -O "/config/www/nest/{{ camera_id }}/latest.jpg" \
"http://supervisor/core{{ video_path }}" \
--header "Authorization: Bearer <actual long lived token here>
I can run it with bearer $SUPERVISOR TOKEN
$/usr/bin/wget -O "/config/www/nest/{{ camera_id }}/latest.jpg" \
"http://supervisor/core{{ video_path }}" \
--header "Authorization: Bearer <manually insert long lived token here>
I can run it with curl and the 2 options above as well…
It feels like I’m missing something, but not quite sure what…
I test the command inside
https://ha.local:port/developer-tools/action
and I get
wget: server returned error: HTTP/1.1 401 Unauthorized
the log says:
Error running command: `/usr/bin/wget -O "/config/www/nest/{{ camera_id }}/latest.jpg" "http://supervisor/core{{ video_path }}" --header "Authorization: Bearer <actual long lived token here>"`, return code: 1
I see some old threads saying it could be ip_ban, I don’t have this enabled in my http settings… what I’m I missing?