Homebridge config for Gyver Lamp firmware by gunner47
{ | |
"accessories": [ | |
{ | |
"accessory": "mqttthing", | |
"type": "lightbulb", | |
"name": "Led Lamp", | |
"url": "mqtt://127.0.0.1", | |
"topics": | |
{ | |
"getOn": { | |
"topic": "LedLamp/LedLamp_00307114/state", | |
"apply": "return message.toString().split(\" \")[5]" | |
}, | |
"setOn": { | |
"topic": "LedLamp/LedLamp_00307114/cmnd", | |
"apply": "if(message == 1) {return \"P_ON\"} else {return \"P_OFF\"} " | |
}, | |
"getBrightness": { | |
"topic": "LedLamp/LedLamp_00307114/state", | |
"apply": "return Math.round( message.toString().split(\" \")[2] / 2.55 );" | |
}, | |
"setBrightness": { | |
"topic": "LedLamp/LedLamp_00307114/cmnd", | |
"apply": "return \"BRI\"+Math.round( message * 2.55 );" | |
} | |
}, | |
"integerValue":true | |
}, | |
{ | |
"accessory": "mqttthing", | |
"type": "television", | |
"name": "Led Lamp Effects", | |
"url": "mqtt://127.0.0.1", | |
"topics": | |
{ | |
"getActive": { | |
"topic": "LedLamp/LedLamp_00307114/state", | |
"apply": "return message.toString().split(\" \")[5]" | |
}, | |
"setActive": { | |
"topic": "LedLamp/LedLamp_00307114/cmnd", | |
"apply": "if(message == 1) {return \"P_ON\"} else {return \"P_OFF\"} " | |
}, | |
"getActiveInput": { | |
"topic": "LedLamp/LedLamp_00307114/state", | |
"apply": "return message.toString().split(\" \")[1]" | |
}, | |
"setActiveInput": { | |
"topic": "LedLamp/LedLamp_00307114/cmnd", | |
"apply": "return \"EFF\"+message" | |
} | |
}, | |
"inputs": [ | |
{ | |
"name": "Конфетти", | |
"value": "0" | |
}, | |
{ | |
"name": "Огонь", | |
"value": "1" | |
}, | |
{ | |
"name": "Белый огонь", | |
"value": "2" | |
}, | |
{ | |
"name": "Радуга верт.", | |
"value": "3" | |
}, | |
{ | |
"name": "Радуга гориз.", | |
"value": "4" | |
}, | |
{ | |
"name": "Радуга диаг.", | |
"value": "5" | |
}, | |
{ | |
"name": "Смена цвета", | |
"value": "6" | |
}, | |
{ | |
"name": "Безумие 3D", | |
"value": "7" | |
}, | |
{ | |
"name": "Облака 3D", | |
"value": "8" | |
}, | |
{ | |
"name": "Лава 3D", | |
"value": "9" | |
}, | |
{ | |
"name": "Плазма 3D", | |
"value": "10" | |
}, | |
{ | |
"name": "Радуга 3D", | |
"value": "11" | |
}, | |
{ | |
"name": "Павлин 3D", | |
"value": "12" | |
}, | |
{ | |
"name": "Зебра 3D", | |
"value": "13" | |
}, | |
{ | |
"name": "Лес 3D", | |
"value": "14" | |
}, | |
{ | |
"name": "Океан 3D", | |
"value": "15" | |
}, | |
{ | |
"name": "Цвет", | |
"value": "16" | |
}, | |
{ | |
"name": "Снегопад", | |
"value": "17" | |
}, | |
{ | |
"name": "Метель", | |
"value": "18" | |
}, | |
{ | |
"name": "Звездопад", | |
"value": "19" | |
}, | |
{ | |
"name": "Матрица", | |
"value": "20" | |
}, | |
{ | |
"name": "Светлячки", | |
"value": "21" | |
}, | |
{ | |
"name": "Светлячки 2", | |
"value": "22" | |
}, | |
{ | |
"name": "Пейнтбол", | |
"value": "23" | |
}, | |
{ | |
"name": "Кубик", | |
"value": "24" | |
}, | |
{ | |
"name": "Белый свет", | |
"value": "25" | |
} | |
], | |
"integerValue":true | |
} | |
], | |
"platforms": [ | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment