merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
364 stars 62 forks source link

Incorrect Mode Reporting on AC Controller #504

Closed TJT-JTJ closed 11 months ago

TJT-JTJ commented 11 months ago

Describe the bug I have a lumi.acpartner.mcn02 (Mi AC Companion 2), mode of the heater is being reported back incorrectly through Homebridge and HomeKit. Setting the device works correctly in all modes, however within a few seconds the AC in Cool mode will display as 'Heating' - despite the AC being in the correct mode. Correct mode is also correct in Mi Home.

Expected behavior Set mode and the displayed mode should be the same

Your config.json

                    "name": "Spare Room AC",
                    "ip": "",
                    "token": "",
                    "deviceId": "x",
                    "model": "lumi.acpartner.mcn02",
                    "pollingInterval": 10,
                    "deepDebugLog": false,
                    "micloud": {
                        "username": "",
                        "password": "",
                        "country": "cn",
                        "forceMiCloud": true,
                        "timeout": 300

Note that forcing it to MiCloud makes no difference.

Debug log Cannot see log entry, even with deepdebug enabled.

Screenshots

image

Additional context N/A

merdok commented 11 months ago

Hi, you would need to provide a debug, especially a piece where the property sync is happening so that i can see what is synced from the device and if that is correct.

TJT-JTJ commented 11 months ago
[8/6/2023, 9:41:55 PM] [homebridge-miot] [Spare Room AC] Successfully updated property chunk! RAW: [{"did":"333990225","iid":"0.2.1","siid":2,"piid":1,"value":true,"code":0,"updateTime":1691329293,"exe_time":0},{"did":"333990225","iid":"0.2.2","siid":2,"piid":2,"value":1,"code":0,"updateTime":1691329212,"exe_time":0},{"did":"333990225","iid":"0.2.3","siid":2,"piid":3,"value":18,"code":0,"updateTime":1690618152,"exe_time":0},{"did":"333990225","iid":"0.3.1","siid":3,"piid":1,"value":0,"code":0,"updateTime":1690943789,"exe_time":0},{"did":"333990225","iid":"0.3.2","siid":3,"piid":2,"value":true,"code":0,"updateTime":1682781291,"exe_time":0}]
[8/6/2023, 9:41:55 PM] [homebridge-miot] [Spare Room AC] Device properties updated: 
[
  "air-conditioner:on: true",
  "air-conditioner:mode: 1",
  "air-conditioner:target-temperature: 18",
  "fan-control:fan-level: 0",
  "fan-control:vertical-swing: true"
]

So it seems me running in Debug mode temporarily resolved whatever the bug was. I'm not seeing any change in the property polls so I'll keep it in debug mode for a while and see if I can catch the issue again.

TJT-JTJ commented 11 months ago

Closing this for now as it seems whatever was causing the issue (most likely Mi Cloud?) has resolved itself.