Http command from home assistant

Hello I hope someone can help me with this.
I need a on/ off switch oh HA that can call a http command.

If I type:
http://192.168.178.193/plugins/max2play_settings/controller/Xbmc.php?action=stop&downloadurl=&addonurl=&addonbox=
In my web browser my kodi service will stop.
If i type:
http://192.168.178.193/plugins/max2play_settings/controller/Xbmc.php?action=start&downloadurl=&addonurl=&addonbox=
in my web browser my kodi service will start.

I tried it with a command_line switch. The config is good and HA will restart.
But when I use the switch nothing will happen.

switch:
  platform: command_line
  switches:
    kodi:
      command_off: '/usr/bin/curl -X GET “http://192.168.178.193/plugins/max2play_settings/controller/Xbmc.php?action=stop&downloadurl=&addonurl=&addonbox=”'
      command_on: '/usr/bin/curl -X GET “http://192.168.178.193/plugins/max2play_settings/controller/Xbmc.php?action=start&downloadurl=&addonurl=&addonbox=”'

Just for kicks, try switch the single and double quotes, ie “” on the outside ‘’ on the inside.

Make sure they are “real” double quotes, not open and closed “smart” doublequotes. What you pasted looked suspicious in the regard.

1 Like

That’s it! Many thanks for this!