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
MQTT Invalid color mode received hassio ZNLDP12LM #7736
Comments
This happens because you are on an older HA version, make sure to be on 2021.4.5 as least as mentioned in the changelog: https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.18.3 |
i am on 2021.6.3 and it happened on the previous version |
What z2m version are you using? If you are still on 1.18.1 check first point of https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.19.0 |
i pull the latest tag i, so 1.19.0. |
Can you try if this issue disappears when setting the color temp via HA? Does the error then appear when setting the XY color of the group? |
I tried setting groups and individual lights color_temp via HA but the issue still there. |
When setting the color temp of the individual light in HA, does z2m send See https://www.zigbee2mqtt.io/information/debug.html on how to enable debug logging. |
Publishing 'set' 'color_temp' to 'lampe1' |
Could you provide your |
sure: homeassistant: true |
Can you try again with the latest dev branch? After upgrading set the color temperature at least once and provide the complete debug log starting at the point where you set the color temperature of the individual bulb via HA till 10 seconds after this. |
yes i can... Received MQTT message on 'zigbee2mqtt/lampe1/set' with data '{"state": "ON", "color_temp": 269}' |
Does HA still throw the error now? The payload looks good now: |
thanks you koenkk. BUT i rebooted hassio, set each bulb color_temp in hassio and the logs disapeared,and i can't see those bad logs come back for now. |
the error still there:
Received MQTT message on 'zigbee2mqtt/lampe3/set' with data '{"state": "ON", "color_temp": 269}' |
Does this issue disappear when setting |
the issue has disappeared with avaibility_timeout to 0. |
Unfortunately setting availability_timeout to 0 does not help, still getting a lot of these warning messages:
@Koenkk any other idea? Should I create another Issue or shall we reopen this one? |
This still happens here as well. zigbee2mqtt 1.21.1, HA Core 2021.9.6, availability_timeout: 0 |
Im not sure why this thread is closed. The color mode en and color value warnings are still not fixed. Besides that i get around 200 - 300 warnings a day about the click attribute. z2mqtt is spamming an awful lot warnings in my logs with no reason. Im using 100% hue lights which all are supported by z2mqtt and all work like expected. Still i get these warnings allot. Im running z2m version 1.21.1-1, home assistant core 2021.9.3, supervisor 2021.09.0, home assistant OS 6.3 In Which version will this be fixed? and even more important what is causing this? It doesn't make sense to set availability_timeout to 0 to fix a wrong color mode. or any other of the 500 warnings a day i get from z2m. Which by the way is the standard value in my z2m config but doesnt help at all. Thanks in advance |
hi.... |
I've had both the 1) click attribute and 2) invalid color mode spams, for a long time, also in HA 2021.10.2. But, now I've found a solution to problem 2! The messages occur only for light devices with color temperature capabilities. And ONLY for those where the color temp has never been set. (Seems like a typical uninitialized data error). Once I set the color temp for all my bulbs, the message no longer appears. But problem 1 still isn't solved. |
Funny you say that. I just yesterday found out the same too. It indeed is the lack of color temp set for the first time indeed. It's fun y how posts like these are closed while they weren't fixed. The json click is making me crazy. I just can't seem te find out what's causing this. They seem to random appear. I have tried everything mentioned in here. Can someone just remove this message from the logs if it isnt doing anything? I read about legacy. But even set that in the configuration.yaml makes no difference. If it's old just remove it I would think. |
I've done some more research: |
I'm still seeing the "Invalid color mode received" warnings. I'm on the latest ha version 2022.3.5 and z2m version 1.24.0
Interestingly there are 6 mqtt messages reporting the new state and I get 12 warnings in the ha log - 2 per message? Setting the color_temp for those lights doesn't change anything.
So that's no solution. Also, I'd have to set the filtered attribute for the groups as well and I don't know how to do that... I really hope you find a solution for this; I'm working on animated light scenes which need the h/s option, so I get loads of these warnings and after a few thousand of them ha keeps restarting. |
Same here,
|
Hey guys-- I was receiving this same error and I think I may have resolved it. Still trying to test it out, but so far it has worked, even after restarting HA. I noticed that my color and ambient bulbs (Hue brand in my case) that were throwing this error were never actually set via color or temperature from my HA dashboard. I have numerous automations to turn lights on/off, or switches that would change the state of these different types of bulbs. However, once I went into the dashboard, and changed both color and temperature (when applicable), the warnings/errors disappeared from HA and Zigbee2Mqtt logs. If this actually does work, my guess is that the default initial value in HA isn't being set by Zigbee2Mqtt so while it's passing over the color/temp value and working correctly in HA, it's not stored in and coming from HA? Idk.. Kind of grasping at straws but it seems to have worked. Note: This is best tested by grouping all your lights in Z2M and adding the group light with temp/color to the dashboard and adjusting it until you're happy with the setting. |
Thanks for sharing that, ThatTallGuy21, but sadly it doesn't apply to my situation. I have changed color and/or temperature of my lights loads of times via the dashboard, but the problem persists. @Koenkk Do you have any ideas what else I might try to get to the bottom of this? |
@mrfind could you provide the debug log when setting the color temperature and this error pops-up in HA? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
@Koenkk there's no error when setting the color temp, only when setting color in hs mode (see my post from 16 March). Here's the log when I set hs color for a light that's a member of multiple groups - the ha log shows multiple Invalid color mode received warnings:
...and here's the log when I try the same with rgb color - the ha log shows NO warnings:
|
As per your request, here's also the log for changing the color temp, which does not result in warnings:
Thanks for your support! |
This is because @emontnemery I've tested with
|
Not sure if this is relevant, but just in case: Note that the problem also occurs when changing colors from node-red by writing to MQTT (Mosquitto) directly. Happy Easter! :-) |
@mrfind it will only happen if you control in HS, if you send XY values from node-red you should be fine. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Model Zigbee HA: |
Haven't been having these errors for months now. Just change the color modes once indeed and it will be fixed |
hello, and how i can do that ? |
Same issue here for two hue bulbs (LTW012) which just have color temp and no color.
Have now set an color_temp in HA manually (as stated above). Hope this fixes the log entries. |
After restarting HA and Z2M issue is back. So no solution. @Koenkk How can we help to debug this issue. It seems that Z2M sends xy and HA just want's color_temp. Here are others with the same issue: https://community.home-assistant.io/t/mqtt-invalid-color-mode-received/314381/8 |
See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
How can i check if it supports XY? I think not, because it just have color_temp values to set. Here is the log part where i set an color temp, and the error pops up in the HA logs:
Z2M Debug Logs:
Hope this helps. |
In this log it switches from xy -> color_temp, can you provide the one where it switches from color_temp -> xy? |
Currently i cant reproduce it. Will come back here when it happens again, hopefully with an correct log. |
In my case the problem was solved when I manually set the attribute to the right value in the configuration.yaml of Home Assistant: color_mode: color_temp. |
Hi all. |
@maniac79 can you get an log like described above? |
I've got this issue with an Ikea LED1924G9 RGB Bulb when changing the color from a remote directly to the bulb (I think using a group) and reporting configured. Looking at the log
it seems like the bulb sends not only a xy, but also a hs value and zigbee2mqtt repeats both of them and sets "color_mode" to "hs" breaking homeassistant. I've tried sending the same json, but with color_mode set to xy and it worked. I guess this (at least in my case) could be fixed by making sure that color_mode is only set to supported values. I tried to find the code where this happens, but at least searching for "currentSaturation" only showed a test. Can take a look at fixing it, but need help finding the code causing the issue. Can provide more information (logs, mqtt packets, config values, ...) if it helps fixing the issue. If this is a separate issue, I'll open a new one |
What happened
hello:
"MQTT Invalid color mode received" spam in hassio log
hassio:
Logger: homeassistant.components.mqtt.light.schema_json Source: components/mqtt/light/schema_json.py:247 Integration: MQTT (documentation, issues) First occurred: 8 juin 2021, 16:32:41 (133 occurrences)
MQTT :
{ "availability": [ { "topic": "zigbee2mqtt/bridge/state" }, { "topic": "zigbee2mqtt/lampe3/availability" } ], "brightness": true, "brightness_scale": 254, "color_mode": true, "command_topic": "zigbee2mqtt/lampe3/set", "device": { "identifiers": [ "zigbee2mqtt_0x00158d0004850447" ], "manufacturer": "Xiaomi", "model": "Aqara smart LED bulb (ZNLDP12LM)", "name": "lampe3", "sw_version": "Zigbee2MQTT 1.19.1" }, "effect": true, "effect_list": [ "blink", "breathe", "okay", "channel_change", "finish_effect", "stop_effect" ], "json_attributes_topic": "zigbee2mqtt/lampe3", "max_mireds": 500, "min_mireds": 150, "name": "lampe3", "schema": "json", "state_topic": "zigbee2mqtt/lampe3", "supported_color_modes": [ "color_temp" ], "unique_id": "0x00158d0004850447_light_zigbee2mqtt" }
zigbee2mqtt:
`
MQTT publish: topic 'zigbee2mqtt/lampe3', payload '{"brightness":115,"color_mode":"xy","color_temp":239,"linkquality":99,"power_outage_memory":null,"state":"ON","update":{"state":"idle"},"update_available":false}'
`
What did you expect to happen
no log
How to reproduce it (minimal and precise)
use some ZNLDP12LM in hassio
Debug info
Zigbee2MQTT version:
latest
Adapter hardware:
CC2531
Adapter firmware version:
latest
The text was updated successfully, but these errors were encountered: