Yoda-x / ha-zha-new

update of the zha component
56 stars 10 forks source link

Xiaomi aqara switch WXKG12LM #63

Closed alex-v-g closed 5 years ago

alex-v-g commented 5 years ago

Hello! Bought 11.11 new smart switches Xiaomi WXKG12LM, and got them yesterday. After pairing, they appears in same way as Xiaomi smart plug, but not the binary sensor. As I understood, this is the new multi-state sensor with giro built-in. When I pairing, I see strange behavior and can see some state changes .... after rebooting - no more joy. I tried to rename lumi_sensor_switch_aq2.py to lumi_sensor_switch_aq3.py (which looks like the official name of the product). Did not help, but I believe that time I ve got battery status. Played 3 hour with template assigning, files duplicating and renaming-still nothing... Question: can it be fixed? @Yoda-x : any advice?

Thanks in advance and sorry for noob question (I still struggling to understand how zha is working)

Yoda-x commented 5 years ago

Hi

Can you provide more information. The zigbee db and debug logs would be helpful. Seems the sensor is significant different than others, even if it looks the same as the old ones.

alex-v-g commented 5 years ago

May I ask what items I should include to config for logger?

alex-v-g commented 5 years ago

@Yoda-x : I have attached required files. Please have a look. Not sure whether that info is enough. config.zip

alex-v-g commented 5 years ago

Hello! @Yoda-x : Tried to clean zigbee.db from records with that switch for the new log tracing. Copied lumi_sensor_switch_aq2.py to lumi_sensor_switch_aq3.py Here is copy of relevant rows from new log: 2018-11-25 21:08:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd] device init for 00:15:8d:00:01:eb:72:94 -> Endpoints: [0, 1] 2018-11-25 21:08:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:0] endpoint init 2018-11-25 21:08:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] endpoint init 2018-11-25 21:08:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x02bd:1:0x0000:TSN=1 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.uart] Sending: b'34612157541e150f5b904b25aa5493099d4e27aaecc9678afdc3638dfc35ae7e' 2018-11-25 21:08:06 INFO (MainThread) [homeassistant.setup] Setup of domain zha_new took 9.4 seconds. 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4461a157541e1558d5457e' 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-25 21:08:06 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-25 21:08:11 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-25 21:08:11 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'5461b1575415150f5b904b25aa5493099c4e2741eca867137a7e' 2018-11-25 21:08:11 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-25 21:08:11 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.zigbee.application] sendunicast reply timeout failure 0x02bd:1:0x0000 2018-11-25 21:08:26 DEBUG (MainThread) [custom_components.zha_new] read attribute failed: mode/manufacturer 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x02bd:1:0x0000:TSN=2 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.uart] Sending: b'46662157541e150f5b904b25aa5493099d4e27a9efcb6789fdc363c40a7e' 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'6566a157541e1559e09b7e' 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-25 21:08:26 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-25 21:08:31 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-25 21:08:31 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7566b1575415150f5b904b25aa5493099d4e2740efa86790317e' 2018-11-25 21:08:31 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-25 21:08:31 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-25 21:08:44 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-25 21:08:44 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0566b157546f15b6589e4a24ab5593499cf6d96ab2269874f8d6e089fc7e59be7e' 2018-11-25 21:08:44 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-25 21:08:44 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-25 21:08:44 DEBUG (MainThread) [zigpy.zcl] [0xe85f:1:0x000a] ZCL request 0x0000: [[0]] 2018-11-25 21:08:46 DEBUG (MainThread) [bellows.zigbee.application] sendunicast reply timeout failure 0x02bd:1:0x0000 2018-11-25 21:08:46 DEBUG (MainThread) [custom_components.zha_new] single read attribute failed: model 2018-11-25 21:08:46 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x02bd:1:0x0000:TSN=4

2018-11-25 21:09:06 DEBUG (MainThread) [bellows.zigbee.application] sendunicast reply timeout failure 0x02bd:1:0x0000 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] single read attribute failed: manufacturer, 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] discover_endpoint_info: 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] config reports skipped, already joined 00:15:8d:00:01:eb:72:94 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] 2:profile 260, component: None cluster:[set(), set()] 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd:1] Call single-cluster entity: 6 2018-11-25 21:09:06 DEBUG (MainThread) [custom_components.zha_new] [0x02bd] Exit device init 00:15:8d:00:01:eb:72:94 Screenshot from sqlite with relevant items: image

Yoda-x commented 5 years ago

what is in the devices table. I saw in you log, that the model name was cut off. Can you remove the device and pair it again.

alex-v-g commented 5 years ago

Hello. Removed zigbee.db, created new one. Paired switch.

