DallasHoff / homebridge-openrgb

Control the RGB lighting of your PC components and peripherals with HomeKit.
https://www.npmjs.com/package/homebridge-openrgb
Apache License 2.0
13 stars 0 forks source link

option to not update rgb color when turning devices on #2

Closed appletrapz closed 3 years ago

appletrapz commented 3 years ago

Hi, is it possible to not update the rgb color when turning devices on in the Home App? As I currently have custom colors set in OpenRGB and every time i toggle them on/off in the Home App it sets them to whatever color they are set to in the Home App and not OpenRGB.

DallasHoff commented 3 years ago

How exactly and in what order are you making these setting changes? If you change the color in OpenRGB, HomeKit will detect the color change and update its own color setting next time it checks the light, so unless you are changing the color in OpenRGB and then quickly toggling the light off and back on in the Home app before it updates, you shouldn't see this behavior.

appletrapz commented 3 years ago

So I'm using a NZXT Hue 2 device in OpenRGB and I'm setting the addressable rgb strip with multiple colors in OpenRGB but every time i turn the strip off/on using the Home App it defaults back to a solid color that's set in the Home App.

DallasHoff commented 3 years ago

Ah, that would be the issue: HomeKit can only set one color for each device. It doesn't support devices having multiple colors, so the color that you are seeing set in the Home app is the color of the first LED on the device. Since this is a limitation of Apple's software, this plugin cannot do anything about it.

appletrapz commented 3 years ago

you sure this can’t be fixed?

As I’m currently using the homebridge-lifx-lan-client plugin as native HomeKit support is buggy and when I set my LIFX-Z strips to multiple colors in the LIFX App. HomeKit doesn’t change the colors when I toggle them off/on. it only changes the color if I pick one inside HomeKit

DallasHoff commented 3 years ago

The issue is really two-fold, the first aspect being what I said before about HomeKit only being able to store one color per device. The second aspect is that RGB PC components don't really have an "off switch." To make the off functionality work in the Home app, what this plugin actually does is send the color black (0, 0, 0) to the devices. This makes the LED's go off. Then, when you turn the device back on with the Home app, the device is sent the color that HomeKit currently has set for that device, turning it back on with that color.

Whereas a standalone RGB controller like your Lifx one might have an on/off functionality that allows the light strip to maintain its color state separately from that switch, PC components do not. Essentially, this means that "turning off" the PC RGB lighting clears their color state, so when turning it back on, we have to use the color HomeKit has, which is limited to one color per device. For these reasons which are out of our control, the functionality you are requesting is not possible for this plugin right now. I hope that makes sense?

appletrapz commented 3 years ago

yeah that makes sense