Smart Home Automation Forum
integrate home assistant by http url command sample - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: Development (https://www.kincony.com/forum/forumdisplay.php?fid=4)
+--- Thread: integrate home assistant by http url command sample (/showthread.php?tid=1316)



integrate home assistant by http url command sample - admin - 12-08-2021

here is a http url command integrate with home assistant config demo sample for button5 (thanks for our customer supplied the config code)

- platform: command_line
  switches:
    poolbtn5:
        command_on: "curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?Relay05=ON&postpwd=12345'"
        command_off: "curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?Relay05=OFF&postpwd=12345'"
        command_state: curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?RelayFF=RD&postpwd=12345' | grep -oP "(?<=btn5)(.*)(?=btn6)"
        value_template: '{{"ON" in value}}'
        friendly_name: poolbtn5


RE: integrate home assistant by http url command sample - engmohades - 12-11-2021

how to use these integrate home assistant by http url command sample?


RE: integrate home assistant by http url command sample - admin - 12-11-2021

we suggest integrate home assistant by MQTT. if you really want integrate with http, you can see the above configure of yaml file.