Open theonlymiron opened 3 years ago
select the edit button next to your device and try this setting "Send dim when color request present and dim present" and see if that makes a dfference.
Update: I think the problem occurs between Alexa and Ha Bridge. In the HA Bridge device status I added the resulting ha bridge device sates to the description below.
Hey, unfortunately no effect. Quick simple experiment:
1. Start with Color blue, brightness 30%. {"state":{"on":true,"bri":77,"hue":43690,"sat":254,"effect":"none","xy":[0.3146,0.3303],"ct":153
2. Set brightness to 100% -->OK. {"state":{"on":true,"bri":254,"hue":43690,"sat":254,"effect":"none","xy":[0.3146,0.3303],"ct":153
3. Set Color again to blue (or any other color)-->All Channels on with no chance of changing the color anymore (no matter what color you select. However the internal ha bridge values seems not to have changed: {"state":{"on":true,"bri":254,"hue":43690,"sat":254,"effect":"none","xy":[0.3146,0.3303],"ct":153
Only chance to get a desired color at 100% dim level: Set dim level to 30%, select color, set dim level to 100% --> color ok. Color selection with any dim level above ~49% seems not to work correctly.
Best Regards Miron
interesting, the alexa sends both hsb and xy color.... So in the decoding for habridge xy color takes precedent.
Yes, maybe... I checked some other Color lights, all have exactly the same x and y values (no matter what color has been set or if they are on or of). But: If the x and y values never change anyway: Why is the color command working with low dimming levels and not working with high dimming levels? Mysterious ;-) If you give we a hint which logs to provide I would do some further experiments.
First, what version of the habridge are you running? To trace the state changes in the log turn on Trace State Changes in the bridge control tab.
Here you go (Version is 5.4.1RC1) :
Start color: blue, brightness 30%. Switching color to red:
2021-05-06 21:48:46,729 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: hue state change requested: 20c7df9adbff4e328ce91dedcc86f7ec from 192.168.1.27 body: {"on":true,"hue":0,"sat":254}
2021-05-06 21:48:46,729 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling on-off as requested: true
2021-05-06 21:48:46,729 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=turnOn","type"
:"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:48:46,729 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:48:46,729 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 0.0, Sat = 254.0, Bri = 77.0
2021-05-06 21:48:46,757 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling color as requested. With Color Data mode: HS, data: Hue: 0, Sat: 254, Bri: 77
2021-05-06 21:48:46,857 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=setColor&arg1=
${color.r}&arg2=${color.g}&arg3=${color.b}&arg4=0","type":"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:48:46,857 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:48:46,857 [qtp1206622088-6509] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 0.0, Sat = 254.0, Bri = 77.0
change to red ok, switching back to blue:
2021-05-06 21:49:13,813 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: hue state change requested: 20c7df9adbff4e328ce91dedcc86f7ec from 192.168.1.27 body: {"on":true,"hue":43690,"sat":254}
2021-05-06 21:49:13,813 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling on-off as requested: true
2021-05-06 21:49:13,813 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=turnOn","type"
:"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:49:13,813 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:49:13,813 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 43690.0, Sat = 254.0, Bri = 77.0
2021-05-06 21:49:13,842 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling color as requested. With Color Data mode: HS, data: Hue: 43690, Sat: 254, Bri: 77
2021-05-06 21:49:13,942 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=setColor&arg1=
${color.r}&arg2=${color.g}&arg3=${color.b}&arg4=0","type":"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:49:13,942 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:49:13,942 [qtp1206622088-6472] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 43690.0, Sat = 254.0, Bri = 77.0
Setting brightness to 100%:
2021-05-06 21:49:34,744 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: hue state change requested: 20c7df9adbff4e328ce91dedcc86f7ec from 192.168.1.27 body: {"on":true,"bri":254}
2021-05-06 21:49:34,744 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling on-off as requested: true
2021-05-06 21:49:34,744 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=turnOn","type"
:"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:49:34,744 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:49:34,780 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling dim as requested: 254, inc: null
2021-05-06 21:49:34,880 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=setValue&arg1=
${intensity.percent}","type":"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:49:34,880 [qtp1206622088-6475] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
setting brightness to 100% ok, setting color red (while at 100% brigthness, error expected below):
2021-05-06 21:50:00,244 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: hue state change requested: 20c7df9adbff4e328ce91dedcc86f7ec from 192.168.1.27 body: {"on":true,"hue":0,"sat":254}
2021-05-06 21:50:00,244 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling on-off as requested: true
2021-05-06 21:50:00,244 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=turnOn","type"
:"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:50:00,245 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:50:00,245 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 0.0, Sat = 254.0, Bri = 254.0
2021-05-06 21:50:00,332 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling color as requested. With Color Data mode: HS, data: Hue: 0, Sat: 254, Bri: 254
2021-05-06 21:50:00,432 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Decode Json for url items: [{"item":"http://login:password@192.168.1.25/api/callAction?deviceID=${device.mapId}&name=setColor&arg1=
${color.r}&arg2=${color.g}&arg3=${color.b}&arg4=0","type":"httpDevice","httpVerb":"GET","contentType":"text/html"}]
2021-05-06 21:50:00,432 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.HueMulator - Tracestate: Calling Home device handler for type : httpDevice
2021-05-06 21:50:00,432 [qtp1206622088-6488] INFO com.bwssystems.HABridge.hue.ColorDecode - Hue = 0.0, Sat = 254.0, Bri = 254.0
Error ;-) All Channels on
So, its not the habridge as it received hue=0 and sat=254 while bri=254 is Full on white.
Yes, seems to be a bug on Alexa side. Even if you would argue, that 100% brightness for an RGB LED system is turning on channels on (as bright as it can get)
By the way: Do you have any special channel to post Alexa bugs with high priority? ;-)
I guess my workaround will be to update the hue bridge state after each dimming and color change to a dim level of 30%. I will give an update if this is working.
Unfortunately I do not have a channel to Amazon for that issue.
I have the same issue with version 5.4.0-java11. Color voice commands above 50% brightness are not working. I think it's the same issue described in #1267.
Hi again,
I found a "solution" for the problem: When using first generation Echo devices, color commands are working without any problems! Luckily I have two first generation Echo Plus left and I am using one of them to connect to HA-Bridge.
If you do the same, just make sure to use IP filters in Ha-Bridge!
@bwssytems Since some days my workaround (using an old echo plus gen 1) is not working anymore, it seems that light commands are not being sent reliably anymore from my echo plus gen 1.
Anyway, I had some time to debug the setup a bit more and found following problems / issues:
Echo Gen 1:
All color commands has been sent as XY from echo to ha-bridge. It seems that the color conversion xy to rgb seems to work
for all brightness levels in ha-bridge (this is the reason, why my setup has been working for some time).
Echo Gen 2:
Color commands are being sent as HSB from echo to ha-bridge. Here I am pretty sure, that there is a bug in your color conversion code. I will provide some examples for color red.
Example 1:
HA-Bridge state before command (DIM Level 40%)
"state": { "on": true, "bri": 102, "hue": 0, "sat": 254, "effect": "none", "xy": [ 0.7006062331309042, 0.2993009868421053 ], "ct": 383, "alert": "none", "colormode": "hs", "reachable": true },
Now I just change the color again to red (so nothing should change, as the color has been red already)
Change requested by Alexa (as you see, a brightness change has not been requested by alexa):
body: {"on":true,"hue":0,"sat":254}
RGB Values being sent (here we have already the bug, with r value being to high for 40% brightness)
rgb=205,0,0
Resulting HA-Bridge State (not changed)
"state": { "on": true, "bri": 102, "hue": 0, "sat": 254, "effect": "none", "xy": [ 0.7006062331309042, 0.2993009868421053 ], "ct": 383, "alert": "none", "colormode": "hs", "reachable": true },
Now I make a "dim to 60% command"
Change requested by Alexa (no color hange requested)
{"on":true,"bri":153}
As no color change has been requested, no rgb translation has been done (however the dim level has been sent succesfully to my fibaro homecenter)
Resulting HA-Bridge State (everything fine here):
"state": { "on": true, "bri": 153, "hue": 0, "sat": 254, "effect": "none", "xy": [ 0.7006062331309042, 0.2993009868421053 ], "ct": 383, "alert": "none", "colormode": "hs", "reachable": true },
Now, I am setting again the color to red.
Change requested by Alexa (the request seems to be perfectly fine so no bug on echo side...)
{"on":true,"hue":0,"sat":254}
RGB Values being sent (again the r value is way to high, g and b value also not needed for pure red!)
rgb=255,55,55
Resulting HA-Bridge State (no change at all, as expeceted):
"state": { "on": true, "bri": 153, "hue": 0, "sat": 254, "effect": "none", "xy": [ 0.7006062331309042, 0.2993009868421053 ], "ct": 383, "alert": "none", "colormode": "hs", "reachable": true },
For higher dim levels, the problem is getting worse, with green and blue value reaching 255 when dim level is set to 100% (and we are still talking just about setting the color to pure red, so no green and blue should be involved at all).
Summary: Alexa Requests seems to be fine Ha-Bridge sate seems to be fine Dimming working (as no color translation is involved) HSB to RGB conversion seems to be buggy, with all values being constantly to high and adding green and blue to pure red color
Can you reproduce the problem?
Hi again,
@bwssytems
I was able to debug the problem a bit more and found an easy possible solution: If HA Bridge would interpret the Alexa values as HSV instead of HSL and convert it to RGB, everything should work just as expected. HSL: L ist for "lightness". So if lightness is max, every color gets complete white ("light") when you convert it to RGB. Instead if you use HSV to RGB conversion, the RGB values should be exactly what one would expect. In fact I checked it with some online converters, and they all provided the correct colors (which by the way are matching exactly the preview colors in the alexa app :-) )
Will take a look
Just noticed that this "bug" is still "alive". My hope was it was gone in 5.4.1 ... because of this bug was closed and fixed in https://github.com/bwssytems/ha-bridge/issues/1267 Is there any chance to get an update?
kind regards
Yes, it still is alive, obviously not many people using ha bridge have the need of correct color translation :-) @amoksworld: I found a workaround for my own purposes, maybe it helps you as well: In my setup, ha-bridge just passes ${color.h} to my smart home system. Luckily the ${color.h} value seems to be unique and it is even possible to identify color temperature commands (warm white to cold white).
hue: the unique value passed from ha bridge when using ${color.h} r,g,b,w: color converted for rgbw led stripes ct_r,ct_g,ct_b,ct_w: color converted for cct led stripes (with ct_b for cold white and ct_w for warm white channel) The table "only" covers all colors you can select in the alexa app, for me it's more than enough ;-)
All dimming other logic (dimming, distinguish if you really want 100% dimming level or just to turn on) is done in my smart home system (fibaro homecenter 2).
Maybe my color table can help you a bit...
_colors = {
warmes_weiss = {
name = "warmes_weiss", --german color name, in order of alexa app android
colormode = "ct",
hue = 28.457144, --this is the unique value ha-bridge passes when you use ${color.h}
ct = 383,
r = 255,
g = 128,
b = 0,
w = 179,
ct_r =0,
ct_g =0,
ct_b =0,
ct_w =255,
},
warmweiss = {
name = "warmweiss",
colormode = "ct",
hue = 27.870968,
ct = 350,
r = 0,
g = 0,
b = 0,
w = 255,
ct_r =0,
ct_g =0,
ct_b =0,
ct_w =255,
},
weiss = {
name = "weiss",
colormode = "ct",
hue = 27.079645,
ct = 284,
r = 0,
g = 87,
b = 100,
w = 255,
ct_r =0,
ct_g =0,
ct_b =128,
ct_w =255,
},
tageslichtweiss = {
name = "tageslichtweiss",
colormode = "ct",
hue = 26.493507,
ct = 234,
r = 0,
g = 196,
b = 227,
w = 255,
ct_r =0,
ct_g =0,
ct_b =255,
ct_w =255,
},
kaltweiss = {
name = "kaltweiss",
colormode = "ct",
hue = 27.5,
ct = 199,
r = 0,
g = 224,
b = 255,
w = 190,
ct_r =0,
ct_g =0,
ct_b =255,
ct_w =128,
},
rot = {
name = "rot",
ct_color = "warmes_Weiss",
colormode = "hs",
hue = 0,
sat = 254,
r = 255,
g = 0,
b = 0,
w = 0,
},
karmesinrot = {
name = "karmesinrot",
ct_color = "warmes_Weiss",
colormode = "hs",
hue = 63351,
sat = 231,
r = 255,
g = 23,
b = 69,
w = 0,
},
lachs = {
name = "lachs",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 3095,
sat = 132,
r = 255,
g = 160,
b = 122,
w = 0,
},
orange = {
name = "orange",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 7100,
sat = 254,
r = 255,
g = 166,
b = 0,
w = 0,
},
gold = {
name = "gold",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 9102,
sat = 254,
r = 255,
g = 212,
b = 0,
w = 0,
},
gelb = {
name = "gelb",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 10923,
sat = 254,
r = 255,
g = 255,
b = 0,
w = 0,
},
gruen = {
name = "gruen",
ct_color = "weiss",
colormode = "hs",
hue = 21845,
sat = 254,
r = 0,
g = 255,
b = 0,
w = 0,
},
tuerkis = {
name = "tuerkis",
ct_color = "weiss",
colormode = "hs",
hue = 31675,
sat = 183,
r = 51,
g = 255,
b = 237,
w = 0,
},
zyanblau = {
name = "zyanblau",
ct_color = "weiss",
colormode = "hs",
hue = 32768,
sat = 254,
r = 0,
g = 255,
b = 255,
w = 0,
},
himmelblau = {
name = "himmelblau",
ct_color = "weiss",
colormode = "hs",
hue = 35862,
sat = 107,
r = 148,
g = 225,
b = 255,
w = 0,
},
blau = {
name = "blau",
ct_color = "weiss",
colormode = "hs",
hue = 43690,
sat = 254,
r = 0,
g = 0,
b = 255,
w = 0,
},
purpur = {
name = "purpur",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 50426,
sat = 219,
r = 171,
g = 35,
b = 255,
w = 0,
},
magentarot = {
name = "magentarot",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 54613,
sat = 254,
r = 255,
g = 0,
b = 255,
w = 0,
},
rose = {
name = "rose",
ct_color = "warmes_weiss",
colormode = "hs",
hue = 63351,
sat = 64,
r = 255,
g = 191,
b = 205,
w = 0,
},
lavendelfarbe = {
name = "lavendelfarbe",
ct_color = "warmesweiss",
colormode = "hs",
hue = 46421,
sat = 127,
r = 159,
g = 128,
b = 255,
w = 0,
}
}
@theonlymiron I would love to control my color temps via Alexa and the HA bridge, but until now I did not even understand how to do so... but until now, I have not understood how to do so... RGB is working (using homematic stuff) via HA bridge
Could you give me a hint, where to put this color table to make color temp working?
Hi steviehs,
I will do my best ;-) But first things first: You say, that rgb is working already? Which version of HA-Bridge are you using?
Version 5.4.1rc1
Hmmm, same here, but for me rgb conversion is not working, as ha bridge (still) provides wrong rgb values... Regarding rgb, could you dim your light to 100% using alexa or ha-bridge and then change colors? Is it still working? In my case all rgb values just go up to 100% ("white" color), as ha-bridge still uses hsl conversion instead of hsv conversion.
Anyway: For color temperature you cannot use rgb conversion, I can try to give you a hint how it worked in my case, but I cannot any tips how to do it with homeatic
1.HA-bridge color item first entry: You have pass the "hue" value using ${color.h} to your smart home system and store it in a variable. 2.HA-Bridge color item second entry: activate a scene (or program) which checks the variable stored in the step before. I have done the programming in lua, as i stated before, no idea how to do it with homematic ;-) 3.Inside your scene, you have to search the color table (see my post above) for the right hue value and apply the corresponding rgbw values or ct values to your light
Sorry I cannot help you in detail. For Fibaro users, maybe I will provide a more "out of the box" solution when I find some time ;-)
sorry, I do not understand a single word :-) My main question (since about one year) is: from where and why does Alexa know which colors could be set via ha-bridge and which not? If I am asking alexa to put the lights to red green etc. it just works, but when I ask her to put the light to warmwhite, she tells me, that the device does not support it. So for starting my understanding right now: where can I add anything for color temp in ha-bridge?
No problem ;-) All echos newer than generation 3 (maybe even 2) should should detect your ha-bridge color lights including warmwhite, coldwhite and so on. Old generation 1 echos are only able to do rgb color settings, no cct settings available here (warmwhite, coldwhite).
In alexa app your light shoud look like this:
Haha, wait, I have really worked a lot in getting rid of my old discovered lights as in https://github.com/bwssytems/ha-bridge/issues/1216 now I should reenable again one of the newer echos to see white colors? shiver
Yeah, I also went through a lot of trouble using ip filters, manual delete of devices and so on...
Old Alexa: RGB conversion is working, but no cct (warmwhite, coldwhite) New Alexa: RGB conversion not working for high dim levels (see first post in this issue), but cct available
Now I know why RGB conversion was working for you ;-) Maybe once I find time to post my Fibaro solution how to get everything working somebody translates it to homematic.
Hi,
I expect a lot of issues with alexa color selection for my rgbw stripes, which makes it often impossible to use. To reproduce the problem: Start with color red, dimmed to 30% (e.g. via alexa app). This results correctly in following rgb values in my fibaro homecenter 2: Change color to yellow results in a dimming level of 60 in my fibaro homecenter 2, alexa still shows dimming level 30: If I change the color to gold, dimming level in fibaro stays at 60, alexa still thinks it's 30: Changing it to turquoise (German "Türkis") changes the dimming level again: Changing back to red, and the dimming goes back again to 60. Conclusion: Once you changed colors, it is not possible to go back to the original color with correct dimming level.
Next experiment: Start with color red, dimming level 50: Change to color orange: Change back to color red results in 100% dim level:
And now the worse thing: Start with color red, 100% dim level: Change color to orange results in all channels at 100%, which is of course not orange (but alexa thinks it is orang 100%) Once you are at this point, no color command works anymore, e.g. changing back to red via alexa):
Are some other people experiencing this? Any ideas how to solve this? Best Regards Miron