2018-11-27 22:02:00 DEBUG (MainThread) [custom_components.zha_new] Device initialized: 00:15:8d:00:01:eb:72:94: 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'366fb1575473555ecde6a124aad88749628f2508a7918ff75a7e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:00 DEBUG (MainThread) [custom_components.zha_new] [0xec40] device init for 00:15:8d:00:01:eb:72:94 -> Endpoints: [0, 1] 2018-11-27 22:02:00 DEBUG (MainThread) [custom_components.zha_new] [0xec40:0] endpoint init 2018-11-27 22:02:00 DEBUG (MainThread) [custom_components.zha_new] [0xec40:1] endpoint init 2018-11-27 22:02:00 DEBUG (MainThread) [custom_components.zha_new] [0xec40:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0xec40:1:0x0000:TSN=4 2018-11-27 22:02:00 DEBUG (MainThread) [zigpy.application] No such device 59487 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Sending: b'646c2157541e15f2b5904b25aa5493099d4e27afe9c9678ffdc3638dfc6fb97e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'476ca157541e15f952f17e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'576cb1575473555ecde6a124aad88749628f2508a7918f850d7e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-27 22:02:00 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:00 DEBUG (MainThread) [zigpy.application] No such device 59487 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'676cb157540e555ecde6a124aad887499e4d84e109187e' 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received 2018-11-27 22:02:04 INFO (MainThread) [zigpy.application] Device 0xec40 (00:15:8d:00:01:eb:72:94) left the network 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'776cb157541515f2b5904b25aa5493099d4e27e0e9a8674df77e' 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-27 22:02:04 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'076cb1575473050ded595edb55ca6fd9628f26f405bcb77e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.application] No such device 59487 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'176cb1575473050ded595edb55ca6fd9628f26f405327a7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.application] No such device 59487 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'276cb157540e139ccde6a124aad887499d4e3714c7737e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received 2018-11-27 22:02:06 INFO (MainThread) [zigpy.application] Device 0x2e06 (00:15:8d:00:01:eb:72:94) joined the network 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.application] Device 00:15:8d:00:01:eb:72:94 changed id (0xec40 => 0x2e06) 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] Device joined: 00:15:8d:00:01:eb:72:94: 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'376cb157540e139ccde6a124aad887499d4e3714ac207e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 36 (trustCenterJoinHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] Device initialized: 00:15:8d:00:01:eb:72:94: 2018-11-27 22:02:06 INFO (MainThread) [zigpy.application] Device 0x2e06 (00:15:8d:00:01:eb:72:94) joined the network 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.application] Skip initialization for existing device 00:15:8d:00:01:eb:72:94 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] [0x2e06] device init for 00:15:8d:00:01:eb:72:94 -> Endpoints: [0, 1] 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:0] endpoint init 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] endpoint init 2018-11-27 22:02:06 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x2e06:1:0x0000:TSN=5 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'746d2157541e15b477904b25aa5493099d4e27aee8c9678efdc3638dfc4a987e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'406da157541e15e28ed27e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'506db157546f11b259874a25aa5593499c29d81aebe09874f14665a7680cd4a6eb40cb6f0ff94b887e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.zdo] [0x2e06:zdo] ZDO request 0x0013: [11782, 00:15:8d:00:01:eb:72:94, 128] 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'606db1575473139ccde6a124aad8874963fc26bb52c2487e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.application] No such device 48912 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'706db157546f15b658944a24ab5593499c26d819ebe09874dcde6383f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b140986c2317e0527e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-27 22:02:06 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0000] ZCL request 0x000a: [[<Attribute attrid=5 value=<zigpy.zcl.foundation.TypeValue object at 0x7351d5d0>>, <Attribute attrid=1 value=<zigpy.zcl.foundation.TypeValue object at 0x70282270>>]] 2018-11-27 22:02:06 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0000] Attribute report received: 5=b'lumi.sensor_switch.aq3', 1=5 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'006db1575473139ccde6a124aad88749628f25bb52918f8ebc7e' 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.ezsp] Application frame 89 (incomingRouteRecordHandler) received 2018-11-27 22:02:07 DEBUG (MainThread) [zigpy.application] No such device 59487 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'106db157546f15b658944a24ab5593499c27d86aebe09874d2da3c98fd743e58a9ebdf4e5ef4c4f3c9d6482447268864763d81eb75824198440716b0ea5128a39626bae553448a459cc6e07e' 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-11-27 22:02:07 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:07 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0000] ZCL request 0x000a: [[<Attribute attrid=65281 value=<zigpy.zcl.foundation.TypeValue object at 0x702b30b0>>]] 2018-11-27 22:02:07 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0000] Attribute report received: 65281=b'\x01!\xd1\x0b\x03(\x1c\x04!\xa8\x01\x05!\x88\x00\x06$\x01\x00\x00\x00\x00\x08!\x05\x01\n!\x10\xbf\x98!\x01\x00\x99!\x00\x00' 2018-11-27 22:02:08 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:08 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'206db15754aabcf2b581387e' 2018-11-27 22:02:08 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-11-27 22:02:08 DEBUG (MainThread) [bellows.ezsp] Application frame 128 (incomingRouteErrorHandler) received 2018-11-27 22:02:08 DEBUG (MainThread) [bellows.zigbee.application] Route Record ERROR:EmberStatus.SOURCE_ROUTE_FAILURE:60480 2018-11-27 22:02:09 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:09 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'306db15754aabcf2b5d2c67e' 2018-11-27 22:02:09 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-11-27 22:02:09 DEBUG (MainThread) [bellows.ezsp] Application frame 128 (incomingRouteErrorHandler) received 2018-11-27 22:02:09 DEBUG (MainThread) [bellows.zigbee.application] Route Record ERROR:EmberStatus.SOURCE_ROUTE_FAILURE:60480 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'406db15754aabcf2b5791d7e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.ezsp] Application frame 128 (incomingRouteErrorHandler) received 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.zigbee.application] Route Record ERROR:EmberStatus.SOURCE_ROUTE_FAILURE:60480 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'506db157541515b477904b25aa5493099d4e27fbe8ce6787867e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'606db157546f15b658944a24ab1593499c24d86aebe09874dcde6688f97e3fe5fba1ab02e6d1b4bebba106fe1950de85023fa5ea37860dcd016f159c887e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-27 22:02:11 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] discover_endpoint_info: 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] Import DH lumi.sensor_swit failed: ("No module named 'custom_components.device.lumi_sensor_swit'",) 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] pre call _custom_endpoint_init: {} 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] no call _custom_endpoint_init: lumi.sensor_swit 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] config reports skipped, already joined 00:15:8d:00:01:eb:72:94 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] 2:profile 260, component: None cluster:[set(), set()] 2018-11-27 22:02:11 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] Call single-cluster entity: 6 2018-11-27 22:02:11 INFO (MainThread) [homeassistant.loader] Loaded switch from homeassistant.components.switch 2018-11-27 22:02:11 INFO (MainThread) [homeassistant.setup] Setting up switch 2018-11-27 22:02:11 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds. 2018-11-27 22:02:12 DEBUG (MainThread) [custom_components.zha_new] [0x2e06] Exit device init 00:15:8d:00:01:eb:72:94 2018-11-27 22:02:12 INFO (MainThread) [homeassistant.loader] Loaded switch.zha_new from custom_components.switch.zha_new 2018-11-27 22:02:12 WARNING (MainThread) [homeassistant.loader] You are using a custom component for switch.zha_new which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2018-11-27 22:02:12 INFO (MainThread) [homeassistant.components.switch] Setting up switch.zha_new 2018-11-27 22:02:19 DEBUG (MainThread) [bellows.zigbee.application] sendunicast reply timeout failure 0xec40:1:0x0000 2018-11-27 22:02:19 DEBUG (MainThread) [custom_components.zha_new] read attribute failed: mode/manufacturer 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x2e06:1:0x0000:TSN=6 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.uart] Sending: b'07722157541e15b477904b25aa5493099d4e27adebcb678dfdc363a6767e' 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7172a157541e15e3226e7e' 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-27 22:02:20 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0172b157541515b477904b25aa5493099d4e27faebce67ce0b7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1172b157546f15b658944a24ab1593499c25d86aebe09874e5de6588f97e3fe5fba1ab02e6d1b4bebba106fe1950de85023d58497e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x2e06:1:0x0000:TSN=7 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Sending: b'12732157541e15b477904b25aa5493099d4e27aceacb678cfdc263b69f7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2273a157541e15e0a97d7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'3273b157546f15b658944a24ab5593499cacd96ab2269874fdc471507e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:21 DEBUG (MainThread) [bellows.zigbee.application] No such device 59487 2018-11-27 22:02:28 INFO (MainThread) [homeassistant.components.http.view] Serving /api/history/period/2018-11-26T21:02:29.008Z to 10.0.0.21 (auth: True) 2018-11-27 22:02:29 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:29 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4273b15754aa57b477127b7e' 2018-11-27 22:02:29 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-27 22:02:29 DEBUG (MainThread) [bellows.ezsp] Application frame 128 (incomingRouteErrorHandler) received 2018-11-27 22:02:29 DEBUG (MainThread) [bellows.zigbee.application] Route Record ERROR:EmberStatus.MAC_INDIRECT_TIMEOUT:11782 2018-11-27 22:02:30 INFO (MainThread) [homeassistant.components.http.view] Serving /api/history/period/2018-11-27T21:02:29.008Z to 10.0.0.21 (auth: True) 2018-11-27 22:02:30 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:30 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'5273b157546f15b658864a24ab5593499c22d969ebe09874f5de6183a97e1ea6ebcbbb8c7e' 2018-11-27 22:02:30 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-27 22:02:30 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:30 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6e771970>>]] 2018-11-27 22:02:30 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=1 2018-11-27 22:02:30 INFO (MainThread) [homeassistant.components.http.view] Serving /api/history/period/2018-11-27T21:02:31.032Z to 10.0.0.21 (auth: True) 2018-11-27 22:02:31 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:31 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'6273b157546f15b658864a24ab5593499c23d869ebe09874f5de6083a97e1eb7ebcbc5417e' 2018-11-27 22:02:31 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-27 22:02:31 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:31 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6e6c8d30>>]] 2018-11-27 22:02:31 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=16 2018-11-27 22:02:32 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:32 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7273b157546f15b658864a24ab5593499c20d969ebe09874f5de6783a97e1eb6ebcbff127e' 2018-11-27 22:02:32 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-27 22:02:32 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:32 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6e748790>>]] 2018-11-27 22:02:32 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=17 2018-11-27 22:02:32 INFO (MainThread) [homeassistant.components.http.view] Serving /api/history/period/2018-11-27T21:02:31.169Z to 10.0.0.21 (auth: True) 2018-11-27 22:02:35 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:35 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0273b157546f15b658864a24ab5593499c21d969ebe09874f5de6683a97e1ea6ebcb430e7e' 2018-11-27 22:02:35 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-27 22:02:35 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:35 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x70335350>>]] 2018-11-27 22:02:35 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=1 2018-11-27 22:02:35 DEBUG (MainThread) [bellows.zigbee.application] watchdog: running 2018-11-27 22:02:36 DEBUG (MainThread) [bellows.zigbee.application] sendunicast messagesend_ACK timeout 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] single read attribute failed: manufacturer, 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] discover_endpoint_info: 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] pre call _custom_endpoint_init: {} 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] no call _custom_endpoint_init: lumi.sensor_swit 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] config reports skipped, already joined 00:15:8d:00:01:eb:72:94 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] 2:profile 260, component: None cluster:[set(), set()] 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06:1] Call single-cluster entity: 6 2018-11-27 22:02:36 DEBUG (MainThread) [custom_components.zha_new] [0x2e06] Exit device init 00:15:8d:00:01:eb:72:94 2018-11-27 22:02:36 INFO (MainThread) [homeassistant.components.switch] Setting up switch.zha_new 2018-11-27 22:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 346, in _async_add_entity msg) homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.lumi_lumisensor_swit_01eb7294_1. Platform zha_new does not generate unique IDs 2018-11-27 22:02:38 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:38 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1273b15754aa57b4771e5c7e' 2018-11-27 22:02:38 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-11-27 22:02:38 DEBUG (MainThread) [bellows.ezsp] Application frame 128 (incomingRouteErrorHandler) received 2018-11-27 22:02:38 DEBUG (MainThread) [bellows.zigbee.application] Route Record ERROR:EmberStatus.MAC_INDIRECT_TIMEOUT:11782 2018-11-27 22:02:40 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:40 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2273b157546f15b6589e4a24ab5593499cadd969b2269874f8d61b89fc7e3d2e8b7e' 2018-11-27 22:02:40 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-11-27 22:02:40 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:40 DEBUG (MainThread) [bellows.zigbee.application] No such device 59487 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.ezsp] Send command neighborCount 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Sending: b'237021575450ea547e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'3370a1575450100ffe7e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.ezsp] Application frame 122 (neighborCount) received 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4370b157541515b477904b25aa5493099d4e27f9eace67b2997e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-27 22:02:41 WARNING (MainThread) [bellows.zigbee.application] Unexpected message send notification 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'5370b157546f15b658944a24ab1593499c3ed869ebe09874f1de6488f87e3fe5ef818b22c6f91a1d7e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-11-27 22:02:41 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:41 WARNING (MainThread) [bellows.zigbee.application] 0x2e06:1:0x0000 Unexpected response TSN=7 command=1 args=[[<ReadAttributeRecord attrid=4 status=0 value=b'LUMI'>]] 2018-11-27 22:02:41 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0000] Unexpected ZCL reply 0x0001: [[<ReadAttributeRecord attrid=4 status=0 value=b'LUMI'>]] 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0x2e06:1:0x0006:TSN=8 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.uart] Sending: b'36712157541e15b477904b23aa5493099d4e27a3e5cb6783fdc663acdc7e' 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'6471a157541e15e1afa47e' 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-11-27 22:02:43 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-11-27 22:02:43 INFO (MainThread) [homeassistant.components.http.view] Serving /states to 10.0.0.21 (auth: False) 2018-11-27 22:02:44 INFO (MainThread) [homeassistant.components.http.view] Serving /api/websocket to 10.0.0.21 (auth: False) 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7471b157541515b477904b23aa5493099d4e27f8e5ce67f5707e' 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0471b157546f15b658924a24ab1593499c3fd96aebe09874fbde6b88fc7eb9a1d1a37e' 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-11-27 22:02:44 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:53 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:53 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1471b157546f15b658864a24ab5593499c3cd86aebe09874f5de6583a97e1eb7ebcb5e0f7e' 2018-11-27 22:02:53 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-11-27 22:02:53 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:53 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6e7ba050>>]] 2018-11-27 22:02:53 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=16 2018-11-27 22:02:54 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-11-27 22:02:54 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2471b157546f15b658864a24ab5593499c3dd86aebe09874f5de6483a97e1eb6ebcbcb857e' 2018-11-27 22:02:54 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-11-27 22:02:54 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-11-27 22:02:54 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6e7b1750>>]] 2018-11-27 22:02:54 DEBUG (MainThread) [zigpy.zcl] [0x2e06:1:0x0012] Attribute report received: 85=17

