Closed diasrobson closed 7 years ago
HomeKit doesn't support RGB. However you can define a Lightbulb with the optional characteristics:
{
"name":"office_lamp",
"service":"Lightbulb",
"Brightness": "default",
"Hue": "default",
"Saturation": "default"
};
You'll get 3 mqtt messages:
{ "name": "office_lamp", "characteristic": "Hue", "value": 157 }
{ "name": "office_lamp", "characteristic": "Saturation", "value": 36 }
{ "name": "office_lamp", "characteristic": "Brightness", "value": 28 }
These values can be used to convert HSV to RGB.
In https://github.com/cflurin/homebridge-mqtt/blob/master/lib/utils.js
you'll find the functions hsv2rgb and rgb2hsv. Just copy the code in your app.
How can i use this with Home Kit / Home bridge to controll RGB lights