Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aeotec LED Strip RGBWW #300

Closed
chrismsnz opened this issue Jul 17, 2020 · 14 comments
Closed

Aeotec LED Strip RGBWW #300

chrismsnz opened this issue Jul 17, 2020 · 14 comments

Comments

@chrismsnz
Copy link

chrismsnz commented Jul 17, 2020

I'm using homebridge-mqttthing to speak to an Aeotec LED strip via ZWave2MQTT.

The communication works great, but I'm having an issue mapping its expectations into Homebridge.

Specifically, the device expects an RGBWW value for its configuration, and I'm configuring that as

                "getRGBWW": "zwave/livingroom/led/51/1/0",
                "setRGBWW": "zwave/livingroom/led/51/1/0/set",

However, the wrinkle is that on this system, either the RGB LEDs, OR the WW/CW LEDs get used - never both at the same time. If there is a value on the WW/CW channel, the RGB LEDs will never turn on.

This doesn't work so great with HomeKits UI (e.g. the colour wheel) etc. Unless the WW/CW values are absolute 0 in the RGBWW parameter, the RGB will not work. Perhaps there is some way to do this with coldWhite and warmWhite values? Do I need to configure this as a multi-service accessory?

I have some other issues but I can solve those after I get this one straightened out. Any advice appreciated.

@fullhouse-lab
Copy link

The same thing, mqttthing =)

@arachnetech
Copy link
Owner

Using the test RGBWW accessory in test/config.json:

        {
            "accessory": "mqttthing",
            "type": "lightbulb-RGBWW",
            "name": "Test RGBWW Light",
            "url": "http://192.168.10.35:1883",
            "topics": {
                "getRGBWW": "test/rgbwwlight/rgb",
                "setRGBWW": "test/rgbwwlight/rgb/set"
            },
            "logMqtt": true
        },

... I'm definitely seeing values for all 5 channels as I drag around the colour wheel:

[7/20/2020, 23:43:50] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,0,0,127,127
[7/20/2020, 23:43:52] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,0,0,0,0
[7/20/2020, 23:44:08] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 25,0,15,23,23
[7/20/2020, 23:44:08] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 54,0,33,49,49
[7/20/2020, 23:44:09] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 73,0,44,67,67
[7/20/2020, 23:44:09] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 89,0,53,83,83
[7/20/2020, 23:44:12] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 43,0,173,41,41
[7/20/2020, 23:44:16] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 55,0,156,49,49
[7/20/2020, 23:44:16] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 30,0,94,80,80
[7/20/2020, 23:44:16] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 20,0,71,92,92
[7/20/2020, 23:44:17] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 5,0,38,108,108
[7/20/2020, 23:44:17] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,0,13,95,146
[7/20/2020, 23:44:17] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,4,0,70,185
[7/20/2020, 23:44:17] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,16,1,57,197
[7/20/2020, 23:44:18] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,29,0,31,221
[7/20/2020, 23:44:18] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,46,0,12,227
[7/20/2020, 23:44:18] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,69,5,0,216
[7/20/2020, 23:44:18] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,104,26,0,175
[7/20/2020, 23:44:19] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,131,36,0,143
[7/20/2020, 23:44:19] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,134,36,0,140
[7/20/2020, 23:44:21] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,148,22,0,123
[7/20/2020, 23:44:21] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,178,19,0,88
[7/20/2020, 23:44:22] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,159,0,20,85
[7/20/2020, 23:44:22] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,140,0,72,50
[7/20/2020, 23:44:22] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,83,0,121,70
[7/20/2020, 23:44:22] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,57,0,152,74
[7/20/2020, 23:44:23] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,33,0,166,85
[7/20/2020, 23:44:23] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 0,14,0,167,87
[7/20/2020, 23:44:23] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 14,0,0,154,86
[7/20/2020, 23:44:23] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 42,0,0,127,85
[7/20/2020, 23:44:24] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 60,0,0,111,83
[7/20/2020, 23:44:24] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 83,0,0,94,76
[7/20/2020, 23:44:24] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 130,0,4,62,62
[7/20/2020, 23:44:25] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 173,0,43,41,41
[7/20/2020, 23:44:25] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 217,0,98,19,19
[7/20/2020, 23:44:25] [Test RGBWW Light] Publishing MQTT: test/rgbwwlight/rgb/set = 240,0,128,7,7

... so it seems to be working as intended.

Ah, sorry, I've just read your description again. If I'm now understanding correctly, you're saying that the Aeotec LED strip can't cope with this: it wants EITHER warm white and cold white values (and zero R,G,B) OR red, green and blue values (and zero WW,CW).

This can't be done at the moment, but it doesn't sound too hard to add in theory.

@chrismsnz
Copy link
Author

Thanks David - yep you got it, if there are WW/CW values, RGB is ignored.

RGB works in a pinch i.e. if i drag all the way out to the edges in Home.app UI where its pure colour it'll RGB because the WW/CW channels are 0.

And I can use the colour temp UI to pick a white colour

But yeah the big zone in the middle of the colour picker is useless because it splits off some values to white channels - even though it could in theory be expressed as RGB, right?

So yeah, I think it's just a mismatch between Home.app/homekit expectations and this hardware.

