syssi / xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant
Apache License 2.0
394 stars 93 forks source link

Add lumi.acpartner.mcn02 (KTBL03LM) support #61

Open UltraREX opened 5 years ago

UltraREX commented 5 years ago

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 commented 5 years ago

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

UltraREX commented 5 years ago

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

UltraREX commented 5 years ago

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

UltraREX commented 5 years ago

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'}

darkfather commented 5 years ago

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

rflx18 commented 5 years ago

is this model already suported?

wzpan commented 5 years ago

+1 . Same problem.

andreasekoyoga commented 4 years ago

+1 . Same problem.

akubak commented 4 years ago

+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.

rflx18 commented 4 years ago

any news on supporting this?

AdrianXu07 commented 4 years ago

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

sskgaiqny commented 4 years ago

+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'}

pznamenskii commented 4 years ago

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'}

fsalomon commented 4 years ago

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

ihaettypo commented 4 years ago

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

wlhot commented 4 years ago

+1 . Same problem.

lvhe19880210 commented 4 years ago
截屏2020-04-15 下午10 57 46

已经列入待添加设备了 希望作者也关注

wzhd commented 4 years ago

@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.

fsalomon commented 4 years ago

Works for me on 2.0.8_0002

wzhd commented 4 years ago

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

EugeneLiu commented 4 years ago

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'}.

fireinice commented 3 years ago

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.

rflx18 commented 3 years ago

is this already supported=? got lost now

syssi commented 3 years ago

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

xiazeyu commented 3 years ago

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.

johnjoemorgan commented 2 years ago

Is support for this device coming?

Can this include current (W) reporting?

brightlike commented 2 years ago

Is 04LM will be supported?

slako commented 2 years ago

there is another fork supported KTBL03LM