XBMC / KodiΒΆ

Description

Execute rules based on XBMC / KODI based events

Devices

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "xbmcControls": {
    "protocol": [ "xbmc" ],
    "id": [{
      "server": "127.0.0.1",
            "port": 9090
    }],
    "action": "home",
    "media": "none"
  },
  "speakers": {
    "protocol": [ "kaku_switch" ],
    "id": [{
      "id": 123456,
      "unit": 4
    }],
    "state": "off"
  }
}

Rule

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "speakers-on": {
    "rule": "IF xbmcControls.action IS play THEN switch DEVICE speakers TO on",
    "active": 1
  },
  "speakers-off": {
    "rule": "IF xbmcControls.action IS pause OR xbmcControls.action IS home THEN switch DEVICE speakers TO off AFTER 3 MINUTES",
    "active": 1
  }
}

Changed in version 8.1.0.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "speakers-on": {
    "rule": "IF xbmcControls.action == play THEN switch DEVICE speakers TO on",
    "active": 1
  },
  "speakers-off": {
    "rule": "IF xbmcControls.action == pause OR xbmcControls.action == home THEN switch DEVICE speakers TO off AFTER '3 MINUTES'",
    "active": 1
  }
}