Hey gang,
I’m new to shell scripting but I’m reasonably confident it’s what i’m after, i’m just not sure how to pass auth details properly (have tried so many combinations of answers I’ve found online to date).
I have a wyze v2 camera which is supposed to work with mqtt, but it’s kinda flakey. There is a command I can use via a direct URL though, but it is behind the auth wall.
If I’m logged into the cameras web interface I can add
http://192.168.50.237/cgi-bin/action.cgi?cmd=toggle-rtsp-nightvision-on and it toggles the night vision mode.
I figured I should be able to use the below but it doesn’t work
shell_command:
night_mode_on_dafang_shell: curl -u "root:ismart12" http://192.168.50.237/cgi-bin/action.cgi?cmd=toggle-rtsp-nightvision-on
nothing shows up in the logs at all when i run it, but the command appears to run successfully (get a green tick) when I run it from the command line. It also doesn’t throw any errors when running it directly via SSL (but doesn’t actually work either).
If I just hit the URL http://192.168.50.237/cgi-bin/action.cgi?cmd=toggle-rtsp-nightvision-on in a browser, it pops up a dialog asking for U/P, but I imagine I have to be able to automate that process.
Tearing my hair out.