So, und eine Homebridge Config.json besteht immer aus folgendem Schema, der eigentlichen (Home)Bridge, den Accessories und den Platforms:
{
"bridge": {
"name": "Homebridge xxxx",
"username": "xx:xx:xx:xx:Xx:Xx",
"port": xxxxx,
"pin": "xxx-xx-xxx",
"advertiser": "bonjour-hap",
"bind": [
"wlan0"
]
},
"accessories": [
],
"platforms": [
]
}
Alles anzeigen
Und da das Plugin als Accessory eingerichtet werden muss, muss es auch zwischen die eckigen Klammern bei "Accessories":
{
"bridge": {
"name": "Homebridge xxxx",
"username": "xx:xx:xx:xx:Xx:Xx",
"port": xxxxx,
"pin": "xxx-xx-xxx",
"advertiser": "bonjour-hap",
"bind": [
"wlan0"
]
},
"accessories": [
{
"name": "Timer Kaffeemaschine ",
"delay": 3600000,
"flipSensorState": false,
"startOnReboot": false,
"accessory": "DelaySwitch"
},
{
"accessory": "RaspberryPiTemperature",
"name": "RaspberryPi CPU Temperature"
}
],
"platforms": [
{
"name": "Config",
"port": xxxx,
"auth": "form",
"theme": "dark-mode-blue",
"tempUnits": "c",
"lang": "de",
"platform": "config"
},
{
"devices": [
{
"name": "Samsung TV",
"ip": "xxx.xxx.xx.xxx",
"mac": "xx:xx:xx:xx:xx:xx"
}
],
"platform": "SamsungTizen"
},
{
"name": "SwitchBot",
"credentials": {
"openToken": "Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"notice": "Keep your token a secret!"
},
"options": {
"devices": [
{
"deviceId": "xx:Xx:xx:xx:xx:xx",
"configDeviceName": "Kaffeemaschine ",
"hide_device": false,
"offline": false,
"configDeviceType": "Bot",
"ble": true,
"customBLEaddress": "xx:Xx:xx:xx:xx:xx",
"scanDuration": 1,
"bot": {
"mode": "press",
"deviceType": "switch",
"doublePress": 1,
"maxRetry": 2
}
}
]
},
"platform": "SwitchBot"
}
]
}
Alles anzeigen