xiaomi_airconditioningcompanion icon indicating copy to clipboard operation
xiaomi_airconditioningcompanion copied to clipboard

Add lumi.acpartner.mcn02 (KTBL03LM) support

Open UltraREX opened this issue 5 years ago • 28 comments

Initializing with host 192.168.8.164 (token bd7f6...) lumi.acpartner.mcn02 1.3.2_108 ESP32 detected Got exception while fetching the state: {'code': -5000, 'message': 'Resp general error.'}

UltraREX avatar May 25 '19 02:05 UltraREX

miiocli airconditioningcompanion --ip 192.168.8.164 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx raw_command get_prop "['power']" Running command raw_command ['on']

UltraREX avatar May 25 '19 03:05 UltraREX

miiocli airconditioningcompanion --ip 192.168.8.164 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx raw_command get_prop "['mode']" Running command raw_command ['cool']

UltraREX avatar May 25 '19 03:05 UltraREX

miiocli airconditioningcompanion --ip 192.168.8.164 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx status Error: {'message': 'Resp general error.', 'code': -5000}

UltraREX avatar May 25 '19 03:05 UltraREX

miiocli airconditioningcompanion --ip 192.168.8.164 --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx info Model: lumi.acpartner.mcn02 Hardware version: ESP32 Firmware version: 1.3.2_108 Network: {'mask': '255.255.255.0', 'gw': '192.168.8.1', 'localIp': '192.168.8.164'} AP: {'primary': 11, 'rssi': -37, 'ssid': 'Matrix', 'bssid': 'XX:XX:XX:XX:XX:XX'}

UltraREX avatar May 25 '19 03:05 UltraREX

same model, same error message, please add support, thank you!

darkfather avatar Jun 24 '19 03:06 darkfather

is this model already suported?

rflx18 avatar Jun 24 '19 22:06 rflx18

+1 . Same problem.

wzpan avatar Jun 30 '19 14:06 wzpan

+1 . Same problem.

andreasekoyoga avatar Aug 30 '19 14:08 andreasekoyoga

+1. Same problem. I thought I had the acpartner.v3.

EDIT: Yep, I've checked the model number and it is KTBL03LM instead of KTBL11LM.

akubak avatar Sep 06 '19 15:09 akubak

any news on supporting this?

rflx18 avatar Dec 08 '19 21:12 rflx18

it's 2020 now, any news on this issue?

AdrianXu07 avatar Jan 20 '20 09:01 AdrianXu07

+1. Same problem.

2020-01-21 11:09:15 INFO (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] lumi.acpartner.mcn02 2.0.6_0006 esp32 detected

2020-01-21 11:09:15 DEBUG (SyncWorker_14) [miio.device] 192.168.31.105:54321 >>: {'id': 2, 'method': 'get_model_and_state', 'params': []}

2020-01-21 11:09:19 DEBUG (SyncWorker_14) [miio.device] 192.168.31.105:54321 (ts: 1970-01-02 02:23:34, id: 2) << {'id': 2, 'error': {'code': -9999, 'message': 'user ack timeout'}}

2020-01-21 11:09:19 ERROR (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}

sskgaiqny avatar Jan 21 '20 03:01 sskgaiqny

can the support be added please? this is the cheapest AC companion on the market.

2020-02-10 14:00:07 INFO (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] lumi.acpartner.mcn02 2.0.6_0006 esp32 detected 2020-02-10 14:00:07 DEBUG (SyncWorker_2) [miio.device] 192.168.1.183:54321 >>: {'id': 2, 'method': 'get_model_and_state', 'params': []} 2020-02-10 14:00:11 DEBUG (SyncWorker_2) [miio.device] 192.168.1.183:54321 (ts: 1970-01-01 00:37:43, id: 2) << {'id': 2, 'error': {'code': -9999, 'message': 'user ack timeout'}} 2020-02-10 14:00:12 ERROR (MainThread) [custom_components.xiaomi_miio_airconditioningcompanion.climate] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}

pznamenskii avatar Feb 10 '20 11:02 pznamenskii

Here are a few more useful commands:

miiocli device --ip xxx --token xxx raw_command get_prop "['mode','power','tar_temp','fan_level','ver_swing','load_power']"
miiocli device --ip xxx --token xxx raw_command set_power "['on']"
miiocli device --ip xxx --token xxx raw_command set_power "['off']"
miiocli device --ip xxx --token xxx raw_command set_tar_temp "[25]"
miiocli device --ip xxx --token xxx raw_command set_mode "['dry']"
miiocli device --ip xxx --token xxx raw_command set_mode "['cool']"
miiocli device --ip xxx --token xxx raw_command set_mode "['wind']"
miiocli device --ip xxx --token xxx raw_command set_mode "['heat']"
miiocli device --ip xxx --token xxx raw_command set_mode "['auto']"
miiocli device --ip xxx --token xxx raw_command set_fan_level "['small_fan']"
miiocli device --ip xxx --token xxx raw_command set_fan_level "['medium_fan']"
miiocli device --ip xxx --token xxx raw_command set_fan_level "['large_fan']"
miiocli device --ip xxx --token xxx raw_command set_fan_level "['auto_fan']"

I don't use HA so I can't be bothered with implementation. Just FYI.

To make the commands work consistently, check https://github.com/rytilahti/python-miio/pull/636

fsalomon avatar Feb 20 '20 14:02 fsalomon

Same issue here, is it possible to add the support?

ihaettypo avatar Feb 21 '20 11:02 ihaettypo

+1 . Same problem.

wlhot avatar Apr 12 '20 13:04 wlhot

截屏2020-04-15 下午10 57 46 已经列入待添加设备了 希望作者也关注

lvhe19880210 avatar Apr 15 '20 15:04 lvhe19880210

@UltraREX @fsalomon Does miio work with recent versions of firmware? Such as 2.0.6_0003.

I can't get anything with miiocli, every command results in a timeout:

ERROR:miio.miioprotocol:Got error when receiving: timed out Error: No response from the device

Meanwhile ping gets instant responses.

To my utmost horror, when I allow it to connect to the Cloud and start capturing packets, I saw it using TLS 1.2. Although it did send some UDP packets from source port 54321 to dest port 8053.

Could this be one of those newer miot only devices?

https://github.com/rytilahti/python-miio/issues/627

If so, I'd better try returning it as soon as possible, if it's possible at all.

wzhd avatar May 21 '20 15:05 wzhd

Works for me on 2.0.8_0002

fsalomon avatar May 21 '20 21:05 fsalomon

@fsalomon Thank you so much! I guess it will eventually get supported.

wzhd avatar May 22 '20 01:05 wzhd

lumi.acpartner.mcn02 does not support get_model_and_state command. We can use get_prop ["ac_state", "load_power"] replace. If lumi.acpartner.mcn02 receives a command that it does not support, it will return {'code': -9999, 'message': 'user ack timeout'}.

EugeneLiu avatar Jul 22 '20 05:07 EugeneLiu

the upstream python-miio has added the support of mcn02 28 days ago.issue637 However it does not release new version yet. I hope it will be soon. and then just small work to make the device work on ha.

fireinice avatar Oct 08 '20 12:10 fireinice

is this already supported=? got lost now

rflx18 avatar Nov 12 '20 00:11 rflx18

This custom component doesn't support the device. What's your use case? Do you want to control your air conditioner?

syssi avatar Nov 12 '20 06:11 syssi

It seems to me that the function is alreday realized by https://github.com/rytilahti/python-miio/pull/809, and it is now usable to me by using this python submodule. https://python-miio.readthedocs.io/en/latest/api/miio.airconditioningcompanionMCN.html

btw, the HA's built-in miio is the latest, which means that I'm now able to use the following integrations to achieve the basic ability. https://www.home-assistant.io/integrations/sensor.command_line/ https://www.home-assistant.io/integrations/switch.command_line/

Hoping one day it will be bumped into the official HA' support list.

xiazeyu avatar Nov 18 '20 16:11 xiazeyu

Is support for this device coming?

Can this include current (W) reporting?

johnjoemorgan avatar Sep 20 '21 03:09 johnjoemorgan

Is 04LM will be supported?

brightlike avatar Nov 11 '21 10:11 brightlike

there is another fork supported KTBL03LM

slako avatar Jan 26 '22 10:01 slako