UniPi REST API example -

281 views
Skip to first unread message

Jirka Toušek

unread,
Nov 9, 2015, 10:53:46 AM11/9/15
to Home Assistant Dev
Hi,

I have got a board UniPi 1.1 from http://unipi.technology/. It goes on an additional IoT Relay (1-Wire, RTC...) board for Raspberry Pi. My HomeAssistant is installed on an Router with OpenWRT system.
There is a sample configuration of Command Line-Switch for switching the UniPi Relays through the original EVOK API https://github.com/UniPiTechnology/evok

switch:
  platform: command_switch
  switches:
    UniPi Relay 1:
      oncmd: "/usr/bin/curl -X POST -d 'value=1' http://192.168.220.226/rest/relay/1"
      offcmd: "/usr/bin/curl -X POST -d 'value=0' http://192.168.220.226/rest/relay/1"
Reply all
Reply to author
Forward
0 new messages