homebridge-magichome
homebridge-magichome copied to clipboard
no full white (255,255,255)
I'm using this to control my ledstrip. Before i hacked the flux_led package with homebridge-cmd_light_control and i could get full white. Using your plugin i can only get to around rgb(183,183,183) so no full brightness. config.json contains: "setup": "RGBW", "purewhite": true.
What are you using to find you can only get rgb183? The Home app itself, or setting manually?
Via the Home app I'm able to get 253,253,253 but not quite 255. Using a similar module to yours, but with an additional IR receiver built in.
@rggvn @DanBennettUK the rgb(183,183,183) will be set by a mix of all LEDs and not just pure white. The 253,253,253 is likely caused by having to convert the RGB value to HSL and vice-versa as the HomeKit protocol uses HSL and MagicHome uses RGB.
You'll see here that if HSL is zeroed out and purewhite
is set to true then we send the command to set warm white.
https://github.com/steve228uk/homebridge-magichome/blob/master/index.js#L114-L117
We could potentially add a little deadzone here to check if it's less than 5 for each for example. It could also be that warm white isn't available. My bulb only has one level of temperature as far as I can tell so I was ignoring the level command in the flux_led.py
script.
https://github.com/steve228uk/homebridge-magichome/blob/master/flux_led.py#L562-L573
@DanBennettUK i checked the values using flux_led.py IP -i, I also manually set the values to 255,255,255 using flux_led.py and the brightness went up by a significant amount.
@steve228uk I did a bit of research and hacking and also found out that the RGB pins on my strip and the controller didn't match up (it actually is RBG). I've looked around in your code and on github and found the homebridge-fake-rgb plugin, which i modified to use with flux_led using the sendCommand function in your code. Now everything works as expected. Let me know if i need to give you some credit or if i should remove that part of the code
@rggvn No need 😊 All LED strips are wired in that way from what I can tell.
@rggvn This thread is exactly a year old but... any chance that you would publish your modified plugin to npm? I'm seeing the same behavior with my LEDs and I'd like to try your solution.
@ericj2109 i've been using this: https://github.com/rggvn/homebridge-fake-rgb to control my arilux led strip controller
edit: run sudo npm install https://github.com/rggvn/homebridge-fake-rgb -g