DDFs for Trådfri bulbs - #7213
Conversation
|
Interesting, the hex conversion happens because the string isn't UTF-8 encoded. It is actually "TRADFRI bulb E27 WS opal 980lm"
But hex Digging a bit deeper the string is actually latin1 encoded! The deCONZ ZCL attribute reader plays strict UTF-8 here (which implicitly includes ASCII) and just returns the whole sequence as hex string. Perhaps I should expand it to alternatively try to latin1 decode if UTF-8 fails, we have seen other strings which where also returned as hex string, perhaps the same issue. |
|
From my pet shark on the wire: When I got the light, it didn't include the weird character, but it appeared after a firmware update. Last time I checked, the Hue bridge chokes on this as well, and shows an empty |
This chang converts Latin1 strings to UTF-8. Only strings with printable characters are considered, since we don't know for sure the encoding (but after UTF-8 latin1 is most popular). Seen for a Ikea light: dresden-elektronik/deconz-rest-plugin#7213 Perhaps this covers also other cases where we have seen weird strings.
|
I've extended the attribute reader to detect and convert Latin1 strings to UTF-8 and only contain printable characters. There fore the DDF only needs to contain the ASCII string: |
Signalled by DDF validation.

Updated the DDFs for the Trådfri bulbs I still had lying around in a drawer.
TRADFRI bulb E27 W opal 1000lm
capabilities:alert/trigger_effect;configitems:bri/execute_if_off,bri/on_level,bri/onoff_transition_time,bri/startup,on/startup;refresh.intervalto 305.TRADFRI bulb E27 WS opal 980lm
This light reports a weird character in the Manufacturer Name, causing deCONZ to report it as hex string. The DDF should correct this.capabilitiesitems:alert/trigger_effect,bri/move_with_onoff,color/capabilities,color/ct/max,color/ct/min,on/off_with_effect,transition_block;configitems:bri/execute_if_off,bri/on_level,bri/onoff_transition_time,bri/startup,color/ct/startup,color/execute_if_offon/startup;TRADFRI bulb E27 CWS opal 600lm
capabilitiesitems:alert/trigger_effect,bri/move_with_onoff,color/capabilities,color/xy/...,on/off_with_effect,transition_block;configitems:bri/execute_if_off,bri/on_level,bri/onoff_transition_time,bri/startup,color/execute_if_off,on/startup;TRADFRI bulb E27 CWS 806lm
capabilitiesitems:bri/move_with_onoff,color/capabilities,color/xy/...,on/off_with_effect;transition_blockfirmware bug. But it doesn't support Trigger Effect.configitems:bri/execute_if_off,bri/on_level,bri/onoff_transition_time,bri/startup,color/ct/startup,color/execute_if_off,on/startup;