homebridge-broadlink-rm
homebridge-broadlink-rm copied to clipboard
Color lights
Is it possible to add color to the lights In config, just like hue?
I’ve seen something you’ve commented something about huex, do you have an example of a config for that?
Here is my config for a colour light, I am using it for the broadlink-rm-tv fork though. This one has a merge pending from two years ago to add white to it. So in this current version you can use the colours, but wont be able to go back to white. If you check out one of the issues in the fork I mentioned, you can also be a tester for this too. It mostly works but I still have some bugs with it.
{
"name": "LightTest",
"type": "light",
"useLastKnownBrightness": true,
"data": {
"on": "b2001a010d290c2926100c2a0c290c2a0c0001960c290d290c2a0c29251125100c2926100c2a0c2925110c2a241125110b2926100d290c290d290c2a25100c290d290c2a0c0001950d290d290c290d29251025100d2926100c290d2925110c29251026100c2a25100d290c290d290c2925110c290c2a0c290d0001950d290c290d290c29251125100c2a25100d290c2926100c2a241125100d2925100d290c2a0c290d2925100c290d290d280d0001960c2a0c290c290d29251026100c2a25100c290d2925100d29251025110c2926100c2a0b2a0c290904042825110c290c2a0b2a0d0001950c290d290c290d29251026100c2926100c290d2925110c2b06040404171125100c2926100c2a0c290c2a0c2925110c290d290c2a0c0005dc0000000000000000000000000000",
"off": "b21334000d290d290d290d29261027100d2926100e290d2a26110d29261026100d2926100d290d2a0d290e2a0d292611261027100e00019600000000",
"brightness14": "",
"brightness29": "",
"brightness43": "",
"brightness57": "",
"brightness71": "",
"brightness86": "",
"brightness100": "",
"hue0": "b21334000d290d2a0d290d29261126110d2a26100d2a0d2926110d29261126110d2926110d290d2a0d290d2926100d2a0d2926100e00019500000000",
"hue60": "b21534000e290e290e290e29271027100e2927100e290e2927100e29271027100e2927100e290e290e29271027100e290e2927100e00019500000000",
"hue120": "b21834000d2a0d2a0d2a0d2a261126110d2a26110d2a0d2a26110d2a261126110d2a26110d2a0d2a0d2a0d2a26110d2a26110d2a0d00019600000000",
"hue240": "b2002001241125100d2925100d290c2a0c290c2925110c29251125100d0001950c290d290c290c2a251026100c2925110c290c2926100c29261025100c2a25100c290d290d280d2925100d292510260f0d0001960c290c290d290c29261025100d2925100c2a0c2926100c29251026100c2926100d280d290c290d2925100d292510260f0d0001950d290d280d290c29261025100d2826100c2a0c2926100c29251026100c2926100c290d290c290d2925100d282610260f0d0001950d290c2a0c290c29251125100c2926100c290d2925100d29251125100c2925110c290c290d290c2a25100c29261025110c0001960c290c2a0c290c2a251025110c2925110c290c2926100c2a251025110c2925100d290c2a0c290c2a25100c2a251025100d0005dc0000000000000000",
"hue300": " b21034000e290e290e290e29271027100e2927100e290e2927100e29271027100e2927100e290e290e29271027100e29271027100e00019600000000",
"white": "b20e34000d290d290d2a0d2a261026110d2926110d290d2a26110d2a261126110d2926100d290d2a0d290d2a261126110d2a0d290d00019600000000"
}
Look up the hue wheel colour numbers on google to figure out what each colour is; e.g. hue0 is red.
I have the same configuration as mitch write, but when I say "light white", it's still turn red. So I saw in terminal that is send hue0,but the saturation is 0 (and for red is 100), Terminal output: For white: [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light setSaturation: 0 [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light setSwitchState: true [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light setSwitchState: already true (no data sent - B) [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light setHue: 0 [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light setHue: (closest: hue0) [1/22/2021, 4:28:13 PM] [Broadlink RM Mini] kitchen Light sendHex (X.X.X.X; x:xx:xx:xx:xx:xx) 26005800000126941214111411141114121411141114111412381138123811381238113812381138111511141114113812381114103a111411381139113811151114113811151138110005170001274c11000c470001274c11000d050000000000000000000000000000 For red: [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light setSaturation: 100 [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light setSwitchState: true [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light setSwitchState: already true (no data sent - B) [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light setHue: 0 [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light setHue: (closest: hue0) [1/22/2021, 4:27:19 PM] [Broadlink RM Mini] kitchen Light sendHex (X.X.X.X; xx:xx:xx:xx:xx:xx) 26005800000126941214111411141114121411141114111412381138123811381238113812381138111511141114113812381114103a111411381139113811151114113811151138110005170001274c11000c470001274c11000d050000000000000000000000000000
So I beleve, must be way for teling Homebridge: if Saturation=100 send=red if saturation=0 send=white.
But how can I do that?
Any move on this?
I kind of gave up on following this up as I didn’t really need it that badly…
Seems @lprhodes that if you could add support for saturation, the rest would be done automatically as the colour control already supports this.
Incidentally: https://learnui.design/blog/the-hsb-color-system-practicioners-primer.html