meross_lan: MSL120 problem when changing color temperature (always not executed the first time)
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}}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (16 by maintainers)
Commits related to this issue
- fix msl120d fw 2.1.2 issue #87 — committed to krahabb/meross_lan by krahabb 3 years ago
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