Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95354

Command_line to send Http

$
0
0

@golfusderoma wrote:

Hi all and thanks for the community!!
Noob!!
HASS 0.107.7
Trying to send command-line to RPI running Octopi/Enclosure plugin but no results.
In my config.yaml I got this:

- platform: command_line
  switches:
    luz_impresora:
       command_on: '/usr/bin/curl -X GET "http://octopi.local/plugin/enclosure/setIO?status=false&index_id=1&apiKey=7736C8CB4B0XXXXXXXXXXXXXX"'
       command_off: '/usr/bin/curl -X GET "http://octopi.local/plugin/enclosure/setIO?status=true&index_id=1&apiKey=7736C8CB4B0XXXXXXXXXXXXX"'
       friendly_name: Luz Impresora Ender

I got the Switch on my Lovelace but when I try to change it always reverts to original position.

If I write in my browser “http://octopi.local/plugin/enclosure/setIO?status=false&index_id=1&apiKey=7736C8CB4B0XXXXXXXXXXXXXX”, It works perfect, I got action switching ON/OFF the light depending on the true/false command.

Tried without the /usr/bin/… but nothing, removing the -X GET same.
Changed octopi.local for the IP same result.
I checked indentation, also quotation (removing, adding, changing) but no answer at all.
At this moment I’m lost.
I simply need to send that http command to the octopi with HASS
Any help welcome.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>