dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.88k stars 485 forks source link

Xiaomi Door/Window sensor wont pair #683

Closed Cavemanz closed 5 years ago

Cavemanz commented 6 years ago

Ive managed to pair 8 Xiaomi Aqara Door/Window sensors. Ive added 3 Philips Hue White Ambiance lights to work as repeaters since Im past the 10 device limit. However, this last open/close sensor wont pair no matter what I do. In the Docker logs I get these whenever I move the magnet back and forth, so it almost seems as if its somehow halfway paired. However, it doesnt show up under sensors. Any suggestions?

22:21:55:372 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:55:692 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:55:804 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:56:156 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:56:252 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:56:588 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:56:716 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 22:21:57:004 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01,

manup commented 6 years ago

Looks like communication is working but the required attributes aren't known so that the REST sensor resource is not created.

Can you please provide a debug log while pairing the sensor?

$ deCONZ --http-port=80 --dbg-info=1 --dbg-aps=2 --dbg-zcl=1

Cavemanz commented 6 years ago

How do I run this command when I run DeCONZ as a Docker? I use Portainer to access the docker logs and I can see this when I try to pair it:

14:12:59:897 0x00158D000205B88B extract Xiaomi special, 14:12:59:897 01 battery 3055 (0x0BEF), 14:12:59:897 03 temperature 31 °C, 14:12:59:897 04 unknown 424 (0x01A8), 14:12:59:897 05 unknown 82 (0x0052), 14:12:59:897 06 unknown 4294967296 (0x0000000100000000), 14:12:59:897 64 on/off 0, 14:13:00:612 [2] get active endpoints for 0x00158d000205b88b, 14:13:06:033 delay sending request 94 dt 0 ms to 0x0017880103B2ACE6, cluster 0x0008, 14:13:06:075 verified group capacity: 24 and group count: 1 of LightNode 0x0017880103b2ace6, 14:13:06:075 0x0017880103b2ace6 found group 0x0002

manup commented 6 years ago

I've no experience with docker, maybe there is a start command for deCONZ in the Dockerfile which should be adjusted?

DeltaAngle commented 6 years ago

@Cavemanz On your Docker host, run docker ps to find the container ID of your Deconz container. Then run docker exec -it [container id] to initiate a terminal connected to the container.

Cavemanz commented 6 years ago

Yeah, there are parameters on the docker-compose file I can change, will test that now: environment:

Cavemanz commented 6 years ago

17:29:39:438 APS-DATA.request id: 247 erase from queue, 17:29:39:438 ZCL got data for node=0xEBC2, cl=0x0006, at=0x0000, status=0x00, type=0x10, 17:29:40:606 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0000, cluster: 0x0013, lqi: 239, rssi: -61, 17:29:40:606 asdu: 2c537c8bb80502008d150080, 17:29:40:606 device announce 0x00158D000205B88B (0x7C53) mac capabilities 0x80, 17:29:40:606 set fast probe address to 0x00158D000205B88B (0x7C53), 17:29:40:606 device announce 0x00158D000205B88B (0x7C53) mac capabilities 0x80, 17:29:40:606 set fast probe address to 0x00158D000205B88B (0x7C53), 17:29:40:606 0xBFA4 nwk changed to 0x7C53, 17:29:40:718 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0000, lqi: 231, rssi: -62, 17:29:40:718 asdu: 18000a050042166c756d692e73656e736f725f6d61676e65742e61713201002003, 17:29:40:718 ZCL attribute report 0x00158D000205B88B for cluster 0x0000, ep 0x01, 17:29:40:718 0x00158D000205B88B skip Xiaomi attribute 0x0005, 17:29:40:926 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0000, lqi: 239, rssi: -61, 17:29:40:926 asdu: 1c5f11010a01ff421d0121e50b0328200421a80105215200062401000000000a21f3d5641000, 17:29:40:926 ZCL attribute report 0x00158D000205B88B for cluster 0x0000, ep 0x01, 17:29:40:926 0x00158D000205B88B extract Xiaomi special, 17:29:40:927 01 battery 3045 (0x0BE5), 17:29:40:927 03 temperature 32 °C, 17:29:40:927 04 unknown 424 (0x01A8), 17:29:40:927 05 unknown 82 (0x0052), 17:29:40:927 06 unknown 4294967296 (0x0000000100000000), 17:29:40:927 64 on/off 0, 17:29:41:657 [2] get active endpoints for 0x00158d000205b88b, 17:29:41:657 APS-DATA.request id: 8, addrmode: 0x02, addr: 0x7c53, profile: 0x0000, cluster: 0x0005, ep: 0x00 queue: 0 len: 3, 17:29:41:726 APS-DATA.confirm id: 8, status: 0x00 SUCCESS, 17:29:41:726 APS-DATA.confirm request id: 8 -> confirmed, timeout 3599920, 17:29:46:271 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0000, cluster: 0x8005, lqi: 247, rssi: -60, 17:29:46:271 asdu: 5f00537c0101, 17:29:46:272 APS-DATA.indication request id: 8 -> finished, 17:29:46:272 APS-DATA.request id: 8 erase from queue, 17:29:47:233 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0, 17:29:50:233 poll node 00:17:88:01:03:b2:ac:e6-0b, 17:29:50:332 APS-DATA.request id: 45, addrmode: 0x03, addr: 0x0017880103b2ace6, profile: 0x0104, cluster: 0x0006, ep: 0x0B queue: 0 len: 5, 17:29:50:400 APS-DATA.confirm id: 45, status: 0x00 SUCCESS, 17:29:50:400 APS-DATA.confirm request id: 45 -> erase from queue, 17:29:50:405 aps request id: 45 finished, erase from queue, 17:29:50:432 APS-DATA.indication srcAddr: 0x0017880103b2ace6, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 247, rssi: -60, 17:29:50:432 asdu: 1860010000001000, 17:29:50:433 ZCL got data for node=0x2A08, cl=0x0006, at=0x0000, status=0x00, type=0x10, 17:29:53:205 APS-DATA.request id: 59, addrmode: 0x02, addr: 0x2a08, profile: 0x0000, cluster: 0x0031, ep: 0x00 queue: 0 len: 2, 17:29:53:265 APS-DATA.confirm id: 59, status: 0x00 SUCCESS, 17:29:53:265 APS-DATA.confirm request id: 59 -> confirmed, timeout 59920, 17:29:53:313 APS-DATA.indication srcAddr: 0x0017880103b2ace6, dstAddrMode: 2, profile: 0x0000, cluster: 0x8031, lqi: 255, rssi: -59, 17:29:53:313 asdu: 9e00050002ca2f02ffff2e210067f417010188170003eb35010200ca2f02ffff2e2100ca2f02ffff2e210000003501010c, 17:29:53:313 APS-DATA.indication request id: 59 -> finished, 17:29:53:313 APS-DATA.request id: 59 erase from queue, 17:29:57:186 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 183, rssi: -68, 17:29:57:186 asdu: 18020a00001001, 17:29:57:186 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:29:57:233 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0, 17:29:58:233 poll node 00:17:88:01:03:16:81:f7-0b, 17:29:58:333 APS-DATA.request id: 85, addrmode: 0x03, addr: 0x00178801031681f7, profile: 0x0104, cluster: 0x0006, ep: 0x0B queue: 0 len: 5, 17:29:58:402 APS-DATA.confirm id: 85, status: 0x00 SUCCESS, 17:29:58:402 APS-DATA.confirm request id: 85 -> erase from queue, 17:29:58:405 aps request id: 85 finished, erase from queue, 17:29:58:434 APS-DATA.indication srcAddr: 0x00178801031681f7, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 167, rssi: -70, 17:29:58:434 asdu: 1861010000001000, 17:29:58:435 ZCL got data for node=0xD5F3, cl=0x0006, at=0x0000, status=0x00, type=0x10, 17:29:58:485 APS-DATA.request id: 89, addrmode: 0x02, addr: 0x2a08, profile: 0x0000, cluster: 0x0031, ep: 0x00 queue: 0 len: 2, 17:29:58:546 APS-DATA.confirm id: 89, status: 0x00 SUCCESS, 17:29:58:546 APS-DATA.confirm request id: 89 -> confirmed, timeout 59920, 17:29:58:594 APS-DATA.indication srcAddr: 0x0017880103b2ace6, dstAddrMode: 2, profile: 0x0000, cluster: 0x8031, lqi: 167, rssi: -70, 17:29:58:594 asdu: a000050202ca2f02ffff2e2100bdf1d40301881700c2eb3501018fca2f02ffff2e2100f781160301881700f3d5350101bf, 17:29:58:595 APS-DATA.indication request id: 89 -> finished, 17:29:58:595 APS-DATA.request id: 89 erase from queue, 17:30:00:483 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 191, rssi: -67, 17:30:00:483 asdu: 18030a00001000, 17:30:00:483 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:00:579 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0000, lqi: 191, rssi: -67, 17:30:00:579 asdu: 1c5f11040a01ff42090421a8010a21f3d5, 17:30:00:579 ZCL attribute report 0x00158D000205B88B for cluster 0x0000, ep 0x01, 17:30:00:579 0x00158D000205B88B extract Xiaomi special, 17:30:00:579 04 unknown 424 (0x01A8), 17:30:02:233 poll node 00:17:88:01:03:d4:f1:bd-0b, 17:30:02:333 APS-DATA.request id: 112, addrmode: 0x03, addr: 0x0017880103d4f1bd, profile: 0x0104, cluster: 0x0006, ep: 0x0B queue: 0 len: 5, 17:30:02:419 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 183, rssi: -68, 17:30:02:419 asdu: 18050a00001001, 17:30:02:420 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:02:435 APS-DATA.confirm id: 112, status: 0x00 SUCCESS, 17:30:02:435 APS-DATA.confirm request id: 112 -> erase from queue, 17:30:02:467 APS-DATA.indication srcAddr: 0x0017880103d4f1bd, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 215, rssi: -64, 17:30:02:467 asdu: 1862010000001000, 17:30:02:468 APS-DATA.request id: 112 erase from queue, 17:30:02:468 ZCL got data for node=0xEBC2, cl=0x0006, at=0x0000, status=0x00, type=0x10, 17:30:03:765 APS-DATA.request id: 123, addrmode: 0x02, addr: 0x2a08, profile: 0x0000, cluster: 0x0031, ep: 0x00 queue: 0 len: 2, 17:30:03:828 APS-DATA.confirm id: 123, status: 0x00 SUCCESS, 17:30:03:828 APS-DATA.confirm request id: 123 -> confirmed, timeout 59920, 17:30:03:876 APS-DATA.indication srcAddr: 0x0017880103b2ace6, dstAddrMode: 2, profile: 0x0000, cluster: 0x8031, lqi: 143, rssi: -73, 17:30:03:876 asdu: a300050401ca2f02ffff2e2100cb960402008d1500dc61120003aa, 17:30:03:876 APS-DATA.indication request id: 123 -> finished, 17:30:03:876 APS-DATA.request id: 123 erase from queue, 17:30:04:564 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 191, rssi: -67, 17:30:04:564 asdu: 18060a00001000, 17:30:04:564 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:07:233 Daylight now: solarNoon, status: 170, daylight: 1, dark: 0, 17:30:07:781 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 183, rssi: -68, 17:30:07:781 asdu: 18070a00001001, 17:30:07:781 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:08:233 poll node 00:17:88:01:03:b2:ac:e6-0b, 17:30:08:333 APS-DATA.request id: 147, addrmode: 0x03, addr: 0x0017880103b2ace6, profile: 0x0104, cluster: 0x0006, ep: 0x0B queue: 0 len: 5, 17:30:08:405 APS-DATA.confirm id: 147, status: 0x00 SUCCESS, 17:30:08:405 APS-DATA.confirm request id: 147 -> erase from queue, 17:30:08:405 aps request id: 147 finished, erase from queue, 17:30:08:453 APS-DATA.indication srcAddr: 0x0017880103b2ace6, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 159, rssi: -71, 17:30:08:453 asdu: 1863010000001000, 17:30:08:453 ZCL got data for node=0x2A08, cl=0x0006, at=0x0000, status=0x00, type=0x10, 17:30:08:933 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 191, rssi: -67, 17:30:08:933 asdu: 18080a00001000, 17:30:08:933 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:09:989 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 167, rssi: -70, 17:30:09:989 asdu: 18090a00001001, 17:30:09:989 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:10:389 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 175, rssi: -69, 17:30:10:389 asdu: 180a0a00001000, 17:30:10:389 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:10:469 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0000, lqi: 175, rssi: -69, 17:30:10:469 asdu: 1c5f110b0a01ff42090421a8010a21f3d5, 17:30:10:469 ZCL attribute report 0x00158D000205B88B for cluster 0x0000, ep 0x01, 17:30:10:470 0x00158D000205B88B extract Xiaomi special, 17:30:10:470 04 unknown 424 (0x01A8), 17:30:10:693 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 167, rssi: -70, 17:30:10:693 asdu: 180c0a00001001, 17:30:10:694 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:11:109 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 175, rssi: -69, 17:30:11:109 asdu: 180d0a00001000, 17:30:11:110 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:11:349 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 151, rssi: -72, 17:30:11:349 asdu: 180e0a00001001, 17:30:11:350 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:11:533 sensor 12 (lumi.sensor_motion.aq2): disable presence, 17:30:11:534 Websocket 192.168.1.96:38694 send message: {"e":"changed","id":"12","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:11","presence":false},"t":"event"} (ret = 114), 17:30:11:535 Websocket 192.168.1.93:60305 send message: {"e":"changed","id":"12","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:11","presence":false},"t":"event"} (ret = 114), 17:30:11:536 discard sensor state push for 12: state/lastupdated (already pushed), 17:30:11:718 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 175, rssi: -69, 17:30:11:718 asdu: 180f0a00001000, 17:30:11:718 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:11:974 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 167, rssi: -70, 17:30:11:974 asdu: 18100a00001001, 17:30:11:974 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:12:374 APS-DATA.indication srcAddr: 0x00158d000205b88b, dstAddrMode: 2, profile: 0x0104, cluster: 0x0006, lqi: 175, rssi: -69, 17:30:12:374 asdu: 18110a00001000, 17:30:12:374 ZCL attribute report 0x00158D000205B88B for cluster 0x0006, ep 0x01, 17:30:14:406 APS-DATA.indication srcAddr: 0x00158d0002374de2, dstAddrMode: 2, profile: 0x0104, cluster: 0x0402, lqi: 247, rssi: -60, 17:30:14:406 asdu: 18ba0a000029a601, 17:30:14:406 no button map for: lumi.weather cl: 0x0402 cmd: 0x0A pl[0]: 000, 17:30:14:407 ZCL attribute report 0x00158D0002374DE2 for cluster 0x0402, ep 0x01, 17:30:14:409 Websocket 192.168.1.96:38694 send message: {"e":"changed","id":"19","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:14","temperature":422},"t":"event"} (ret = 115), 17:30:14:409 Websocket 192.168.1.93:60305 send message: {"e":"changed","id":"19","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:14","temperature":422},"t":"event"} (ret = 115), 17:30:14:410 discard sensor state push for 19: state/lastupdated (already pushed), 17:30:14:486 APS-DATA.indication srcAddr: 0x00158d0002374de2, dstAddrMode: 2, profile: 0x0104, cluster: 0x0405, lqi: 247, rssi: -60, 17:30:14:486 asdu: 18bb0a0000210f1b, 17:30:14:487 no button map for: lumi.weather cl: 0x0405 cmd: 0x0A pl[0]: 000, 17:30:14:487 ZCL attribute report 0x00158D0002374DE2 for cluster 0x0405, ep 0x01, 17:30:14:489 Websocket 192.168.1.96:38694 send message: {"e":"changed","id":"20","r":"sensors","state":{"humidity":6927,"lastupdated":"2018-07-10T17:30:14"},"t":"event"} (ret = 113), 17:30:14:491 Websocket 192.168.1.93:60305 send message: {"e":"changed","id":"20","r":"sensors","state":{"humidity":6927,"lastupdated":"2018-07-10T17:30:14"},"t":"event"} (ret = 113), 17:30:14:493 discard sensor state push for 20: state/lastupdated (already pushed), 17:30:14:582 APS-DATA.indication srcAddr: 0x00158d0002374de2, dstAddrMode: 2, profile: 0x0104, cluster: 0x0403, lqi: 247, rssi: -60, 17:30:14:582 asdu: 18bc0a000029f803140028ff100029b327, 17:30:14:583 no button map for: lumi.weather cl: 0x0403 cmd: 0x0A pl[0]: 000, 17:30:14:583 ZCL attribute report 0x00158D0002374DE2 for cluster 0x0403, ep 0x01, 17:30:14:585 Websocket 192.168.1.96:38694 send message: {"e":"changed","id":"21","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:14","pressure":1016},"t":"event"} (ret = 113), 17:30:14:585 Websocket 192.168.1.93:60305 send message: {"e":"changed","id":"21","r":"sensors","state":{"lastupdated":"2018-07-10T17:30:14","pressure":1016},"t":"event"} (ret = 113), 17:30:14:586 discard sensor state push for 21: state/lastupdated (already pushed),

Cavemanz commented 6 years ago

Got 3 more Door/Window Xiaomi Aqara sensors today. All paired without problems. is there some way I can exclude the one thats not working so I can try pairing it from scratch?

ebaauw commented 6 years ago

From scratch:

  1. Hold the reset button for 10 seconds to reset the sensor;
  2. Delete the sensor resource through the REST API;
  3. Delete the Node from the GUI (select it and press DEL);
  4. Stop deCONZ and physically delete the record from the database

Might be enough to just do step 1 though.

Make sure to move the magnet while pairing (to keep the sensor awake) and manually read the attributes from the Basic cluster while the network is still open. deCONZ needs to read the Model identifier or it won’t create the sensor resource.

Cavemanz commented 6 years ago

Thanks, from what I can see, the sensor doesnt show in the REST API, nor the GUI. Tried both Phoscon and PWA. Ive held the reset button for 10 secs several times already.

What do you mean by manually reading the attributes though? Im just following the docker logs to see whats happening when pairing. I dont have a GUI like Ive seen some posts of, I assume thats the Windows version..

ebaauw commented 6 years ago

Phoscon and the old web app are using the REST API to communicate with deCONZ, so they won’t show devices thta haven’t been exposed. The GUI is windows or X11 application that’s part of the deCONZ core. It is available on all operating systems, but you need to start deconz-gui service instead of the plain deconz service. I don’t know how that’s done in Docker, or if your container includes the graphical environment at all.

Cavemanz commented 6 years ago

I assume the DB aint stored on the ConBee itself? If Id move it to a Windows machine temporarily it wouldnt show there? Ill check to see if theres any GUI options.

Cavemanz commented 6 years ago

No GUI available in Docker as far as I can see. I get these too when I try to pair:

18:39:02:818 0x00158D000205B88B extract Xiaomi special, 18:39:02:818 04 unknown 424 (0x01A8)

ebaauw commented 6 years ago

I assume the DB aint stored on the ConBee itself?

The database is managed by the REST API plugin. It's stored in ~/.local/share/dresden-elektronik/deCONZ/zll.db. You can use any sqlite3 tool to access it. I use sqlitebrowser. Make sure to stop deCONZ before updating the database.

I get these too when I try to pair

So the sensor has joined the ZigBee network, but the REST API plugin hasn't created the sensor resource, presumably because the Model Identifier hasn't been read.

If Id move it to a Windows machine temporarily it wouldnt show there?

You could try exporting and importing the configuration between the installations (under Advanced Settings in the old web app).

Ill check to see if theres any GUI options.

Alternatively, you could try and insert the resource manually into the database (make a backup first!). Copy the row for one of your existing sensors in the sensors table, make sure to use a different sensor id in sid and update the correct MAC-address in uniqueid. Not sure I would recommend this - it's really in the "don't try this at home" category.