@arachnetech
Copy link
Owner

Thanks. I've just been playing with this. I've added a new whiteMix setting which when set to false should I think give the behaviour that you need...

        {
            "accessory": "mqttthing",
            "type": "lightbulb-RGBWW",
            "name": "Test RGBWW Light",
            "url": "http://192.168.10.35:1883",
            "topics": {
                "getRGBWW": "test/rgbwwlight/rgb",
                "setRGBWW": "test/rgbwwlight/rgb/set"
            },
            "whiteMix": false,
            "logMqtt": true
        }

@chrismsnz
Copy link
Author

What a boss! Let me know whats the easiest way for me to pull and test this for you when you're ready.

@arachnetech
Copy link
Owner

It's a pretty minor change, so I've just published it in a new release (1.1.18). Let me know how you get on!

@chrismsnz
Copy link
Author

chrismsnz commented Jul 20, 2020

(P.S. I see you are also messing with muti-service stuff. For the record I tried to add a multi-service accessory for my Aeotec trisensor - light, motion etc. and ran into a homebridge error about "cannot create a service with the same uuid" even though the service names etc. are different. Let me know if you want me to write that up for you).

@arachnetech
Copy link
Owner

arachnetech commented Jul 20, 2020

So yeah, I think it's just a mismatch between Home.app/homekit expectations and this hardware.

Actually in this case it's a mismatch between mqttthing and the hardware. Mqttthing is trying to be clever by extracting the white components, which can work well when the hardware supports it! Sadly while Homekit helpfully provides the colour temperature for a white light, as soon as you create a coloured light it just provides hue, saturation and value.

@arachnetech
Copy link
Owner

(P.S. I see you are also messing with muti-service stuff. For the record I tried to add a multi-service accessory for my Aeotec trisensor - light, motion etc. and ran into a homebridge error about "cannot create a service with the same uuid" even though the service names etc. are different. Let me know if you want me to write that up for you).

That's odd. Yes, if you post your config and some sample MQTT messages in another issue I'll take a look...

@chrismsnz
Copy link
Author

It's a pretty minor change, so I've just published it in a new release (1.1.18). Let me know how you get on!

Thanks, I assume homebridge will pick this up when it gets pushed to NPM? Or want me to test it first

@arachnetech
Copy link
Owner

Should be there now - I made a silly error with the release, but hopefully all fixed now!

@chrismsnz
Copy link
Author

Definite improvement, two small places where I get interesting behaviour

Near the orange-y/warmwhite colours in the RGB wheel I can see it flipping back between the RGB and WW/CW channels.

[7/21/2020, 11:52:39 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#FF99000000"
[7/21/2020, 11:52:39 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #ff95000000
[7/21/2020, 11:52:40 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#FF95000000"
[7/21/2020, 11:52:40 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #ffa01c0000
[7/21/2020, 11:52:40 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#FFA01C0000"
[7/21/2020, 11:52:40 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #ffab360000
[7/21/2020, 11:52:41 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#FFAB360000"
[7/21/2020, 11:52:41 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #ffac380000
[7/21/2020, 11:52:41 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#FFAC380000"
[7/21/2020, 11:52:41 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #000000f905
[7/21/2020, 11:52:41 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#000000F905"
[7/21/2020, 11:52:42 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #000000f00d
[7/21/2020, 11:52:42 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#000000F00D"
[7/21/2020, 11:52:42 AM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #000000ef0f
[7/21/2020, 11:52:42 AM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#000000EF0F"

mqttthing must its close enough to white to send to white channels instead. And at lower intensities/brightness, it seems to be swap over to white a bit sooner from other colours (e.g. here, dragging inwards to center from purple):

[7/21/2020, 12:07:43 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #2b142a0000
[7/21/2020, 12:07:43 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#2B142A0000"
[7/21/2020, 12:07:43 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #2b152a0000
[7/21/2020, 12:07:43 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#2B152A0000"
[7/21/2020, 12:07:43 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #2b162a0000
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#2B162A0000"
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #2b19290000
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#2B19290000"
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #2b1a290000
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#2B1A290000"
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #0000000e0e
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#0000000E0E"

If i increase the brightness when I hit this point it will flip back to the RGB LEDs

[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #0000000e0e
[7/21/2020, 12:07:44 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#0000000E0E"
[7/21/2020, 12:08:34 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #3824350000
[7/21/2020, 12:08:34 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#3824350000"
[7/21/2020, 12:08:34 PM] [Aeotec LED Strip] Publishing MQTT: zwave/livingroom/led/51/1/0/set = #452d410000
[7/21/2020, 12:08:35 PM] [Aeotec LED Strip] Received MQTT: zwave/livingroom/led/51/1/0 = "#452D410000"

RE: the comment on the commit: // mixing white and colours is not allowed on some devices - The Aeotec docs deign it a matter or "priority" - if the WW/CW channels are set they will take priority over RGB.

Anyways, pretty minor stuff but a big improvement to what it was, if you have any other thoughts or changes I'm happy to test em.

@arachnetech
Copy link
Owner

I've added threshold values for the next release, allowing configuration of the switching point between RGB and WW/CW lights.

@chrismsnz
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants