Nikobus platform plugin for Homebridge (https://github.com/nfarina/homebridge)
- Install Homebridge.
npm install -g homebridge
- Install this plugin.
npm install -g homebridge-nikobus
- Configure the plugin by editing your Homebridge configuration file (config.json).
- see
sample-config.json
in this repository for an example
- see
- Start Homebridge
See sample-config.json
in this repository for a complete example.
This is the syntax for the Nikobus platform:
{
"platforms": [
{
"platform": "Nikobus",
"name": "Nikobus",
"port": "/dev/ttyS0",
"loglevel": 0,
"modules": [
...
]
}
]
}
platform
has to beNikobus
name
can be anythingport
is the name of the serial portloglevel
is the log level (0, 1, 2, ...)modules
is an array of modules
This is the syntax for a Switch module:
{
"type": "switch",
"name": "Switch Module 1",
"address": "1234",
"model": "05-000-02",
"outputs": [
...
]
}
type
has to beswitch
name
can be anythingaddress
is the address of the modulemodel
can be anythingoutputs
is an array of outputs
This is the syntax for an output:
{
"number": 3,
"name": "Light 2",
"service": "lightbulb"
}
number
is the number of the output (1, 2, 3, ...)name
can be anythingservice
has to belightbulb
orswitch
This is the syntax for a Pushbutton module:
{
"type": "pushbutton",
"name": "Pushbutton 1",
"address": "123456",
"model": "05-000-02",
"buttons": [
...
]
}
type
has to bepushbutton
name
can be anythingaddress
is the address of the modulemodel
can be anythingbuttons
is an array of buttons
This is the syntax for a button:
{
"number": "A",
"name": "Television On",
"service": "lightbulb"
}
number
is the number of the button (has to beA
,B
,C
,D
with an optional1
or2
prefix)name
can be anythingservice
has to belightbulb
orswitch