Cavemanz commented 6 years ago

Ok, the uniqueid of one of my other open/close sensors is: 00:15:8d:00:02:05:b4:ec-01-0006

and the mac of the missing sensor is: 00:15:8d:00:02:05:b8:8b

Do I add random numbers like this? 00:15:8d:00:02:05:b8:8b-01-0007

Cavemanz commented 6 years ago

Awesome! I added it like this and now its showing up as it should :) 00:15:8d:00:02:05:b8:8b-01-0006

Thanks alot for the help!

ebaauw commented 6 years ago

Cool. The uniqueid is comprised of the mac address, endpoint, cluster. No random numbers, so don’t change the numbers after the first dash.

tomfritz1 commented 6 years ago

Dear @ebaauw how to I integrate xiaomi door/windows sensor into sensor control in Phoscon - I can only see/manage my motion sensors there?

ebaauw commented 6 years ago

I have no idea; I don’t use Phoscon.

dxxxm commented 6 years ago

Phoscon GUI does cover "xiaomi door/windows sensor". Pairing worked out of the box. No trickery required. Straight. see OpenClose in ss below. screenshot_2018-07-15 phoscon app

tomfritz1 commented 6 years ago

Thats correct @dxxxm but the door/windows sensor does not appear in sensor control of a group - thats where you can trigger rules 97a616eb-2385-4a8a-9eb9-b69083febc25

