pponce/homebridge-script2

Config setup for two devices

SkyJohn opened this issue · 2 comments

What would the config layout look like if I have two separate groups of scripts that I'm using to control two devices.

You can setup up multiple individual accessories within the "accessories" block.
Something like this.
"accessories": [
{
"accessory": "Script2",
"name": "RPC3 Socket 1",
"on": "/var/homebridge/rpc3control/on.sh 1",
"off": "/var/homebridge/rpc3control/off.sh 1",
"state": "/var/homebridge/rpc3control/state.sh 1",
"fileState": "/var/homebridge/rpc3control/script1.flag",
"on_value" : "true"
}
{
"accessory": "Script2",
"name": "Alarm of bike",
"on": "~/on.sh",
"off": "~/off.sh",
"state": "~/state.sh",
"on_value" : "true"
}
]

Ah cool, didn't think it would be that simple! :)

Thanks for the quick reply.