Curl command

Hi,
My Hikvision can be controlled by using curl like this:
curl -T MotionDetection0.xml http://user:password@ip:port/MotionDetection/1

In the example above I can disable motion detection by using curl -T and the xml input file.
Can this be done in Hassio? If possible I would like to store my input xml files in a specific directory and then create restcommands for each of the functions I would like to control. Is it possible to add an input file like in the example above to the restcommand or can it be achieved using a command line switch.
Any help is appreciated!
Thanks in advance

shell_command:
  your_command_name: 'curl -T /config/www/xml/MotionDetection0.xml http://user:password@ip:port/MotionDetection/1'

Then put your files in /config/www/xml/

To run the command in an automation or script:

- service: shell_command.your_command_name

Thank you very much, this worked great!!!

1 Like

I’m trying to do something very similar, except with a URL that triggers a snapshot.

How is it that you’re actually calling this command?

Where do you call it from, an automation?