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

[Bug] Color reverts to the previous color I selected on RGB+CCT Bulb #239

Closed
RaffoNin opened this issue Jul 19, 2021 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@RaffoNin
Copy link

Please use the template and fill in all the data requested below!

Describe the bug
When I change the color of my zigbee RGB+CCT bulb the color reverts to the previous color that I have selected.

To Reproduce
Steps to reproduce the behavior, for example:

  1. Change color to Red via the Home app.
  2. Change Color to Blue
  3. The home app will show that the color changed to blue but immediately reverts to red.

Expected behavior
For the color to change.

MQTT messages

[19/07/2021, 22:00:01] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.69707,"y":0.30005}}'
[19/07/2021, 22:00:02] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.15387,"y":0.38346}}'
[19/07/2021, 22:00:02] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 67 exceeded minimum of 150. See https://git.io/JtMGR for more info.
[19/07/2021, 22:00:03] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.31306,"y":0.12139}}'
[19/07/2021, 22:00:05] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.13579,"y":0.0453}}'
[19/07/2021, 22:00:05] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 566 exceeded maximum of 500. See https://git.io/JtMGR for more info.
[19/07/2021, 22:00:06] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color_temp":405}'
[19/07/2021, 22:00:07] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.7,"y":0.29981}}'
[19/07/2021, 22:00:08] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.7,"y":0.29981}}'
[19/07/2021, 22:00:10] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color_temp":405}'
[19/07/2021, 22:00:11] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.1723,"y":0.74451}}'
[19/07/2021, 22:00:11] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 128 exceeded minimum of 150. See https://git.io/JtMGR for more info.
[19/07/2021, 22:00:13] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.1723,"y":0.74451}}'
[19/07/2021, 22:00:13] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 128 exceeded minimum of 150. See https://git.io/JtMGR for more info.
[19/07/2021, 22:00:14] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color_temp":405}'
[19/07/2021, 22:00:15] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.13579,"y":0.0453}}'
[19/07/2021, 22:00:15] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 566 exceeded maximum of 500. See https://git.io/JtMGR for more info.

Versions used
Please provide the version of the following pieces of software:

  • V. 1.3 of Z2M
  • Homebridge 1.3.4
  • Zigbee2MQTT version 1.2
  • Homebridge Config UI X v4.41.1
RPReplay_Final1626703216.mov
@RaffoNin RaffoNin added the bug Something isn't working label Jul 19, 2021
@itavero
Copy link
Owner

itavero commented Jul 20, 2021

Can you provide debug logs (run homebridge with -D) and/or the logs of Zigbee2MQTT as well?

@RaffoNin
Copy link
Author

Sure thing. These are the logs I get when I change the color to violet but it reverts back to teal. I noticed from troubleshooting that the bug goes away when I restart Homebridge. I also noticed that the bug only happens when I change color using my iPad running a beta version of IOS 15. After changing colors from my Ipad the bug starts happening on my other devices as well. Perhaps it might be an IOS beta (cloud sync?) issue rather than a Z2M issue.

From Homebridge in Debug mode:

[20/07/2021, 19:46:07] [zigbee2mqtt] Pending data: {"color":{"x":0.15354,"y":0.38526}}
[20/07/2021, 19:46:07] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x60a423fffe328b76/set': '{"color":{"x":0.15354,"y":0.38526}}'
[20/07/2021, 19:46:07] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 67 exceeded minimum of 150. See https://git.io/JtMGR for more info.
[20/07/2021, 19:46:07] [homebridge-z2m] Error:
at ColorTemperature.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
at ColorTemperature.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1946:16)
at ColorTemperature.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1379:20)
at Lightbulb.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:465:35)
at PassthroughCharacteristicMonitor.callback (/usr/local/lib/node_modules/homebridge-z2m/src/converters/monitor.ts:28:24)
at /usr/local/lib/node_modules/homebridge-z2m/src/converters/light.ts:109:34
at Array.forEach ()
at LightHandler.updateState (/usr/local/lib/node_modules/homebridge-z2m/src/converters/light.ts:109:19)
at Zigbee2mqttAccessory.updateStates (/usr/local/lib/node_modules/homebridge-z2m/src/platformAccessory.ts:294:15)
at Zigbee2mqttPlatform.handleDeviceUpdate (/usr/local/lib/node_modules/homebridge-z2m/src/platform.ts:189:19)
[20/07/2021, 19:46:07] [zigbee2mqtt] Handled device update for YandhiLight: {"brightness":5,"color":{"hue":167,"saturation":100,"x":0.15354,"y":0.38526},"color_mode":"xy","color_options":{"execute_if_off":false},"color_temp":67,"color_temp_startup":403,"linkquality":21,"state":"ON"}

From Zigbee2MQTT:

Debug Received MQTT message on 'zigbee2mqtt/0x60a423fffe328b76/set' with data '{"color":{"x":0.15354,"y":0.38526}}'
Debug Publishing 'set' 'color' to 'YandhiLight'
Info MQTT publish: topic 'zigbee2mqtt/YandhiLight', payload '{"brightness":5,"color":{"hue":167,"saturation":100,"x":0.15354,"y":0.38526},"color_mode":"xy","color_options":{"execute_if_off":false},"color_temp":67,"color_temp_startup":403,"linkquality":21,"state":"ON"}'

@itavero
Copy link
Owner

itavero commented Jul 20, 2021

I'm not running any beta versions at the moment, but I haven't seen this behavior either.
I can't really confirm if this is the cause or not.

What I do find strange is that Z2M reports color temperatures outside of the range of the device (or perhaps the range is not yet specified for it). Luckily I think that problem will be resolved with the changes I'm working on for #208

Other than that, nothing in the logs really stands out to me. It just looks normal. 🤔

@RaffoNin
Copy link
Author

Will close this issue seeing as how there's nothing in the logs that point to the cause of the problem. I will wait and see if future betas and future versions of the plugin still have this problem. Appreciate the effort in making and continuously updating this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants