Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
UltraREX opened this issue May 25, 2019 · 29 comments
Open

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

UltraREX opened this issue May 25, 2019 · 29 comments

Comments

@UltraREX
Copy link

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
Copy link
Author

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

@UltraREX
Copy link
Author

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

@UltraREX
Copy link
Author

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

@UltraREX
Copy link
Author

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

@syssi syssi changed the title 请问有计划支持米家空调伴侣2(79元,不带网关) 么? Add lumi.acpartner.mcn02 support Jun 2, 2019
@darkfather
Copy link

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

@rflx18
Copy link

rflx18 commented Jun 24, 2019

is this model already suported?

@wzpan
Copy link

wzpan commented Jun 30, 2019

+1 . Same problem.

@andreasekoyoga
Copy link

+1 . Same problem.

@akubak
Copy link

akubak commented Sep 6, 2019

+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
Copy link

rflx18 commented Dec 8, 2019

any news on supporting this?

@AdrianXu07
Copy link

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

@sskgaiqny
Copy link

sskgaiqny commented Jan 21, 2020

+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
Copy link

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
Copy link

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 rytilahti/python-miio#636

@ihaettypo
Copy link

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

@wlhot
Copy link

wlhot commented Apr 12, 2020

+1 . Same problem.

@lvhe19880210
Copy link

截屏2020-04-15 下午10 57 46

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

@wzhd
Copy link

wzhd commented May 21, 2020

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

rytilahti/python-miio#627

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

@fsalomon
Copy link

Works for me on 2.0.8_0002

@wzhd
Copy link

wzhd commented May 22, 2020

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

@EugeneLiu
Copy link

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
Copy link

fireinice commented Oct 8, 2020

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.

@syssi syssi changed the title Add lumi.acpartner.mcn02 support Add lumi.acpartner.mcn02 (KTBL03LM) support Oct 29, 2020
@rflx18
Copy link

rflx18 commented Nov 12, 2020

is this already supported=? got lost now

@syssi
Copy link
Owner

syssi commented Nov 12, 2020

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

@xiazeyu
Copy link

xiazeyu commented Nov 18, 2020

It seems to me that the function is alreday realized by rytilahti/python-miio#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
Copy link

johnjoemorgan commented Sep 20, 2021

Is support for this device coming?

Can this include current (W) reporting?

@brightlike
Copy link

Is 04LM will be supported?

@slako
Copy link

slako commented Jan 26, 2022

there is another fork supported KTBL03LM

@Marx2
Copy link

Marx2 commented Dec 1, 2024

I suppose you mention https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02
Actually it doesn't work, because it's long time not updated, and HA complains about a lot of deprecated variables. Fixing it should allow to make it working again:

2024-12-01 14:04:11.402 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-12-01 14:04:11.404 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_miio_airconditioningcompanionmcn02 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-12-01 14:04:11.406 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-12-01 14:04:23.287 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.299 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.311 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_COOL was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.COOL instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.318 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_AUTO was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.330 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_DRY was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.DRY instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.342 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_FAN_ONLY was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.348 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_SWING_MODE was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.354 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_FAN_MODE was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.361 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.378 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from xiaomi_miio_airconditioningcompanionmcn02, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'xiaomi_miio_airconditioningcompanionmcn02' custom integration
2024-12-01 14:04:23.453 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'xiaomi_miio_airconditioningcompanionmcn02' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/xiaomi_miio_airconditioningcompanionmcn02/climate.py, line 230: async_track_state_change(hass, sensor_entity_id, self._async_sensor_changed), please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues
2024-12-01 14:04:23.454 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.xiaomi_miio_airconditioningcompanionmcn02.climate.XiaomiAirConditioningCompanion'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE|SWING_MODE: 41>, please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-12-01 14:04:23.454 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.xiaomi_miio_airconditioningcompanionmcn02.climate.XiaomiAirConditioningCompanion'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues
2024-12-01 14:04:23.455 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.xiaomi_miio_airconditioningcompanionmcn02.climate.XiaomiAirConditioningCompanion'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues
2024-12-01 14:04:23.455 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.xiaomi_miio_airconditioningcompanionmcn02.climate.XiaomiAirConditioningCompanion'>) implements HVACMode(s): heat, cool, auto, dry, fan_only, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues
2024-12-01 14:04:23.462 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'xiaomi_miio_airconditioningcompanionmcn02' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/xiaomi_miio_airconditioningcompanionmcn02/climate.py, line 317: state = await self.hass.async_add_job(self._device.status), please create a bug report at https://github.com/EugeneLiu/xiaomi_airconditioningcompanionMCN02/issues
2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests