Command line switch issue

Hi there,

I am having a small issue with my command line configuration. The switch is there, but I am hoping to make an http call and run a php script. Recently, my php server went down, but it is now up.

Here is my configuration. Note, I removed the http address as I want to keep my server private.

  platform: command_line
  command_on: "/usr/bin/curl -X"
  command_off: "/usr/bin/curl -X"

Any help would be greatly appreciated.

Have you tried without the -X switch?

It’s a good idea to make sure that the command completes from a command line before setting it up in HASS.

I believe that -X wants/waits for additional input.

Right! I hadn’t really gave it much thought about the command line. Thank you for clarifying this for me. I did some testing in the command line and got things going.

Initially I received a 406 error with my request. In case anyone get this error, here is what II found solved it:

/usr/bin/curl -A 'Mozilla'

Adding -A ‘Mozilla’ to end the end of the command fixed it. Thanks for your direction. Much appreciated!