question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSL120 problem when changing color temperature (always not executed the first time)

See original GitHub issue

Version of the custom_component

v2.3.1

Configuration

service: light.turn_on
data:
  kelvin: 2700
target:
  entity_id: light.smart_rgb_bulb_2102081094806890842048e1e9xxxxxxxx

and

service: light.turn_on
data:
  kelvin: 6500
target:
  entity_id: light.smart_rgb_bulb_2102081094806890842048e1e9xxxxxxxx

Note: I have added the following property to light.py so that I can specify the correct color temperature. It would be nice to be able to set these properties in the configuration.

    @property
    def max_mireds(self):
        return 371 # math.ceil(1/(2700/1000000))

    @property
    def min_mireds(self):
        return 153 # math.floor(1/(6500/1000000))

Describe the bug

When changing the color temperature, the first time is ignored and the second time is executed. In the following log, the color temperature is changed from the lowest to the highest and then to the lowest in the HA service execution. In both cases, the first time was ignored and the second time was successful.

Debug log

2021/09/21 - 23:03:03	auto	GETACK	Appliance.System.All	{"system": {"hardware": {"type": "msl120d", "subType": "jp", "version": "2.0.0", "chipType": "mt7682", "uuid": "", "macAddress": ""}, "firmware": {"version": "2.1.2", "compileTime": "2020/07/24 09:51:36 GMT +08:00", "wifiMac": "", "innerIp": "", "server": "", "port": "", "userId": ""}, "time": {"timestamp": 4, "timezone": "", "timeRule": []}, "online": {"status": 1}}, "digest": {"togglex": [{"channel": 0, "onoff": 1, "lmTime": 1632228591}], "triggerx": [], "timerx": [], "light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 1, "luminance": 60, "transform": 0}}}
2021/09/21 - 23:03:03	auto	GETACK	Appliance.System.Ability	{"Appliance.Config.Key": {}, "Appliance.Config.WifiList": {}, "Appliance.Config.Wifi": {}, "Appliance.Config.Trace": {}, "Appliance.System.All": {}, "Appliance.System.Hardware": {}, "Appliance.System.Firmware": {}, "Appliance.System.Debug": {}, "Appliance.System.Online": {}, "Appliance.System.Time": {}, "Appliance.System.Ability": {}, "Appliance.System.Runtime": {}, "Appliance.System.Report": {}, "Appliance.System.Position": {}, "Appliance.System.Factory": {}, "Appliance.Control.Multiple": {"maxCmdNum": 5}, "Appliance.Control.ToggleX": {}, "Appliance.Control.TimerX": {"sunOffsetSupport": 1}, "Appliance.Control.TriggerX": {}, "Appliance.Control.Bind": {}, "Appliance.Control.Unbind": {}, "Appliance.Control.Upgrade": {}, "Appliance.Control.Light": {"capacity": 7}, "Appliance.Digest.TriggerX": {}, "Appliance.Digest.TimerX": {}}
2021/09/21 - 23:03:03	http	GET	Appliance.System.Runtime	{"runtime": {}}
2021/09/21 - 23:03:03	http	GETACK	Appliance.System.Runtime	{"runtime": {"signal": 76}}
2021/09/21 - 23:03:08	http	GET	Appliance.System.Position	{"position": {}}
2021/09/21 - 23:03:08	http	GETACK	Appliance.System.Position	{"position": {"longitude": 0, "latitude": 0}}
2021/09/21 - 23:03:13	http	GET	Appliance.System.Factory	{"factory": {}}
2021/09/21 - 23:03:13	http	GETACK	Appliance.System.Factory	{"factory": {"test": {"ledAging": 0, "wifiTest": 1}}}
2021/09/21 - 23:03:18	http	GET	Appliance.Control.ToggleX	{"togglex": {}}
2021/09/21 - 23:03:18	http	GETACK	Appliance.Control.ToggleX	{"channel": 0, "togglex": {"channel": 0, "onoff": 1, "lmTime": 1632228591}}
2021/09/21 - 23:03:23	http	GET	Appliance.Control.TimerX	{"timerx": {}}
2021/09/21 - 23:03:23	http	GETACK	Appliance.Control.TimerX	{"digest": {}, "timerx": {}}
2021/09/21 - 23:03:28	http	GET	Appliance.Control.TriggerX	{"triggerx": {}}
2021/09/21 - 23:03:28	http	GETACK	Appliance.Control.TriggerX	{"digest": {}, "triggerx": {}}
2021/09/21 - 23:03:30	http	GET	Appliance.System.All	{"all": {}}
2021/09/21 - 23:03:30	http	GETACK	Appliance.System.All	{"all": {"system": {"hardware": {"type": "msl120d", "subType": "jp", "version": "2.0.0", "chipType": "mt7682", "uuid": "", "macAddress": ""}, "firmware": {"version": "2.1.2", "compileTime": "2020/07/24 09:51:36 GMT +08:00", "wifiMac": "", "innerIp": "", "server": "", "port": "", "userId": ""}, "time": {"timestamp": 1632233010, "timezone": "", "timeRule": []}, "online": {"status": 1}}, "digest": {"togglex": [{"channel": 0, "onoff": 1, "lmTime": 1632228591}], "triggerx": [], "timerx": [], "light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 1, "luminance": 60, "transform": 0}}}}
2021/09/21 - 23:03:33	http	GET	Appliance.Control.Light	{"light": {}}
2021/09/21 - 23:03:33	http	GETACK	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 1, "luminance": 60, "transform": 0}}
2021/09/21 - 23:03:38	http	GET	Appliance.Digest.TriggerX	{"triggerx": {}}
2021/09/21 - 23:03:38	http	GETACK	Appliance.Digest.TriggerX	{"digest": []}
2021/09/21 - 23:03:43	http	GET	Appliance.Digest.TimerX	{"timerx": {}}
2021/09/21 - 23:03:43	http	GETACK	Appliance.Digest.TimerX	{"digest": []}
2021/09/21 - 23:04:00	http	GET	Appliance.System.All	{"all": {}}
2021/09/21 - 23:04:00	http	GETACK	Appliance.System.All	{"all": {"system": {"hardware": {"type": "msl120d", "subType": "jp", "version": "2.0.0", "chipType": "mt7682", "uuid": "", "macAddress": ""}, "firmware": {"version": "2.1.2", "compileTime": "2020/07/24 09:51:36 GMT +08:00", "wifiMac": "", "innerIp": "", "server": "", "port": "", "userId": ""}, "time": {"timestamp": 1632233039, "timezone": "", "timeRule": []}, "online": {"status": 1}}, "digest": {"togglex": [{"channel": 0, "onoff": 1, "lmTime": 1632228591}], "triggerx": [], "timerx": [], "light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 1, "luminance": 60, "transform": 0}}}}
2021/09/21 - 23:04:09	http	SET	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:09	http	SETACK	Appliance.Control.Light	{"light": {"rgb": -1, "capacity": 6, "channel": 0, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:11	http	SET	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:11	http	SETACK	Appliance.Control.Light	{"light": {"rgb": -1, "capacity": 6, "channel": 0, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:12	mqtt	PUSH	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:14	mqtt	PUSH	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 100, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:20	http	SET	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "temperature": 1, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:20	http	SETACK	Appliance.Control.Light	{"light": {"rgb": -1, "capacity": 6, "channel": 0, "temperature": 1, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:22	http	SET	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "temperature": 1, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:22	http	SETACK	Appliance.Control.Light	{"light": {"rgb": -1, "capacity": 6, "channel": 0, "temperature": 1, "luminance": 60, "transform": 0}}
2021/09/21 - 23:04:25	mqtt	PUSH	Appliance.Control.Light	{"light": {"capacity": 6, "channel": 0, "rgb": 16753920, "temperature": 1, "luminance": 60, "transform": 0}}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
krahabbcommented, Sep 29, 2021

Thank you @nao-pon , That is very likely. I’ll just bind this ‘fix’ to this fw version (2.1.2) for the next release. We’ll see, maybe in the future something will come up like a fix for these devices or the same behaviour on others

0reactions
nao-poncommented, Oct 1, 2021

@krahabb I updated to v2.3.3. I have confirmed that this issue has been resolved. thank you so much! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Screen color temperature changes after start-up (as if Night Light
Sometimes, the screen color temperature flickers - it turns back to normal, and quickly fades into the reddish tone again. I've noticed this ......
Read more >
The Best Smart LED Light Bulbs for 2022 - The New York Times
Color bulbs can change to emit millions of hues; ... The Meross MSL120 Smart Wi-Fi LED Bulb works with every major smart-home platform, ......
Read more >
U2419H, automatic color temperature change - Dell Community
The problem of color temperature change will be solved, but the Response Time will be longer. This OD setting will be reset each...
Read more >
How To Correct Changing White Balance in Adobe Premiere
If you leave on auto white balance while shooting video in your DSLR and you experience major color and temperature shifts in your...
Read more >
color temperature - original temperature confused with ...
Description of the bug. The pop-up dialog for adjusting the Color temperature (Menu -> Colors -> Color Temperature) is not working as one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found