image

Not sure if it helps. Name of device is somehow truncated... it is just how it comes to db

alex-v-g commented 5 years ago

@Yoda-x : Found something for Mqtt where they had similar issue. https://github.com/Koenkk/zigbee-shepherd-converters/pull/3/files Looks like clusters are different from what coming into zigbee db

Yoda-x commented 5 years ago

it seems Xiaomi build in again some non-printable characters in the model name, I have some fixes in my dev branch. I will try to get it usable for you. I hope it's ok for you to be on the bleeding edge :smile:. It runs stable for me for over 2 weeks now.

alex-v-g commented 5 years ago

Thanks. Looking forward to try it!

alex-v-g commented 5 years ago

Update: Today I updated home assistant to 0.83.2, and zha_new to the preview build. Copied ..switch_aq2 into ..switch_aq3. Copied lumi_sensor_switch.py from previous build (missing in preview build) Rebooted.

HA shows now following: { "friendly_name": "LUMI lumi.sensor_switch.aq3_on_off", "model": "lumi.sensor_switch.aq3", "manufacturer": "LUMI", "lqi": 253, "rssi": -74, "last seen": "2018-12-01T21:58:21.678944+01:00", "nwk": 38560, "path": "direct", "device_class": "opening" }

I managed to get click event, double click and use it in automation. Cannot see any activity in history ... like nothing happens...but anyway is working.. Not sure what caused correct naming reading - new HA version or preview build of ZHA_NEW... anyway mix of them gave me almost perfect result. Thanks for help and your preview build!!

Yoda-x commented 5 years ago

Interesting. You used the "preview" branch and not the "ng" branch, right? the preview is the same as master with a new logic for lights. I was preparing another branch for you to test...

You will not see state changes in history, as the switch(or remote) not changes its state. It just send events for clicks or movements.

I will check for the missing lumi_sensor_switch.py and create a new file for the aq3. If you can provide some information about the gyro, I will try to add it.

Many Thanks

alex-v-g commented 5 years ago

Used preview build, not ng. Regarding gyro: I don't know how to get required info. Should I add something specific to logger?

Yoda-x commented 5 years ago

Hi, the logging level is ok. Just check what you see in the logs moving the switch and send it over BTW., can you send me the lumi_sensor_switch.py I could not find it in the previous version and not sure what it is.

Not sure why its working now. Possible it also updated some of the dependencies.

alex-v-g commented 5 years ago

Checked what is inside lumi_sensor_switch.py - is a copy of lumi_sensor_switch_aq2.py Without that file, switch WXKG01LM (round button switch) is not working... Not sure now how I got it, maybe I just copied ...aq2.py with this name, in order to link ZHA_NEW with WXG01LM some time ago? I had to play a lot with my devices, so this could be an answer. Probably you can include this file into your build?

Info about switch itself: { "friendly_name": "LUMI lumi.sensor_switch_on_off", "model": "lumi.sensor_switch", "manufacturer": "LUMI", "lqi": 255, "rssi": -75, "last seen": null, "nwk": 30405, "path": "direct", "device_class": "opening" } Regarding motion - I will try to play with that and send logs today/tomorrow. Again - thanks for your work!

Yoda-x commented 5 years ago

ok. makes sense. I add the lumi.sensor_switch file. thats easy.

alex-v-g commented 5 years ago

Hello! Tried following: Removed zigbee.db and home-assistant_v2.db for cleaner experiment. Rebooted. Paired only that button. Got button as not sensor, but smart plug (again). Rebooted again... same story. Then done following:

  1. single click
  2. double click
  3. triple click (not sure if is in device's specs)
  4. hold, release
  5. shake
  6. rotate 90
  7. rotate 180

here is log (relevant parts) 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c] device init for 00:15:8d:00:01:eb:72:94 -> Endpoints: [0, 1] 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:0] endpoint init 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] endpoint init 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] discover_endpoint_info: 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] Import DH lumi.sensor_swit failed: ("No module named 'custom_components.device.lumi_sensor_swit'",) 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] pre call _custom_endpoint_init: {} 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] no call _custom_endpoint_init: lumi.sensor_swit 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] node config for 00:15:8d:00:01:eb:72:94-1: {} 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] config reports skipped, already joined 00:15:8d:00:01:eb:72:94 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] 2:profile 260, component: None cluster:[set(), set()] 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c:1] Call single-cluster entity: 6 2018-12-06 20:54:14 INFO (MainThread) [homeassistant.loader] Loaded switch from homeassistant.components.switch 2018-12-06 20:54:14 INFO (MainThread) [homeassistant.setup] Setting up switch 2018-12-06 20:54:14 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds. 2018-12-06 20:54:14 DEBUG (MainThread) [custom_components.zha_new] [0xcf2c] Exit device init 00:15:8d:00:01:eb:72:94

.................

2018-12-06 20:55:38 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-06 20:55:38 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6fef6bb0>>]] 2018-12-06 20:55:38 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] Attribute report received: 85=1 2018-12-06 20:55:41 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:41 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1469b157546f15b658864a24ab5593499c22d811c1019874f5de6283a97e1ea5eb2aea7e' 2018-12-06 20:55:41 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-12-06 20:55:41 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-06 20:55:41 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x6feab830>>]] 2018-12-06 20:55:41 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] Attribute report received: 85=2 2018-12-06 20:55:46 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:46 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2469b157546f15b658864a24ab5593499c23d811c1019874f5de6183a97e1eb7ebda057e' 2018-12-06 20:55:46 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-12-06 20:55:46 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-06 20:55:46 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x7009f090>>]] 2018-12-06 20:55:46 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] Attribute report received: 85=16 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.zigbee.application] sendUnicast to 0xcf2c:1:0x0006:TSN=3 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.ezsp] Send command sendUnicast 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.uart] Sending: b'436e2157541e159e96904b23aa5493099d4e27a8eecb6788fdc66360897e' 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'356ea157541e15cf5b2d7e' 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-12-06 20:55:47 DEBUG (MainThread) [bellows.ezsp] Application frame 52 (sendUnicast) received 2018-12-06 20:55:48 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:48 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'456eb157546f15b658864a24ab5593499c20d811c1019874f5de6083a97e1eb6eb70a67e' 2018-12-06 20:55:48 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-12-06 20:55:48 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-06 20:55:48 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x749d0a50>>]] 2018-12-06 20:55:48 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] Attribute report received: 85=17 2018-12-06 20:55:51 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:51 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'556eb1575415159e96904b23aa5493099d4e27d6eea8679c397e' 2018-12-06 20:55:51 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-12-06 20:55:51 DEBUG (MainThread) [bellows.ezsp] Application frame 63 (messageSentHandler) received 2018-12-06 20:55:53 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:53 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'656eb157546f15b658864a24ab5593499c21d811c1019874f5de6783a97e1eb5eb2d057e' 2018-12-06 20:55:53 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-12-06 20:55:53 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-06 20:55:53 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x72fed810>>]] 2018-12-06 20:55:53 DEBUG (MainThread) [zigpy.zcl] [0xcf2c:1:0x0012] Attribute report received: 85=18 2018-12-06 20:55:54 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-06 20:55:54 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'756eb15754aa579e9638207e'

  1. As you can see, full name AGAIN not reading correctly, at least not fully. Now I completely lost how it is working in my current zigbee.db with full name.
  2. received following commands on attribute 85: 1, 2, 16,17,18

deconz branch has following info (which almost confirms mine):

{ case 1: buttonevent = S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED; break; case 2: buttonevent = S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS; break; case 16: buttonevent = S_BUTTON_1 + S_BUTTON_ACTION_HOLD; break; case 17: buttonevent = S_BUTTON_1 + S_BUTTON_ACTION_LONG_RELEASED; break; case 18: buttonevent = S_BUTTON_1 + S_BUTTON_ACTION_SHAKE; break; default: break; }

so currently only shake is defined in sensor from all possible giro events.

My conclusion: correct name reading is not working by itself.... or maybe during pairing, zigbee managed to read just first part of name and then xiaomi button asleep and disconnected? Could be an issue? Probably last time when I successfully paired in main zigbee.db, I was lucky and received full name through zigbee???? One more interesting test... in my working version of zigbee.db, when I shake sensor, it works as a single click and toggles the light ... not sure why....

Regarding attribute 85 and states 1,2,16,17,18 ... could you please check whether it is possible to implement? Any ideas about incorrect sensor name reading? zigbee.zip

Yoda-x commented 5 years ago

Hi, please try out my ng branch with a fresh zigbee.db. I use there different ways to catch the model name. I assume the device had a lucky moment to provide the name, sometimes xiaomi also uses non ascii values. I will add the other action values, that's simple...

alex-v-g commented 5 years ago

Hello Yoda-x ! Tried ng branch and zha_new did not boot at all. Believe it is because of dependencies which did not install... not sure why. Here is the log

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 90, in init req = REQUIREMENT.parseString(requirement_string) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString raise exc File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString loc, tokens = self._parse( instring, 0 ) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl loc, exprtokens = e._parse( instring, loc, doActions ) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py", line 3205, in parseImpl raise ParseException(instring, loc, self.errmsg, self) pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 5), (line:1, col:6)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 2963, in init super(Requirement, self).init(requirement_string) File "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 94, in init requirement_string[e.loc:e.loc + 8])) pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'://githu'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/requirements.py", line 80, in loadable req = pkg_resources.Requirement.parse(package) File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 3009, in parse req, = parse_requirements(s) File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 2956, in parse_requirements yield Requirement(line) File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 2965, in init raise RequirementParseError(str(e)) pkg_resources.RequirementParseError: Invalid requirement, parse error at "'://githu'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 56, in async_setup_component return await task # type: ignore File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 125, in _async_setup_component await async_process_deps_reqs(hass, config, domain, component) File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 245, in async_process_deps_reqs hass, name, module.REQUIREMENTS) # type: ignore File "/usr/local/lib/python3.6/site-packages/homeassistant/requirements.py", line 40, in async_process_requirements if await pkg_cache.loadable(req): File "/usr/local/lib/python3.6/site-packages/homeassistant/requirements.py", line 84, in loadable req = pkg_resources.Requirement.parse(urlparse(package).fragment) File "/usr/local/lib/python3.6/site-packages/pkg_resources/init.py", line 3009, in parse req, = parse_requirements(s) ValueError: not enough values to unpack (expected 1, got 0)

Could it be because of following strings in init.py: REQUIREMENTS = [ 'https://github.com/Yoda-x/bellows/archive/master.zip#bellows==0.7.4.3', 'https://github.com/Yoda-x/zigpy/archive/ng.zip'

'https://github.com/Yoda-x/zigpy/archive/master.zip#zigpy==0.1.4-Y'

            ]

I see in DEV folder that it still loads bellows 0.7.4.1 while requirement saying 0.7.4.3

Yoda-x commented 5 years ago

sorry. please try again. I forgot to push the right requirements back to github. PS: added 16,17,18 also in ng branch

alex-v-g commented 5 years ago

Hi. Not working at all... sensor do not come into home assistant logs: 018-12-08 10:17:06 INFO (MainThread) [zigpy.application] Device 0xbac3 (00:15:8d:00:01:eb:72:94) joined the network via 0 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, table devices has no column named model 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4461b157546f11b259874a25aa5593499c4ad9682e749874f1ffa033680cd4a6eb40cb6f0ffdc7067e' 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:06 DEBUG (MainThread) [zigpy.zdo] [0xbac3:zdo] ZDO request 0x0013: [47811, 00:15:8d:00:01:eb:72:94, 128] 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'5461b157546f15b658944a24ab5593499c4bd8682e749874dcde6383f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b140986c23111e6f7e' 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:06 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:07 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:07 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'6461b157546f15b658944a24ab5593499c48d8692e749874e0de6283f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b1438c137e' 2018-12-08 10:17:07 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-12-08 10:17:07 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:07 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:08 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:08 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7461b157546f15b658944a24ab5593499c49d8682e749874d2da3c98fe743e58a9ebdf4e10f4c4f3c9d6482447268849763d81eb75834198440716b0ea51381c9626bae553448a4598f48d7e' 2018-12-08 10:17:08 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-12-08 10:17:08 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:08 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:09 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:09 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0461b157546f15b658944a24ab5593499c46d8692e749874e0de6083f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b14368947e' 2018-12-08 10:17:09 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-12-08 10:17:09 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:09 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:10 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:10 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1461b157546f15b658944a24ab5593499c47d8692e749874e0de6783f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b1430ded7e' 2018-12-08 10:17:10 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-12-08 10:17:10 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:10 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:12 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:12 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2461b157546f15b658944a24ab5593499c44d8692e749874e0de6683f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b14355b17e' 2018-12-08 10:17:12 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-12-08 10:17:12 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:12 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:13 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:13 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'3461b157546f15b658944a24ab5593499c45d8692e749874e0de6583f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b143c3337e' 2018-12-08 10:17:13 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-12-08 10:17:13 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:13 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4461b157546f15b658944a24ab5593499cffd816b2269874fd84e47e' 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.zigbee.application] No such device 59487 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Data frame SEQ(5)/ReTx(0): b'5461b157546f15b658944a24ab5593499c42d8692e749874e0de6483f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b143961b7e' 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.uart] Sending: b'8610be7e' 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:14 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.zigbee.application] watchdog: running 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.uart] Data frame SEQ(6)/ReTx(0): b'6461b157546f15b658944a24ab5593499c43d8692e749874e0de6b83f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b143e2917e' 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.uart] Sending: b'87009f7e' 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:15 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:17 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:17 DEBUG (MainThread) [bellows.uart] Data frame SEQ(7)/ReTx(0): b'7461b157546f15b658944a24ab5593499c40d8682e749874e0de6a83f97e7db187b8b306a18ca2b5a6bd1bd33554c09815538b8b04b14375a87e' 2018-12-08 10:17:17 DEBUG (MainThread) [bellows.uart] Sending: b'8070787e' 2018-12-08 10:17:17 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:17 DEBUG (MainThread) [bellows.zigbee.application] frame handler exception, 1 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.ezsp] Send command neighborCount 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.uart] add command to send queue: False-True 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.uart] Sending: b'406621575450b2737e' 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.uart] Data frame SEQ(0)/ReTx(0): b'0566a15754501170127e' 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.uart] Sending: b'8160597e' 2018-12-08 10:17:19 DEBUG (MainThread) [bellows.ezsp] Application frame 122 (neighborCount) received 2018-12-08 10:17:20 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:20 DEBUG (MainThread) [bellows.uart] Data frame SEQ(1)/ReTx(0): b'1566b157546f15b6589e4a24ab5593499cfcd915b2269874f8d6ce89fc7eec677e' 2018-12-08 10:17:20 DEBUG (MainThread) [bellows.uart] Sending: b'82503a7e' 2018-12-08 10:17:20 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:20 DEBUG (MainThread) [bellows.zigbee.application] No such device 59487 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Data frame SEQ(2)/ReTx(0): b'2566b157546f15b658964e24ab5593499c85d91426f89874f5de8983fc7e16d4e3b4c77e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Sending: b'83401b7e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.zigbee.application] No such device 14027 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Data frame SEQ(3)/ReTx(0): b'3566b157546f15b658914e24ab5593499c82d91426f89874f5de8883fc7e1ea2ff651b7e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Sending: b'8430fc7e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.zigbee.application] No such device 14027 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Status _send_task.done: False 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Data frame SEQ(4)/ReTx(0): b'4566b157546f15b658974e24ab5593499c83d91426f89874ecde8f83fc7e1661e8d9de4770efc7f211f731b87e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.uart] Sending: b'8520dd7e' 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received 2018-12-08 10:17:23 DEBUG (MainThread) [bellows.zigbee.application] No such device 14027

zigbee.zip

Yoda-x commented 5 years ago

do you deleted the zigbee.db after the update? the format changed. Im working on a migrate patch to add the new columns on the fly, but before its ready, it is better to remove the db and start from scratch.

