homebridge-programmableswitch
v0.0.33
Published
Homebridge Programmable Switch plugin for Homebridge
Downloads
46
Maintainers
Readme
homebridge-programmableswitch
Supports Programmable Switch devices on HomeBridge Platform.
It currently covers Python script triggering for
- IR codes (via LIRC)
- Blyss devices thx StefTech
- A custom 433Mhz protocol of mine
Installation
- Install homebridge using: npm install -g homebridge
- Install this plugin using: npm install -g homebridge-programmableswitch
- Update your configuration file as bellow.
Configuration
Configuration sample:
{
"bridge": {
...
},
"description": "...",
"accessories": [{
"accessory": "ProgrammableSwitch",
"name": "Programmable Switch",
"id": 123,
"statefull": true,
"pythonScriptPath": "ABSOLUTE_TO_YOUR_SCRIPT",
"pythonScriptName": "SCRIPT_NAME.py",
"minValue": 0,
"maxValue": 3,
"manufacturer": "Manufacturer",
"model": "Model",
"serialnumber": "Serial Number",
"isDummy": false,
"buttonId": 1,
"timer": 60,
"irCommands": {
"0": [{
"remote": "myRemote",
"key": "myKey"
},
{
"remote": "myRemote",
"key": "myKey"
}],
"1": [{
"remote": "myRemote",
"key": "myKey"
}],
"2": [{
"remote": "myRemote",
"key": "myKey"
}, {
"remote": "myRemote",
"key": "myKey"
}]
}
}],
"platforms":[]
}
Unfortunatelly, I'm also workin on an option "statefull": false,
but the StatelessProgrammableSwitch
looks unstable for now. Use with care, any feeback will be welcomed.
For Bliss
{
"accessory": "ProgrammableSwitch",
"name": "Socket",
"statefull": true,
"pythonScriptPath": "/usr/local/lib/node_modules/homebridge-programmableswitch/",
"pythonScriptName": "blyss.py",
"manufacturer": "Blyss",
"serialnumber": "Button1",
"buttonId": 1
}
For LIRC
{
"accessory": "ProgrammableSwitch",
"name": "Vidéo projecteur",
"statefull": true,
"pythonScriptPath": "/usr/local/lib/node_modules/homebridge-programmableswitch/",
"pythonScriptName": "IRremote.py",
"minValue": 0,
"maxValue": 1,
"manufacturer": "Optoma",
"serialnumber": "HD 700X",
"irCommands": {
"0": [{
"remote": "OPTOMA_HD700X",
"key": "KEY_POWER"
}],
"1": [{
"remote": "OPTOMA_HD700X",
"key": "KEY_POWER"
}]
}
}