Hello, What can i use for HTTP Comannd?

I have device with Http Command http://server.xxx
What can i use for On/Off ? i try to use REST switch but that just make the device On automatically activates.

Thanks!

platform: command_line
switches:
lamp_onoff:
command_on: ‘/usr/bin/curl -X GET “http://10.0.0.1/1”’
command_off: ‘/usr/bin/curl -X GET “http://10.0.0.1/0”’
friendly_name: Lamp

NightRanger From HT?

Did not work, any more idea?

Thanks!

Yes from HT :slight_smile:

Can you provide more details?

What are you trying to do, on what device is home assistant is installed on, any error messages in the log, did you try running the curl from command line first and did it work

Cool! Enable switcher…
after i add it did not make the on off, Nothing is happening.

are you add switcher to your HA? if yes can you share me your code?

Thanks!

Yes, I used this exactly for switcher You should use the example I gave you exactly as is just replace the URL with the switcher one do not change anything don’t remove or replace the double and single quotes

Yes i did it,

17-01-16 19:54:51 homeassistant.loader: Unable to find component -platform
17-01-16 19:54:52 homeassistant.loader: Unable to find component friendly_name
17-01-16 19:54:52 homeassistant.loader: Unable to find component switches
17-01-16 19:54:52 homeassistant.loader: Unable to find component lamp_onoff
17-01-16 19:54:52 homeassistant.loader: Unable to find component platform
17-01-16 19:54:52 homeassistant.loader: Unable to find component command_on
17-01-16 19:54:52 homeassistant.loader: Unable to find component command_off

this is the error from the log

the token i edit so,…

@Yanir22 First, REMOVE THE IMAGE it contains your token!!!

Second thing is, it looks like your HA configuration file is not formatted correctly (no indentations)

You can use this site: http://www.yamllint.com/ to check if it is formatted properly.

Here’s an example of my config:

i never undestand what is “indentations” and http://www.yamllint.com/ never help me to understand what wrong :slight_smile:

This is not my token, i delete it.

Thanks i ill see your config big big Thanks!

PS what are you use for config configuration.yaml? notePad ++ ?

I use sublime editor

First read this to understand what the yaml is and its format:

It should be in a very specific structure, if not HA won’t start.

http://www.yamllint.com/ is used to check if there are any errors in the structure of your yaml file and it will tell you which line.