I’m using this binding from PaperUI OpenHAB2.3 and just discovered this issue with a LB120 myself.
The state change for color temperature from any UI is transferred to the bulb correctly:
Item ‘tplinksmarthome_lb120_XXXXXX_colorTemperature’ received command 28
Executing command: {“smartlife.iot.smartbulb.lightingservice”:{“transition_light_state”:{“color_temp”:3764,“hue”:0,“saturation”:0,“on_off”:1,“ignore_default”:1,“mode”:“normal”,“transition_period”:0}}}
tplinksmarthome_lb120_XXXXXX_colorTemperature changed from UNDEF to 28
Command response: {“smartlife.iot.smartbulb.lightingservice”:{“transition_light_state”:{“on_off”:1,“mode”:“normal”,“hue”:0,“saturation”:0,“color_temp”:3764,“brightness”:22,“err_code”:0}}}
But during periodic state update this gets lost:
Update Channels for:tplinksmarthome:lb120:XXXXXX
Executing command: {“system”:{“get_sysinfo”:{}}, “smartlife.iot.common.emeter”:{“get_realtime”:{}}}
2018-09-02 21:36:54.467 [TRACE] [.tplinksmarthome.internal.Connection] - Command response: {“system”:{“get_sysinfo”:{“sw_ver”:“1.2.3 Build 170123 Rel.100146”,“hw_ver”:“1.0”,“model”:“LB120(EU)”,“description”:“Smart Wi-Fi LED Bulb with Tunable White Light”,“alias”:“Glühbirne”,“mic_type”:“IOT.SMARTBULB”,“dev_state”:“normal”,“mic_mac”:"…",“deviceId”:"…",“oemId”:"…",“hwId”:"…",“is_factory”:false,“disco_ver”:“1.0”,“ctrl_protocols”:{“name”:“Linkie”,“version”:“1.0”},“light_state”:{“on_off”:1,“mode”:“normal”,“hue”:0,“saturation”:0,“color_temp”:3764,“brightness”:22},“is_dimmable”:1,“is_color”:0,“is_variable_color_temp”:1,}
tplinksmarthome_lb120_XXXXXX_colorTemperature changed from 28 to UNDEF
Of course you only really recognise this, if you not only use a sitemap but interpret values internally or use th Kasa app in parallel.
In the codes I was reading to be able to interpret the trace log, the BulbDevice’s updateChannel method does not deal with color temperatures producing the UNDEF value, if I’m not mislead.