dxxxm commented 6 years ago

Ah. I see ... The description when creating a new rule via "Add Rule" hints "motion and brightness" only (?) "Create automatic light controls with motion and brightness sensors."

tomfritz1 commented 6 years ago

I migrated to Homebridge - now everything works as it should - now I can control Aqara Switch even with windows/door sensor. Amazing tool!

wrenchse commented 5 years ago

@ebaauw I had the similar issue of a single contact sensor refusing to pair and had been trying for hours. Though running on HassIO, I managed to connect to the GUI using xpra, and after deleting the node for the sensor, it paired instantly in Phoscon. Thanks a lot for the suggestion!

pippyn commented 5 years ago

@ebaauw I have the same problem. How do you connect using xpra in HassIO? I have HassIO running and the doorsensor won't pair in Phoscon. Could you please explain? Thanks

ebaauw commented 5 years ago

I have no clue. I'm not running HassIO.

pippyn commented 5 years ago

@ebaauw I'm sorry! The message was meant for @wrenchse.

wrenchse commented 5 years ago

@pippyn Hi! So first of all I am not using the marthoc addon, since that was not available at the time of my Deconz install. The one I am using is.. actually it does not say since the guy did not appear to have provided proper addon info. You will find it if you google deconz and hassio, I have commented on that thread also. edit: found it - https://github.com/neffs/hassio-addons edit2: You might need to migrate to this addon for it to work, which might be a bummer. Make sure that you both take a hassio snapshot, as well as exporting a backup from within phoscon before trying to do that.

In the config of that addon there is a flag "xpra: false" by default. Changing that to true will allow you to connect to the software via xpra. On your computer you must first install it https://xpra.org/

Then in terminal type: xpra attach tcp/hassio.local:8236

Port being whatever you decided for Deconz. This will open a window where you can see the Deconz software, much like a VNC window. Once in I saw a bunch of nodes, where one was not connected to anything particular. By opening and closing the sensor I could see that node react. So I just deleted it, and when trying to pair again it worked instantly.

Good luck!

pippyn commented 5 years ago

@wrenchse Thank you, It worked for me too.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.