alex-v-g commented 5 years ago

Zigbee.db was removed prior to test. Not sure what causes the problem.

On Sun, Dec 9, 2018, 14:51 Yoda-x <notifications@github.com wrote:

do you deleted the zigbee.db after the update? the format changed. Im working on a migrate patch to add the new columns on the fly, but before its ready, it is better to remove the db and start from scratch.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yoda-x/ha-zha-new/issues/63#issuecomment-445540040, or mute the thread https://github.com/notifications/unsubscribe-auth/AqjdLiphG94Uuap0svxw0SaCfDF3oBH5ks5u3RV5gaJpZM4YuuXc .

alex-v-g commented 5 years ago

Hi! Did one more try. This time more success... I managed to pair and got events. Unfortunately more troubles:

  1. switch still comes with truncated name. I had to copy lumi_sensor_switch_aq3.py to lumi_sensor_swit.py After that happened something new: After reboot, zha_new was not accessible log: +++++++++++++++++++++++++++++++++++++++++++++++ Error during setup of component zha_new Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 145, in _async_setup_component hass, processed_config) File "/config/custom_components/zha_new/init.py", line 255, in async_setup APPLICATIONCONTROLLER = ControllerApplication(ezsp, database) File "/config/deps/lib/python3.6/site-packages/bellows/zigbee/application.py", line 20, in init super().init(database_file=database_file) File "/config/deps/lib/python3.6/site-packages/zigpy/application.py", line 26, in init self._dblistener.load() File "/config/deps/lib/python3.6/site-packages/zigpy/appdb.py", line 244, in load result = self._cursor.fetchone()['value'] TypeError: 'NoneType' object is not subscriptable

+++++++++++++++++++++++++++++++++++++++++++++++

  1. I had to delete zigbee.db and reboot again. Success - now switch working.
  2. Paired switch lumi_sensor_switch but forgot that this py file is not coming in your devices folder .Had to copy lumi_sensor_switch_aq2.py to lumi_sensor_switch.py rebooted ZHA_new again not booting. my diagnose: adding new devices into \HASSIO\config\custom_components\device after zigbee.db is created, brings troubles. Alternatively what could cause error - adding of new xxxx device.py after device itself has been paired.

Hope that my test will help you to make zha_new even better.

Yoda-x commented 5 years ago

Thanks for your feeedback. I try to find all the errors I build in. Please stay tuned, I made some changes in the last week, but want to try them first on "home systems". It needs also a recent version of hass. I think the best way is to have also a "truncated" version as device file.

Yoda-x commented 5 years ago

can you send over your zigbee.db? and how you pair the switch? Do you press a button every few seconds to keep it alive? I need to catch this exception. It not showed up during my testing, Good to have a 2nd system for testing. Thanks

alex-v-g commented 5 years ago

On this switch pairing happens easier than on others. Long pressing PAIR makes LED constantly flashing until you depress button. But your question gave me idea. Now I paired by long pressing until LED is flashing only 2 times, then depress, then re press pair every 2 seconds. This time it gave better result. Name is not truncated. So maybe long pressing PAIR gives wrong effect? zigbee.db attached zigbee.zip

Yoda-x commented 5 years ago

I don't know exactly your switch, but in my experience with xiaomi sensor. the pairing starts when you depress the button, sometimes the device flashes 3 times and you know its ready for paring, or it continous flashs and it's ready. When you depress the actual pairing process starts. As it's a battery driven device it just actively joins the network and then polls its parent (router or controller) if it has a message or goes sleeping. pressing the button every few secs forces the device to keep polling and check if the controller send a packet. Some of them don't need this triggering and pair without problems, some of them needs some extra love.

As this xiaomi sensors are designed to work with the xiaomi controller (only) they are not 100% zigbee compliant.

But if they are once paired they work really good and are really cheap.

alex-v-g commented 5 years ago

Good explanation about pairing! Maybe that was a reason. This is a first sensor where flashing continues until you release pair button. Anyway found new problem with my temperature/pressure/humidity sensor made by Xiaomi(WSDCGQ11LM). After I made test with your new NG build, I ve returned back to original build using snapshot made prior to test. Everything was OK except temp/pres/hum sensor. All parameters are like frozen on the last state before upgrading Hassio. Tested in time - 10 hrs testing still no new data from sensor. Workaround - to pair again. Don't know what happens...previously this was most reliable sensor with minimum problems :) Hope to migrate to your new build when you finish testing.

Yoda-x commented 5 years ago

One of the 'new' features is the persistence of states. It loads the old state when you do a restart. Not sure what happened to the temp/pres/hum sensor. but I have also this sensor and will do reload to see if it comes back. If I understand you correctly, you made copy of your .homeassistant directory, started from scatch for testing, and afterwards you copied all the old files back. Correct?

alex-v-g commented 5 years ago

Not exactly. My testing is usually: remove "custom components", "dev" directories, zigbee.db. After this I copy your files from github over to my directory, testing. After that I restore hassio from snapshot, which I made before testing. I believe that this just clear everything and restore files in their versions on the snapshot moment. Since I am still new to hassio, maybe my method is not correct?

Yoda-x commented 5 years ago

closing ticket, new master release online. IF you have problems please open a new ticket