1.0.7 • Published 3 years ago
homebridge-nikobus v1.0.7
homebridge-nikobus
Nikobus platform plugin for Homebridge (https://github.com/nfarina/homebridge)
Installation
- 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.jsonin this repository for an example
- see
- Start Homebridge
Configuration
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": [
...
]
}
]
}platformhas to beNikobusnamecan be anythingportis the name of the serial portloglevelis the log level (0, 1, 2, ...)modulesis an array of modules
Switch module
This is the syntax for a Switch module:
{
"type": "switch",
"name": "Switch Module 1",
"address": "1234",
"model": "05-000-02",
"outputs": [
...
]
}typehas to beswitchnamecan be anythingaddressis the address of the modulemodelcan be anythingoutputsis an array of outputs
This is the syntax for an output:
{
"number": 3,
"name": "Light 2",
"service": "lightbulb"
}numberis the number of the output (1, 2, 3, ...)namecan be anythingservicehas to belightbulborswitch
Pushbutton module
This is the syntax for a Pushbutton module:
{
"type": "pushbutton",
"name": "Pushbutton 1",
"address": "123456",
"model": "05-000-02",
"buttons": [
...
]
}typehas to bepushbuttonnamecan be anythingaddressis the address of the modulemodelcan be anythingbuttonsis an array of buttons
This is the syntax for a button:
{
"number": "A",
"name": "Television On",
"service": "lightbulb"
}numberis the number of the button (has to beA,B,C,Dwith an optional1or2prefix)namecan be anythingservicehas to belightbulborswitch