Curl command with shell_command and command_line

Hello, I have a camera that chan be controlled with http requests like this:

Preset 1- http://cam-ip/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=0?usr=username&pwd=password
Preset 2- http://cam-ip/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=1?usr=username&pwd=password

But I have a problem incorporating this with curl -k command in hassio. I’ve tried with command_line component and shell_command service with no luck.

Within the shell of hassio, curl command works fine, but not within hassio web ui when I try to call the service.
Is there a rights on the executing of shell commands within webui or there is something else that I am missing?

I had a similar issue. The way i got it working was using the RESTful command line and then using a script to run it. In your case your RESTful command will look something like this

    url: http://cam-ip/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=0?usr=username&pwd=password

and then your script will be something like this which will give you an activate button in the HASSIO front end

    service: rest_command.preset_1
1 Like

Thanks, that did the trick as alternative.

1 Like