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

Setting Color with ${color.rgbx} don't work #1267

Closed
devel6236 opened this issue Dec 15, 2020 · 7 comments
Closed

Setting Color with ${color.rgbx} don't work #1267

devel6236 opened this issue Dec 15, 2020 · 7 comments
Assignees
Milestone

Comments

@devel6236
Copy link

devel6236 commented Dec 15, 2020

ha-bridge Version 5.4.0
I use ${color.rgbx} under color Items of the device

If I try to set the color over Alexa it doesn't work. If I say Blue color is set to FFFFFF, Green color is set to FFFFFF....

When I set the color with the "Test Color" Button in the ha-bridge GUI it works, after that it works also via Alexa until next reboot. This problem is reproducible.

log for color green:

12-15-2020 16:44:04.818 DEBUG executing HUE api request to send message to MQTT broker: "{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"${color.rgbx}","qos":"1","retain":"false"}" com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 16:44:04.818 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"${color.rgbx}","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.DeviceDataDecode
12-15-2020 16:44:04.819 INFO Hue = 21845.0, Sat = 254.0, Bri = 254.0 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 16:44:04.819 DEBUG Color change with HSB New: Hue: 21845, Sat: 254, Bri: 254. Resulting RGB Values: 255 255 255 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 16:44:04.819 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"FFFFFF","qos":"1","retain":"false"}>>, not done: true com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 16:44:04.820 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"FFFFFF","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 16:44:04.820 DEBUG publishing message: HABRIDGE - cmnd/Luftbefeuchter/COLOR - FFFFFF - count: 0
@bwssytems bwssytems self-assigned this Dec 15, 2020
@bwssytems
Copy link
Owner

If you could set debug for the HueMulator class to see what the Alexa sends on the first tries that are not request that would help. Thanks

@JsChiSurf
Copy link

JsChiSurf commented Dec 15, 2020

FWIIW, I have the identical behavior in that the color will not start working until after I first test via the 'test color' button, and from that point forward, requesting via Alexa works. However, the rgb values received via Alexa, in my case, seem completely random. I am at work, but when I get home, can try and get some logs as well.

@devel6236
Copy link
Author

devel6236 commented Dec 15, 2020

including Debug-Log HueMulator for color blue

12-15-2020 19:08:54.934 DEBUG HueMulator PUT called on api/* with request <<</api/b56a460139704039b50e72071393375d/lights/534/state>>>, and body <<<{"on":true,"hue":43690,"sat":254}>>> com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.935 DEBUG hue state change requested: b56a460139704039b50e72071393375d from 192.168.100.19 body: {"on":true,"hue":43690,"sat":254} com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.935 DEBUG validateWhitelistUser: found a user com.bwssystems.HABridge.BridgeSecurity
12-15-2020 19:08:54.936 DEBUG hue/sat request - Hue: 43690, Sat: 254, Bri: 254 com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.936 DEBUG Calling on-off as requested. com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.936 DEBUG Decode Json for url items: [{"item":"{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/POWER","message":"ON","qos":"1","retain":"false"}","type":"mqttMessage"}] com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.936 DEBUG Calling Home device handler for type : mqttMessage com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:54.936 DEBUG executing HUE api request to send message to MQTT broker: "{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/POWER","message":"ON","qos":"1","retain":"false"}" com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:54.937 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/POWER","message":"ON","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.DeviceDataDecode
12-15-2020 19:08:54.937 INFO Hue = 43690.0, Sat = 254.0, Bri = 254.0 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:54.937 DEBUG Color change with HSB New: Hue: 43690, Sat: 254, Bri: 254. Resulting RGB Values: 255 255 255 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:54.937 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/POWER","message":"ON","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:54.938 DEBUG publishing message: HABRIDGE - cmnd/Luftbefeuchter/POWER - ON - count: 0 com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:54.938 DEBUG Retrieved a MQTT hanlder for name: HABRIDGE com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:54.940 DEBUG Calling color as requested. com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:55.090 DEBUG Decode Json for url items: [{"item":"{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"${color.rgbx}","qos":"1","retain":"false"}","type":"mqttMessage"}] com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:55.091 DEBUG Calling Home device handler for type : mqttMessage com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:55.091 DEBUG executing HUE api request to send message to MQTT broker: "{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"${color.rgbx}","qos":"1","retain":"false"}" com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:55.092 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"${color.rgbx}","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.DeviceDataDecode
12-15-2020 19:08:55.092 INFO Hue = 43690.0, Sat = 254.0, Bri = 254.0 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:55.092 DEBUG Color change with HSB New: Hue: 43690, Sat: 254, Bri: 254. Resulting RGB Values: 255 255 255 com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:55.093 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"FFFFFF","qos":"1","retain":"false"}>>, not done: true com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:55.093 DEBUG Request <<{"clientId":"HABRIDGE","topic":"cmnd/Luftbefeuchter/COLOR","message":"FFFFFF","qos":"1","retain":"false"}>>, not done: false com.bwssystems.HABridge.hue.ColorDecode
12-15-2020 19:08:55.093 DEBUG publishing message: HABRIDGE - cmnd/Luftbefeuchter/COLOR - FFFFFF - count: 0 com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:55.093 DEBUG Retrieved a MQTT hanlder for name: HABRIDGE com.bwssystems.HABridge.plugins.mqtt.MQTTHome
12-15-2020 19:08:55.128 DEBUG HueMulator GET called on api/* with request <<</api/b56a460139704039b50e72071393375d/lights/534>>>, and body <<<>>> com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:55.130 DEBUG hue light requested: 534 for user: b56a460139704039b50e72071393375d from 192.168.100.19 com.bwssystems.HABridge.hue.HueMulator
12-15-2020 19:08:55.131 DEBUG validateWhitelistUser: found a user com.bwssystems.HABridge.BridgeSecurity
12-15-2020 19:08:55.132 DEBUG found device named: Luftbefeuchter com.bwssystems.HABridge.hue.HueMulator

@bwssytems
Copy link
Owner

Interesting as if you convert what the Alexa sent in an external converter you get FFFFFF. So, trying to understand why Alexa sends that?

@bwssytems
Copy link
Owner

bwssytems commented Dec 15, 2020

Well, intersting enough, if I set the Brightness value to 50, it ends up being 0000FF, which is correct. It must be if the brightness is not set properly, it will be 254 or 100% and that kills the color conversion... This is a bug.

FY: Alexa must be getting state first and adjusting based on the brightness value for the device. That would be why it helps to set from the GUI first.

@Sharky84
Copy link

Hi,
I still have this bug in 5.4.1-release. Also the color.rx,color.gx,color.bx are always set on FF each, when I request Alexa to set the color. Doing it in the Web-UI of HA-Bridge it is working. Can you please help? I love the project and have been using it for a long time yet.
I thought that it should have been fixed in 5.4.1 because the topic was closed, but as I can see only the 9-digit problem was solved.
Build it with maven still the same error.

Greetings Michael

@AndreasGaus
Copy link

Hi, I still have this bug in 5.4.1-release. Also the color.rx,color.gx,color.bx are always set on FF each, when I request Alexa to set the color. Doing it in the Web-UI of HA-Bridge it is working. Can you please help? I love the project and have been using it for a long time yet. I thought that it should have been fixed in 5.4.1 because the topic was closed, but as I can see only the 9-digit problem was solved. Build it with maven still the same error.

Greetings Michael

Same issue, here, Michael. Would really be nice if the HA-Bridge guys can fix this issue.

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

5 participants