Foscam camera error return code: 2 NoneType: None

I’m trying to configure my camera to move to certain point called “8”.

I’ve created shell_command in my configuration.yaml
camera_foscam_camera_preset_off: curl "https://192.168.XXX.XXX/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=8&usr=XXX&pwd=XXX”

and as a result I get in log:
ERROR (MainThread) [homeassistant.components.shell_command] Error running command: curl "https://192.168.XX.XXX:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=8&usr=XXX&pwd=XXX”, return code: 2
NoneType: None

What is wrong? Normally when I type “https://192.168.XXX.XXX/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=8&usr=XXX&pwd=XXX” in my web browser, camera normally gets to that point and says on the webpage:

why are you adding the port 443 at the end of the ip address in your curl command? to operate my camera i need to put in the local ip:port of my camera but i’m not sure you can use port 443 as the http port of your camera.

what happens when you run the curl command without the port 443 added in a ssh terminal on your HA machine?

The result is the same.


try the command using http: instead of https:

you will need to specify the http port if it’s different than the https: port, and it probably is.

There was something wrong with ” at the end of my command line. Now it’s working.

glad you figured it out.