As promised, here is my example setup. The setup is pretty much straight forward. The only part which was a bit tricky was to define the rules. My advice to you is to use the mobile frontend editor rule editors for the setup including the creation of the rules.
"plugins": [
{
"plugin": "led-light",
"active": true
},
{
"boards": [
{
"id": "1",
"boardType": "raspi-io"
}
],
"plugin": "johnny-five",
"active": true
}
],
"devices": [
{
"id": "dummyled1",
"name": "dummyLed1",
"class": "DummyLedLight"
},
{
"boardId": "1",
"pins": {
"red": "27",
"green": "28",
"blue": "29"
},
"isAnode": true,
"id": "j5led",
"name": "j5led",
"class": "JohnnyFiveRgbLed"
}
],
"rules": [
{
"id": "j5color",
"name": "j5color",
"rule": "when $dummyled1.color changes then j5 set color j5led to $dummyled1.color",
"active": true,
"logging": false
},
{
"id": "j5switch-off",
"name": "j5switch-off",
"rule": "when $dummyled1.power changes and if power of dummyled1 is off then switch j5led off",
"active": true,
"logging": false
},
{
"id": "j5switch-on",
"name": "j5switch-on",
"rule": "when $dummyled1.power changes and if power of dummyled1 is on then switch j5led on",
"active": true,
"logging": false
},
{
"id": "j5dim",
"name": "j5dim",
"rule": "when $dummyled1.brightness changes then dim j5led to $dummyled1.brightness",
"active": true,
"logging": false
}
],
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law