arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

understanding how to use Warmwhite and Coldwhite LED Strips #652

Open novski opened 7 months ago

novski commented 7 months ago

Hi! First, I can't thank you enough for this great and big work. This plugin is spread extraordinary wide and is well done!

I have problems understanding how to use it if I have one strip with two LED's one warm and one cold light although. Is it correct to use RGBWW topics for this case?

It was quite straightforward to get the dim Messages from the homebridge fader when changed in home app, but setting the fader level to a given value if it changes from another device I struggle to do.

I tried to send an array of type string to a path homebridge/<device>/brightness/red,green,blue,warm,cold like this "0,0,0,22,33".

but the console logs this:

[16.11.2023, 06:36:12] [Balken] Ignoring invalid value [NaN] for Hue - not a number
[16.11.2023, 06:36:12] [Balken] Ignoring invalid value [NaN] for Saturation - not a number
[16.11.2023, 06:36:12] [Balken] Ignoring invalid value [NaN] for Brightness - not an integer

How do I have to send get values to make them be understood by the mqttthing lightbulb fader in RGBWW mode?

my config:

{
    "type": "lightbulb-RGBWW",
    "name": "myLEDstrip",
    "url": "mqtt://url:1883",
    "topics": {
        "getOnline": "homebridge/<device>/status",
        "getRGBWW": "homebridge/<device>/brightness/r,g,b,ww,cw",
        "setRGBWW": "homebridge/<device>/brightness/set/r,g,b,ww,cw",
        "getOn": "homebridge/<device>/on",
        "setOn": "homebridge/<device>/on/set",
        "getBrightness": "homebridge/<device>/brightness",
        "setBrightness": "homebridge/<device>/brightness/set",
        "getColorTemperature": "homebridge/<device>/color",
        "setColorTemperature": "homebridge/<device>/color/set"
    },
    "accessory": "mqttthing"
}
arachnetech commented 7 months ago

I don't think you can combine the brightness and color temperature topics with the RGBWW ones - I think you have to use one or the other.