Comments (28)
Good catch! In this case we have to identify the services called by homekit.
from xiaomi_airconditioningcompanion.
If you don't use homekit does it work properly?
from xiaomi_airconditioningcompanion.
Yes, it works fine with home-assistant itself.
from xiaomi_airconditioningcompanion.
Please enable the debug output of the custom component and python-miio, too:
logger:
default: warn
logs:
custom_components.climate.xiaomi_miio: debug
miio: debug
Please reproduce the issue and provide the log again. Thanks!
from xiaomi_airconditioningcompanion.
OK, here it is.
2018-08-23 07:38:18 DEBUG (Thread-6) [homeassistant.components.homekit.type_thermostats] climate.mi_acpartner4: Set heat-cool to 2
2018-08-23 07:38:18 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 >>: {'id': 315, 'method': 'set_power', 'params': ['on']}
2018-08-23 07:38:18 DEBUG (SyncWorker_6) [miio.device] 192.168.1.231:54321 >>: {'id': 316, 'method': 'send_cmd', 'params': ['018022222101011BA2']}
2018-08-23 07:38:18 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 (ts: 1970-01-12 17:34:32, id: 315) << {'result': ['ok'], 'id': 315}
2018-08-23 07:38:18 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Response received: ['ok']
2018-08-23 07:38:18 DEBUG (SyncWorker_1) [miio.device] 192.168.1.231:54321 >>: {'id': 316, 'method': 'get_model_and_state', 'params': []}
2018-08-23 07:38:18 DEBUG (SyncWorker_6) [miio.device] 192.168.1.231:54321 (ts: 1970-01-12 17:34:32, id: 316) << {'result': ['ok'], 'id': 316}
2018-08-23 07:38:18 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Response received: ['ok']
2018-08-23 07:38:18 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=Cool; current_temperature=27.3, min_temp=16, max_temp=30, temperature=27, target_temp_step=1, fan_mode=Low, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=Off, swing_list=['On', 'Off', 'Unknown'], ac_model=010500978022222102, load_power=1, fan_speed=Low, led=False, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T07:38:18.717809+08:00>
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] Retrying with incremented id, retries left: 3
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x03\x90\xe4\x15\x00\x0fw\xad' (total 16)
value = Container:
length = 32
unknown = 0
device_id = b'\x03\x90\xe4\x15' (total 4)
ts = 1970-01-12 17:34:37
offset1 = 0
offset2 = 16
length = 16
checksum = b')\n&\xc2\xb6\xa4XF0\xb7\x8c\xc0l\x1d\xe4\x0e' (total 16)
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] Discovered 0390e415 with ts: 1970-01-12 17:34:37, token: b'token---token'
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] 192.168.1.231:54321 >>: {'id': 417, 'method': 'get_model_and_state', 'params': []}
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] 192.168.1.231:54321 (ts: 1970-01-12 17:34:37, id: 417) << {'result': ['010500978022222102', '0101011BA280222221', '1'], 'id': 417}
2018-08-23 07:38:23 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Got new state: <AirConditioningCompanionStatus power=off, load_power=1, air_condition_model=010500978022222102, model_format=1, device_type=5,air_condition_brand=97,air_condition_remote=80222221,state_format=2,air_condition_configuration=01011BA2,led=False, target_temperature=27, swing_mode=SwingMode.Off, fan_speed=FanSpeed.Low, mode=OperationMode.Cool>
2018-08-23 07:38:23 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=off; current_temperature=27.3, min_temp=16, max_temp=30, temperature=27, target_temp_step=1, fan_mode=Low, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=Off, swing_list=['On', 'Off', 'Unknown'], ac_model=010500978022222102, load_power=1, fan_speed=Low, led=False, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T07:38:23.706849+08:00>
from xiaomi_airconditioningcompanion.
I commented the log message:
[homeassistant.components.homekit.type_thermostats] climate.mi_acpartner4: Set heat-cool to 2
[miio.device] 192.168.1.231:54321 >>: {'id': 315, 'method': 'set_power', 'params': ['on']} # turn the device on
[miio.device] 192.168.1.231:54321 >>: {'id': 316, 'method': 'send_cmd', 'params': ['018022222101011BA2']} # send new configuration
[miio.device] 192.168.1.231:54321 >>: {'id': 316, 'method': 'get_model_and_state', 'params': []} # retrieve the new state
[miio.device] 192.168.1.231:54321 (ts: 1970-01-12 17:34:37, id: 417) << {'result': ['010500978022222102', '0101011BA280222221', '1'], 'id': 417} # the new state
[custom_components.climate.xiaomi_miio] Got new state: <AirConditioningCompanionStatus power=off, load_power=1, air_condition_model=010500978022222102, model_format=1, device_type=5,air_condition_brand=97,air_condition_remote=80222221,state_format=2,air_condition_configuration=01011BA2,led=False, target_temperature=27, swing_mode=SwingMode.Off, fan_speed=FanSpeed.Low, mode=OperationMode.Cool> # the device is turned off
I assume the target temperature is the problem:
2018-08-23 07:38:18 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=Cool; current_temperature=27.3, min_temp=16, max_temp=30, temperature=27, target_temp_step=1, fan_mode=Low, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=Off, swing_list=['On', 'Off', 'Unknown'], ac_model=010500978022222102, load_power=1, fan_speed=Low, led=False, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T07:38:18.717809+08:00>
2018-08-23 07:38:23 DEBUG (SyncWorker_1) [miio.device] 192.168.1.231:54321 >>: {'id': 417, 'method': 'get_model_and_state', 'params': []}
The current temperature (27.3 degree) and the target temperature (27 degree) is more or less equal. I assume if you change the target temperature to 22 degree the AC won't turn off immediately.
from xiaomi_airconditioningcompanion.
just tried with target temperature set to 17/19/20, it does not help.
from xiaomi_airconditioningcompanion.
Could you provide additional logs with updated target temperature? Thanks!
from xiaomi_airconditioningcompanion.
sure, here it is with target temperature set to 20
2018-08-23 15:28:45 DEBUG (Thread-7) [homeassistant.components.homekit.type_thermostats] climate.mi_acpartner4: Set heat-cool to 2
2018-08-23 15:28:45 DEBUG (SyncWorker_2) [miio.device] 192.168.1.231:54321 >>: {'id': 3, 'method': 'set_power', 'params': ['on']}
2018-08-23 15:28:45 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 >>: {'id': 4, 'method': 'send_cmd', 'params': ['0100002970013014A1']}
2018-08-23 15:28:46 DEBUG (SyncWorker_2) [miio.device] 192.168.1.231:54321 (ts: 1970-01-13 01:25:43, id: 3) << {'result': ['ok'], 'id': 3}
2018-08-23 15:28:46 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 (ts: 1970-01-13 01:25:44, id: 4) << {'result': ['ok'], 'id': 4}
2018-08-23 15:28:46 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Response received: ['ok']
2018-08-23 15:28:46 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Response received: ['ok']
2018-08-23 15:28:46 DEBUG (SyncWorker_9) [miio.device] 192.168.1.231:54321 >>: {'id': 5, 'method': 'get_model_and_state', 'params': []}
2018-08-23 15:28:46 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=Cool; current_temperature=26.9, min_temp=16, max_temp=30, temperature=20, target_temp_step=1, fan_mode=Auto, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=On, swing_list=['On', 'Off', 'Unknown'], ac_model=010500970000297001, load_power=2, fan_speed=Auto, led=False, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T15:28:46.840549+08:00>
2018-08-23 15:28:46 DEBUG (SyncWorker_9) [miio.device] 192.168.1.231:54321 (ts: 1970-01-13 01:25:44, id: 5) << {'result': ['010500970000297001', '01013014A100002970', '1'], 'id': 5}
2018-08-23 15:28:46 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Got new state: <AirConditioningCompanionStatus power=off, load_power=1, air_condition_model=010500970000297001, model_format=1, device_type=5,air_condition_brand=97,air_condition_remote=2970,state_format=1,air_condition_configuration=013014A1,led=False, target_temperature=20, swing_mode=SwingMode.On, fan_speed=FanSpeed.Auto, mode=OperationMode.Cool>
2018-08-23 15:28:46 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=off; current_temperature=26.9, min_temp=16, max_temp=30, temperature=20, target_temp_step=1, fan_mode=Auto, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=On, swing_list=['On', 'Off', 'Unknown'], ac_model=010500970000297001, load_power=1, fan_speed=Auto, led=False, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T15:28:46.868992+08:00>
from xiaomi_airconditioningcompanion.
I noticed if I operate in home-assistant webui, which works fine, the miio compontent only send 1 "set power" command instead of 2 "set power"&"send cmd"
below is the log when operating within webui, there is no "send_cmd" event for miio
2018-08-23 15:30:55 DEBUG (SyncWorker_2) [miio.device] 192.168.1.231:54321 >>: {'id': 8, 'method': 'set_power', 'params': ['on']}
2018-08-23 15:30:56 DEBUG (SyncWorker_2) [miio.device] 192.168.1.231:54321 (ts: 1970-01-13 01:27:53, id: 8) << {'result': ['ok'], 'id': 8}
2018-08-23 15:30:56 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Response received: ['ok']
2018-08-23 15:30:56 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 >>: {'id': 9, 'method': 'get_model_and_state', 'params': []}
2018-08-23 15:30:56 DEBUG (SyncWorker_7) [miio.device] 192.168.1.231:54321 (ts: 1970-01-13 01:27:53, id: 9) << {'result': ['010500970000297001', '0111301A0100002970', '2'], 'id': 9}
2018-08-23 15:30:56 DEBUG (MainThread) [custom_components.climate.xiaomi_miio] Got new state: <AirConditioningCompanionStatus power=on, load_power=2, air_condition_model=010500970000297001, model_format=1, device_type=5,air_condition_brand=97,air_condition_remote=2970,state_format=1,air_condition_configuration=11301A01,led=True, target_temperature=26, swing_mode=SwingMode.On, fan_speed=FanSpeed.Auto, mode=OperationMode.Cool>
2018-08-23 15:30:56 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.mi_acpartner4=Cool; current_temperature=26.9, min_temp=16, max_temp=30, temperature=26, target_temp_step=1, fan_mode=Auto, fan_list=['Low', 'Medium', 'High', 'Auto'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Auto', 'Dehumidify', 'Ventilate'], swing_mode=On, swing_list=['On', 'Off', 'Unknown'], ac_model=010500970000297001, load_power=2, fan_speed=Auto, led=True, unit_of_measurement=°C, friendly_name=书房空调, supported_features=4801 @ 2018-08-23T15:30:56.148352+08:00>
from xiaomi_airconditioningcompanion.
Hi,
I noticed this same issue, I'm on latest HA 0.83.3 with lumi.acpartner.v3 on the latest firmware. every comand sent from homekit also sends a power off command
from xiaomi_airconditioningcompanion.
I also notice the same power off issue when i try to control the AC from Home assistant
from xiaomi_airconditioningcompanion.
Could somebody provide the configuration.yaml for a simple homekit setup? I would like to reproduce the issue.
from xiaomi_airconditioningcompanion.
There is only a homekit:
for setup Homekit in my configuration.yaml.
from xiaomi_airconditioningcompanion.
same here.
Issue exists with home assistant native HomeKit .
from xiaomi_airconditioningcompanion.
same issue, automatic turn off :(
from xiaomi_airconditioningcompanion.
Just tried on the Dec. 31 version, sent 3 commands instead of 1 when change state in homekit.
from xiaomi_airconditioningcompanion.
Just tried the newest version that was updated as of 5 days ago, even within home assistant, it sends a power off command when changing the temperature.
This was previously the case with homekit, but now it affects controls from within HA. I also noticed the error below:
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/homekit/type_thermostats.py", line 250, in update_state
if isinstance(target_temp, float) and current_temp > target_temp:
TypeError: unorderable types: NoneType() > float()
from xiaomi_airconditioningcompanion.
Issue still open, even temperature changes or any form of operation from lovelace turn off the AC
from xiaomi_airconditioningcompanion.
same problem,my AC is hisence and i control AC flawlessly in MiHome App but i can't control my AC in hass
from xiaomi_airconditioningcompanion.
same problem,my AC is hisence and i control AC flawlessly in MiHome App but i can't control my AC in hass
yea, me too. My AC is Hisense. I'm now running hass 0.93.2
from xiaomi_airconditioningcompanion.
Are we still talking about Homekit here?
from xiaomi_airconditioningcompanion.
Are we still talking about Homekit here?
I believe originally the problem was only occurring in Homekit, but now any controls /commands issued from HA interface also turns off the AC
from xiaomi_airconditioningcompanion.
Could you enable the debug log again and provide some commented logs?
from xiaomi_airconditioningcompanion.
from xiaomi_airconditioningcompanion.
my ac's ip is 192.168.50.40
from xiaomi_airconditioningcompanion.
I need a log which illustrates the issue. For example: Turn the AC on, wait a few seconds and change the target temperature. The Status
object should indicate power=off
afterwards.
from xiaomi_airconditioningcompanion.
i will give it to you on tomorrow。
from xiaomi_airconditioningcompanion.
Related Issues (20)
- My home assistant can't find this add-on HOT 1
- Error in Hass OS 7.2 HOT 3
- acpartner.v3 radio/siren HOT 1
- Add KTBL12LM support
- ERROR Unable to update from sensor HOT 1
- Target temperature and fan speed set wrongly HOT 3
- dmaker.airfresh.t2017 not accessible via LAN HOT 1
- Hello, the light on the control air conditioning panel will be turned off HOT 4
- Problem adding Aqara Air Conditioning Companion (KTBL11LM) HOT 1
- Service stopped to work - HOT 5
- 添加到hacs后在集成页搜不到相应集成 HOT 1
- The cuco-acpartner-cp6_miap2063 New module
- Xiaomi Zigbee temperature & humidity sensor managed by lumi.acpartner.v2 AC companion was not added into HomeAssistant
- Platform error climate.xiaomi_miio_airconditioningcompanion - Exception importing custom_components.xiaomi_miio_airconditioningcompanion.climate HOT 22
- 小米巨省电系列空调能支持么 HOT 1
- Device support Question: May I ask why the `lumi.acpartner.mcn02` device is unsupported now?
- Integration error: cliamte - Integration 'cliamte' not found. HOT 1
- TEMP_CELSIUS was used from xiaomi_miio_airconditioningcompanion, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/syssi/xiaomi_airconditioningcompanion/issues HOT 2
- Lumi.acpartner.v2 started showing up as unavailable
- acpartner.v3 - KTBL11LM only works in the evenings.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xiaomi_airconditioningcompanion.