AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.42k stars 340 forks source link

Gateway integration fails if curtains in state hander_stop #139

Closed gigazet closed 3 years ago

gigazet commented 3 years ago

Integration stops discovering any devices if Curtains in certain state:

According to logs:

2020-12-11 14:17:04  DEBUG    gateway3      10.10.3.106 | Prepare Gateway
2020-12-11 14:17:04  DEBUG    main          Loaded from MiCloud 97 devices
2020-12-11 14:17:04  DEBUG    gateway3      10.10.3.106 | Version: 1.4.5_0012
2020-12-11 14:17:05  DEBUG    gateway3      10.10.3.106 | Get devices
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d00010a9b29 lumi.sensor_switch.v2 retain: {'CCA': 1, 'battery': 70, 'battery_end_of_life': 0, 'chip_temperature': 96, 'cur_state': 3, 'lqi': 0, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 160, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'voltage': 3022}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d00010aaba3 lumi.sensor_motion.v2 retain: {'CCA': 1, 'battery': 72, 'battery_end_of_life': 0, 'chip_temperature': 97, 'cur_state': 3, 'fw_ver': 0, 'hw_ver': 0, 'illumination': 0, 'lqi': 0, 'lux': 0, 'no_motion_sec': 120, 'parent': 0, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'report_period': 60, 'reset_cnt': 16, 'send_all_cnt': 2, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'voltage': 3035}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d000110a858 lumi.sensor_magnet.v2 retain: {'CCA': 1, 'battery': 64, 'battery_end_of_life': 0, 'chip_temperature': 92, 'cur_state': 3, 'lqi': 0, 'no_close_sec': 60, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 48, 'send_all_cnt': 7, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'status': 'close', 'voltage': 2985}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d0001179a86 lumi.sensor_magnet.v2 retain: {'CCA': 1, 'battery': 72, 'battery_end_of_life': 0, 'chip_temperature': 108, 'cur_state': 3, 'lqi': 0, 'no_close_sec': 60, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 52, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'status': 'close', 'voltage': 3035}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d0001190a3f lumi.sensor_ht.v1 retain: {'CCA': 1, 'battery': 95, 'battery_end_of_life': 0, 'chip_temperature': 0, 'cur_state': 3, 'humidity': 7959, 'lqi': 0, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 21984, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'temperature': 2204, 'voltage': 2975}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d000128ec03 lumi.remote.b286acn01 retain: {'CCA': 1, 'battery': 95, 'chip_temperature': 20, 'cur_state': 3, 'lqi': 0, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 66, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'voltage': 3055}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d00012a7d04 lumi.remote.b286acn01 retain: {'CCA': 1, 'battery': 95, 'chip_temperature': 23, 'cur_state': 3, 'lqi': 0, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 89, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'voltage': 3045}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d00012aa429 lumi.sensor_magnet.v2 retain: {'CCA': 1, 'battery': 59, 'battery_end_of_life': 0, 'chip_temperature': 119, 'cur_state': 3, 'lqi': 0, 'no_close_sec': 60, 'power_tx': 10, 'pre_state': 1, 'pv_state': 0, 'reset_cnt': 120, 'send_all_cnt': 1, 'send_fail_cnt': 0, 'send_retry_cnt': 0, 'status': 'open', 'voltage': 2955}
2020-12-11 14:17:07  DEBUG    gateway3      10.10.3.106 | lumi.158d00012d819f lumi.curtain.v1 retain: {'CCA': 0, 'battery': 95, 'cfg_param': '0', 'chip_temperature': 30, 'curtain_level': 100, 'factory_code': '0', 'fw_ver': 32, 'hw_ver': 17, 'manual_enabled': 0, 'polarity': 0, 'pos_limit': 0, 'power_mode': 3, 'power_tx': 0, 'reset_cnt': 57, 'run_state': 'hander_stop', 'run_time': 0, 'state': 'on', 'target_level': -1, 'toggle_device': 'open'}
2020-12-11 14:17:07  DEBUG    gateway3      Can't read devices: 'hander_stop' is not in list
AlexxIT commented 3 years ago

Check latest master version

gigazet commented 3 years ago

Looks like it's fine now, thanks!

AlexxIT commented 3 years ago

Some curtain has run_state = hander_stop, some hinder_stop

AlexxIT commented 3 years ago

Fixed in latest versions