home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.89k stars 30.12k forks source link

Homekit Controller - Lutron RadioRa3 controller - Incorrect Homekit Code #68723

Closed chrisdrackett closed 2 years ago

chrisdrackett commented 2 years ago

The problem

I'm trying to pair a RadioRa3 processor with HomeKit Controller, but it keeps failing at the "enter code" stage with "Incorrect HomeKit code. Please check it and try again.".

I'm guessing this is similar to this issue: https://github.com/home-assistant/core/issues/56802#

What version of Home Assistant Core has the issue?

2022.3.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Homekit Controller

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit_controller

Diagnostics information

2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Cover B2CD07 (Cover - 80:3F:FA:B2:CD:07)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 80:3F:FA:B2:CD:07 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Front Door 752272 (Front Door - B8:A9:5D:75:22:72)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device B8:A9:5D:75:22:72 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Etc B48040 (Etc - EF:D1:7F:B4:80:40)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device EF:D1:7F:B4:80:40 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Carport 6FCFA4 (Carport - 9C:74:E7:6F:CF:A4)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 9C:74:E7:6F:CF:A4 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Chicken Coop 2979BC (Chicken Coop - 4E:40:C2:29:79:BC)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 4E:40:C2:29:79:BC ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Pool B63CFB (Pool - 23:E2:BE:B6:3C:FB)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 23:E2:BE:B6:3C:FB ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Living Room E99DFB (Living Room - 56:1F:C9:E9:9D:FB)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 56:1F:C9:E9:9D:FB ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Switches 863581 (Switches - 6B:F7:48:86:35:81)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 6B:F7:48:86:35:81 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Lights 5D6C7C (Lights - 95:B5:C4:5D:6C:7C)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 95:B5:C4:5D:6C:7C ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Security C467A9 (Security - CD:BC:A2:C4:67:A9)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device CD:BC:A2:C4:67:A9 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Car 4CD506 (Car - C6:92:64:4C:D5:06)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device C6:92:64:4C:D5:06 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Fans E3512D (Fans - 97:C6:02:E3:51:2D)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 97:C6:02:E3:51:2D ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Stable 9220A1 (Stable - 92:74:52:92:20:A1)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 92:74:52:92:20:A1 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Sensors 676E3F (Sensors - 06:44:1E:67:6E:3F)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 06:44:1E:67:6E:3F ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Backyard BCF50B (Backyard - 39:A2:8A:BC:F5:0B)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 39:A2:8A:BC:F5:0B ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Dining Room 8A3123 (Dining Room - 4C:30:76:8A:31:23)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device 4C:30:76:8A:31:23 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Garage 6A6016 (Garage - E0:47:C5:6A:60:16)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device E0:47:C5:6A:60:16 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device TVs 0527F0 (TVs - E2:20:9F:05:27:F0)
2022-03-26 18:38:11 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] HomeKit device E2:20:9F:05:27:F0 ignored as already paired
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.controller.ip.connection] Starting reconnect loop to 192.168.1.78:4548
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.controller.ip.connection] Attempting connection to 192.168.1.78:4548
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.protocol.tlv] sending [
  6: (1 bytes/) 0x01
  0: (1 bytes/) 0x01
]
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw request: b'POST /pair-setup HTTP/1.1\r\nHost: 192.168.1.78\r\nContent-Length: 6\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x06\x01\x01\x00\x01\x01'
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw response: bytearray(b'\x06\x01\x02\x03\xff\n\xc6\x91%\x1a\xdc\x08k+|} \xb7\xbd\x89\xc2O\x16\x86\xe5\xc0\xda\xef\xd4l\x85\x02\xd5\xee\xe9\x06\xe4\xe3\x84\x81#\xd4\xf8U\xe8\xc8&8ZGsO9\x0e\xf9z\xcc\x10\x9f\x1ai\xb7\x08fB\xc2\xfbQ\xed\xc0)\x90\xf81\x0b,\x1e\x0f\xda\x08?K)C>4(\x96\xa4\xf4\x99p\x0ch\t{\xcfrT\x13\xc1\x8b\xb0\xe8\x91;b\xb2\xac\x01\xf5\xc8ky6\n\xd4\\\xa1I\xc2XC~\xa4(\x1fm\xcb\xe1\xc7V\xe1\x19iT\x89\xa4\x0bB%"vTG\\*a\x84X\\\x87dI\x1a\x89\x13\x8c\xd7o\x17\xa3D\x1e\xc0q\xc5x\xc9\xcb\xcb\xca7\x87\xeaK|\xecA\x0b\x88\xacb[<\x82\x1e\xccNX\t}CB\xdfd\xb3\x18\xfc2\xb1\xce\xaa\xeb\xe6\x89\xbf\x06$c_\xb9\x15\x1d\xb8\x98\x13s-\xbb\xc1l\xa2\x91V6u\xd5\xfe}#\x97\x80t$\xd4/\xbd\xc2\x1a\xa2\xbcs\xa8\xf3\xd3\x0e\xc3;\n\x85\xc5=\xd1(\x81}\xa5\x94\xcf\x03\x81\x18n\xd1 H\xf6\x12(\xca\x14\xe7\x90]\x03\x02\xd9\x1cP\xcb\xb9\xdf\x83\xb2\x13\x06\xd93\xd3\x81\xdbT<\xd8!\xe1\x8f\xca\x01!\xc8\xe7F"\xb4\x99l\xf3\xda\xcfG\xa8tF\xa1q\x81y\xc5\x96\x0e.h\x04\xb6A\x8b+\x88\r\xff\x16\xf3\x0c\xfd\xc4\x1e\n\xee\xb56\xea\xa3\x8cUu\xd76\x93R\x86J\xd6\x91g\xd1\x97\x1a\xcb\xe1\xef\xc5$zzj\xadG\xda\xcede/\xfc\xdeT\xccq\x94\xe6r\x06;,|\x93 9\xfd\xf4\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00P\xf4_\xb2P\xf4_\xb2')
2022-03-26 18:38:11 DEBUG (MainThread) [aiohomekit.protocol.tlv] receiving [
  6: (1 bytes/) 0x02
  3: (384 bytes/) 0x0ac691251adc086b2b7c7d20b7bd89c24f1686e5c0daefd46c8502d5eee906e4e3848123d4f855e8c826385a47734f390ef97acc109f1a69b7086642c2fb51edc02990f8310b2c1e0fda083f4b29433e342896a4f499700c68097bcf725413c18bb0e8913b62b2ac01f5c86b79360ad45ca149c258437ea4281f6dcbe1c756e119695489a40b4225227654475c2a6184585c8764491a89138cd76f17a3441ec071c578c9cbcbca3787ea4b7cec410b88ac625b3c821ecc4e58097d4342df64b318fc32b1ceaaebe689bf0624635fb9151db89813732dbbc16ca291563675d5fe7d2397807424d42fbdc21aa2bc73a8f3d30ec33b0a85c53dd128817da594cf186ed12048f61228ca14e7905d0302d91c50cbb9df83b21306d933d381db543cd821e18fca0121c8e74622b4996cf3dacf47a87446a1718179c5960e2e6804b6418b2b880dff16f30cfdc41e0aeeb536eaa38c5575d7369352864ad69167d1971acbe1efc5247a7a6aad47dace64652ffcde54cc7194e672063b2c7c932039fdf4
  2: (16 bytes/) 0x000000000000000050f45fb250f45fb2
]
2022-03-26 18:38:32 DEBUG (MainThread) [aiohomekit.protocol.tlv] sending [
  6: (1 bytes/) 0x03
  3: (384 bytes/) 0x114868612dbf897ecdcb61bb621bc18d9c44b03eaa6bba77e373933fd5cf5c28b566bd61e0ad3c559d89242a10664e65f48ef8b61321e17dec2353466016566d809246f57f1cb06f60785c3ce13dece2c43bf7357878e7b7752b5ab568d82ce342b46899b0d6b84a9af8f96376bef90c1110d4d5b0b95d8ac4a057e2bfe7c1ac9cc246862152438843eb1d3f8cce7def17e7576f822d62e1a20c2ed5de71fc0f76a2f2a803f424eaf8bf350fa166729c0a87598b0baf5aaab9a0f700bde72965c4e06bf09818de6902c9e6369730a439608c05fa3fbce7c2f5a868d64e9f88c85651ae406525705d6c711f5e59a70dbf50c6bf746b888049e9dbdef19f9ff2f520174d3df286b721baef0c5a74437eed098c8941129290b550d830ae3f2a008bd6700647c36c05f71a16a501ab8f39e8cfa19c03dcb80841f63a07158b7a2eeb3f3d976418c9e118e6b3d33254f1f1e6c3441f70cd7e8a1bfb083a16df9954328e7d2039b409f4c46e17ecdc5020fd6c9676129bbec1b8fe9bf87efd6a55e6ec
  4: (64 bytes/) 0x5385d945d920b740feaec4606cf2b497b39c6d58e352b27e37db42097e6341ef3f3fb29e2709905ed7b32abe9ada104975c8817a470fe1fc0581cc141d536396
]
2022-03-26 18:38:32 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw request: b"POST /pair-setup HTTP/1.1\r\nHost: 192.168.1.78\r\nContent-Length: 457\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x06\x01\x03\x03\xff\x11Hha-\xbf\x89~\xcd\xcba\xbbb\x1b\xc1\x8d\x9cD\xb0>\xaak\xbaw\xe3s\x93?\xd5\xcf\\(\xb5f\xbda\xe0\xad<U\x9d\x89$*\x10fNe\xf4\x8e\xf8\xb6\x13!\xe1}\xec#SF`\x16Vm\x80\x92F\xf5\x7f\x1c\xb0o`x\\<\xe1=\xec\xe2\xc4;\xf75xx\xe7\xb7u+Z\xb5h\xd8,\xe3B\xb4h\x99\xb0\xd6\xb8J\x9a\xf8\xf9cv\xbe\xf9\x0c\x11\x10\xd4\xd5\xb0\xb9]\x8a\xc4\xa0W\xe2\xbf\xe7\xc1\xac\x9c\xc2F\x86!RC\x88C\xeb\x1d?\x8c\xce}\xef\x17\xe7Wo\x82-b\xe1\xa2\x0c.\xd5\xdeq\xfc\x0fv\xa2\xf2\xa8\x03\xf4$\xea\xf8\xbf5\x0f\xa1fr\x9c\n\x87Y\x8b\x0b\xafZ\xaa\xb9\xa0\xf7\x00\xbd\xe7)e\xc4\xe0k\xf0\x98\x18\xdei\x02\xc9\xe66\x970\xa49`\x8c\x05\xfa?\xbc\xe7\xc2\xf5\xa8h\xd6N\x9f\x88\xc8VQ\xae@e%p]lq\x1f^Y\xa7\r\xbfP\xc6\xbftk\x88\x80I\xe9\xdb\xde\xf1\x9f\x9f\xf2\x03\x81\xf5 \x17M=\xf2\x86\xb7!\xba\xef\x0cZtC~\xed\t\x8c\x89A\x12\x92\x90\xb5P\xd80\xae?*\x00\x8b\xd6p\x06G\xc3l\x05\xf7\x1a\x16\xa5\x01\xab\x8f9\xe8\xcf\xa1\x9c\x03\xdc\xb8\x08A\xf6:\x07\x15\x8bz.\xeb?=\x97d\x18\xc9\xe1\x18\xe6\xb3\xd32T\xf1\xf1\xe6\xc3D\x1fp\xcd~\x8a\x1b\xfb\x08:\x16\xdf\x99T2\x8e} 9\xb4\t\xf4\xc4n\x17\xec\xdcP \xfdl\x96v\x12\x9b\xbe\xc1\xb8\xfe\x9b\xf8~\xfdjU\xe6\xec\x04@S\x85\xd9E\xd9 \xb7@\xfe\xae\xc4`l\xf2\xb4\x97\xb3\x9cmX\xe3R\xb2~7\xdbB\t~cA\xef??\xb2\x9e'\t\x90^\xd7\xb3*\xbe\x9a\xda\x10Iu\xc8\x81zG\x0f\xe1\xfc\x05\x81\xcc\x14\x1dSc\x96"
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw response: bytearray(b'\x06\x01\x04\x07\x01\x02')
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.protocol.tlv] receiving [
  6: (1 bytes/) 0x04
  7: (1 bytes/) 0x02
]
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.controller.ip.connection] Starting reconnect loop to 192.168.1.78:4548
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.controller.ip.connection] Attempting connection to 192.168.1.78:4548
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.protocol.tlv] sending [
  6: (1 bytes/) 0x01
  0: (1 bytes/) 0x01
]
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw request: b'POST /pair-setup HTTP/1.1\r\nHost: 192.168.1.78\r\nContent-Length: 6\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x06\x01\x01\x00\x01\x01'
2022-03-26 18:38:34 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.1.78: raw response: bytearray(b'\x06\x01\x02\x03\xff\xbb\xfa\x95\r\xae\xcb\xf1\x02\xd3\xff8\x1d\xef\xc62\xf7\xdcL\xbc1\r\x1c\xdb\xa2\xcdL}d\x13&\xac\x12\xa9\xa9\xb4~,\xec\xc7\x94\x80\xca\x14i n\x8f]0\x93\x9b\xfb\x80\x06\\\xe2\n\xbd6\x0cy\xb8\x83\x12\x9bV\xa6\x97\xd9\'\xcd\x1a\xec\xf7\xc8\xc0V\xb6\xff\xe4\x8at\x05\xe4\xe5Y%ra\xca\x82AS\xa0\xec\xce\x1e\xb4\xbe\xcf\xf0\x17\x159\x83\xaa\x99U\xd5\xed=\x82\xd8\xbe^c\x05n\xd8s\x8ar\xb1\xc9\x11\xb5\xeb\x19\xbb\x94"\x15\x94\x85j\x02\xdb\xc1\xd8\xa7\xd28G\xa6\xba\xefK6\xb4\xef\xec\x7f\x85\x1a\x88\xc1\xaae\xa5k\xb6\x1e\xaf&\\\xcf|\xa3\x89$\x8a\xb9\x90E\xb7\x81"LUA\x8f7_\xcc\x1d>4\x18!\xde\xf2\xd7\n\xe8F\xfbq\x14W\x87g\x1b\x836\x14\xaa\x8a\x85@<\x92\x14f\x9c\x97\xf9\xffi2\x92\x85\xa1\xcaf\xc6I\xef\xd8q\xb2\xd1\x0c\xcej\xb1h\x87A\xb1\x89\x82\xeap#\xb7\xc7P\x08\xda\x9f\xaeh\x85}=\x03\x81\xce\xb8-\x95`=\x8e\xc8\x8aSWR^\xe8H\xf10<\xac\xa5\xcch\xc1\xb3S\xe3\x935\xed(\xbeyO\xd8 \x1dd\xeb\xb9v\x07E{\xda\x14g >\xb5w\x9fD\x8eK\xf5>+B\x84d4\xf7I\xf4;\xba\xab>E\x13\xe1;/\xa3a\xba?\x97\x1b\x12y\xcf\xb5\x93\x99\xd4\xe4=\xe7\xecgd]\x9b/\xc7q\xe6\xb8Q\x13\x95!\xde\x98;/\x9b\x027)\x84\x07\x9cXg\xda_\xdfW=q_\xf9\xa4+\x87B\x0f\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00P\xf4_\xb2P\xf4_\xb2')
  6: (1 bytes/) 0x02
  3: (384 bytes/) 0xbbfa950daecbf102d3ff381defc632f7dc4cbc310d1cdba2cd4c7d641326ac12a9a9b47e2cecc79480ca1469206e8f5d30939bfb80065ce20abd360c79b883129b56a697d927cd1aecf7c8c056b6ffe48a7405e4e559257261ca824153a0ecce1eb4becff017153983aa9955d5ed3d82d8be5e63056ed8738a72b1c911b5eb19bb94221594856a02dbc1d8a7d23847a6baef4b36b4efec7f851a88c1aa65a56bb61eaf265ccf7ca389248ab99045b781224c55418f375fcc1d3e341821def2d70ae846fb71145787671b833614aa8a85403c9214669c97f9ff69329285a1ca66c649efd871b2d10cce6ab1688741b18982ea7023b7c75008da9fae68857d3dceb82d95603d8ec88a5357525ee848f1303caca5cc68c1b353e39335ed28be794fd8201d64ebb97607457bda1467203eb5779f448e4bf53e2b42846434f749f43bbaab3e4513e13b2fa361ba3f971b1279cfb59399d4e43de7ec67645d9b2fc771e6b851139521de983b2f9b02372984079c5867da5fdf573d715ff9a42b87420f
  2: (16 bytes/) 0x000000000000000050f45fb250f45fb2
]
probot-home-assistant[bot] commented 2 years ago

homekit_controller documentation homekit_controller source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @jc2k, @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit_controller) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

chrisdrackett commented 2 years ago

attempting to work on this a bit more. I was hoping after successfully pairing with the home app directly and turning devices on via the Lutron UI I might have more luck, but I'm getting the same as above. I'll see if I can get a dev env running as mentioned in the linked issue.

Jc2k commented 2 years ago

Your hunch about the linked issue is right; based on your logs your device is indeed rejecting your setup code with kTLVError_Authentication. This normally means your pairing code is wrong. When the pairing code is right the only alternative explanation is that the device relies on a pairing flow that is not publicly documented (for example, some devices require the iOS app to be party to the pairing process and those are just not supported). Or it could be that the Lutron implements extra restrictions that aren't part of the spec but we still need to satisfy (it could be sensitive to TLV order or something weird like that).

Modifying the code to force PairSetup and/or PairSetupAuth as in the linked issue is still worth trying. The only other way forward for this issue is to capture pcaps with WireShark of an iOS device pairing with this device.

chrisdrackett commented 2 years ago

@Jc2k ok, I think I captured the process via Wireshark. This is my first time using it so hopefully this is what you need: https://www.dropbox.com/s/ldxnq8sg3h9l9sm/lutron.pcapng?dl=0

chrisdrackett commented 2 years ago

@Jc2k the above is probably not fully filtered, my phone IP is 192.168.1.170. This should be showing only traffic for the controller (192.168.1.78)

Bcukier commented 2 years ago

Fwiw, I am having a similar issue. I recently added a radio RA 3 controller to my radiora2 setup (new blinds that only work with Ra3). The ra2 devices work with both HomeKit and the Lutron integration. When I try and add the Ra3 controller to HomeKit, I get an invalid code message.

I successfully paired the bridge with HomeKit on my apple devices using the same code. I the unpaired and tried to pair with HA, but same message.

chrisdrackett commented 2 years ago

Crossing my fingers there is someway to get RA3 into HASS one way or another soon!

robloh commented 2 years ago

Crossing my fingers there is someway to get RA3 into HASS one way or another soon!

There is also a secondary effort going on here: https://github.com/gurumitts/pylutron-caseta/pull/90

JonGilmore commented 2 years ago

@chrisdrackett - did you make any progress on this at all?

chrisdrackett commented 2 years ago

Nope, just crossing my fingers one of these drops someday ;)

JonGilmore commented 2 years ago

Right on, looks like theres some good activity with those pylutron-caseta forks, I'll probably give one of those a go here.

BrianVallelunga commented 2 years ago

I just got a RA3 installation at my new home as well and am receiving the exact same error. Hopefully the issue is resolvable soon. I'm willing to help test whatever I can and am a developer myself.

bdraco commented 2 years ago

Has anyone tried again with 2022.8?

BrianVallelunga commented 2 years ago

Has anyone tried again with 2022.8?

Yes and it behaves the same as before unfortunately. From reading the linked issues it appears to be an issue with a chain of certificates. I have no idea how/if this will be fixed.

Jc2k commented 2 years ago

HomeKit doesn't use certificate chains?

bdraco commented 2 years ago

2: (16 bytes/) 0x000000000000000050f45fb250f45fb2

The salt has leading zeros here https://github.com/home-assistant/core/pull/76738 should fix that and allow it to pair

bdraco commented 2 years ago

2022.8.5 has the changes that hopefully will fix pairing. Please let us know.

BrianVallelunga commented 2 years ago

I can confirm that I can now pair my RadioRA3 processor. Thank you for the work. That said, I'm not sure what the next step would be since the processor only seems to expose a single device and entity. I expected it to show the light switches in the house.

BrianVallelunga commented 2 years ago

HomeKit doesn't use certificate chains?

Yeah, that was for direct API access, not through HomeKit.

Jc2k commented 2 years ago

Missing devices can be caused by them re-using serial numbers for different devices. But i'd expect the correct devices to be created, just the entities to be wrong.

Can you attach the diagnostic information for it?

Bcukier commented 2 years ago

This worked well for me. I have a few devices on Ra3, and they all showed up (Most of my system is RA2, but the new shades only work with Ra3…). Thank you!!

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/68723#issuecomment-1216575209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYQTHWIIYJDQDQPTFAL42ODVZODD5ANCNFSM5RX7MHGQ . You are receiving this because you commented.Message ID: @.***>

BrianVallelunga commented 2 years ago

Missing devices can be caused by them re-using serial numbers for different devices. But i'd expect the correct devices to be created, just the entities to be wrong.

Can you attach the diagnostic information for it?

I appreciate you taking a look. Here's the diagnostic info:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.8.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "5.15.55",
    "supervisor": "2022.08.3",
    "host_os": "Home Assistant OS 8.4",
    "docker_version": "20.10.14",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "ble_monitor": {
      "version": "9.1.1",
      "requirements": [
        "pycryptodomex>=3.14.1",
        "janus>=1.0.0",
        "aioblescan>=0.2.13",
        "btsocket>=0.2.0",
        "pyric>=0.1.6.3"
      ]
    },
    "hacs": {
      "version": "1.26.2",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "rinnai": {
      "version": "1.0.45",
      "requirements": [
        "aiorinnai==0.2.9"
      ]
    }
  },
  "integration_manifest": {
    "domain": "homekit_controller",
    "name": "HomeKit Controller",
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/homekit_controller",
    "requirements": [
      "aiohomekit==1.2.11"
    ],
    "zeroconf": [
      "_hap._tcp.local.",
      "_hap._udp.local."
    ],
    "bluetooth": [
      {
        "manufacturer_id": 76,
        "manufacturer_data_start": [
          6
        ]
      }
    ],
    "dependencies": [
      "bluetooth",
      "zeroconf"
    ],
    "codeowners": [
      "@Jc2k",
      "@bdraco"
    ],
    "iot_class": "local_push",
    "loggers": [
      "aiohomekit",
      "commentjson"
    ],
    "is_built_in": true
  },
  "data": {
    "config-entry": {
      "title": "Lutron Processor",
      "version": 1,
      "data": {
        "AccessoryPairingID": "9a:fb:d2:07:3f:24",
        "AccessoryLTPK": "d27370cd0adac6a9424254af776a4534b50ad209c846dc86f109818e6e87142f",
        "iOSPairingId": "6973a5ca-84ce-4e00-8f59-fee1c8aacaed",
        "iOSDeviceLTSK": "**REDACTED**",
        "iOSDeviceLTPK": "43c6ef240e83f2453e4cfe62b194497aa3bf399b9bb06e61059994c394ea4e16",
        "AccessoryIP": "**REDACTED**",
        "AccessoryPort": 4548,
        "Connection": "IP"
      }
    },
    "entity-map": [
      {
        "aid": 1,
        "services": [
          {
            "iid": 1,
            "type": "0000003E-0000-1000-8000-0026BB765291",
            "characteristics": [
              {
                "type": "00000014-0000-1000-8000-0026BB765291",
                "iid": 85899345921,
                "perms": [
                  "pw"
                ],
                "format": "bool",
                "description": "Identify"
              },
              {
                "type": "00000020-0000-1000-8000-0026BB765291",
                "iid": 137438953473,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "Lutron Electronics Co., Inc",
                "description": "Manufacturer",
                "maxLen": 64
              },
              {
                "type": "00000021-0000-1000-8000-0026BB765291",
                "iid": 141733920769,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "JanusProcRA3",
                "description": "Model",
                "maxLen": 64
              },
              {
                "type": "00000023-0000-1000-8000-0026BB765291",
                "iid": 150323855361,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "Lutron Processor",
                "description": "Name",
                "maxLen": 64
              },
              {
                "type": "00000030-0000-1000-8000-0026BB765291",
                "iid": 206158430209,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "**REDACTED**",
                "description": "Serial Number",
                "maxLen": 64
              },
              {
                "type": "00000052-0000-1000-8000-0026BB765291",
                "iid": 352187318273,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "22.02",
                "description": "Firmware Revision",
                "maxLen": 64
              }
            ]
          },
          {
            "iid": 2,
            "type": "000000A2-0000-1000-8000-0026BB765291",
            "characteristics": [
              {
                "type": "00000037-0000-1000-8000-0026BB765291",
                "iid": 236223201282,
                "perms": [
                  "pr"
                ],
                "format": "string",
                "value": "1.1.0",
                "description": "Version",
                "maxLen": 64
              }
            ]
          }
        ]
      }
    ],
    "config-num": 1,
    "devices": [
      {
        "name": "Lutron Processor",
        "model": "JanusProcRA3",
        "manfacturer": "Lutron Electronics Co., Inc",
        "sw_version": "22.02",
        "hw_version": "",
        "entities": [
          {
            "original_name": "Lutron Processor Identify",
            "original_device_class": null,
            "entity_category": "diagnostic",
            "original_icon": null,
            "icon": null,
            "unit_of_measurement": null,
            "device_class": null,
            "disabled": false,
            "disabled_by": null,
            "state": {
              "entity_id": "button.lutron_processor_identify",
              "state": "unknown",
              "attributes": {
                "friendly_name": "Lutron Processor Identify"
              },
              "last_changed": "2022-08-16T14:11:08.870282+00:00",
              "last_updated": "2022-08-16T14:11:08.870282+00:00"
            }
          }
        ]
      }
    ]
  }
}
JonGilmore commented 2 years ago

For what it's worth, I'm having the same issue as @BrianVallelunga - it only creates a single entity.

bdraco commented 2 years ago

When you unpair and pair with an iPhone so you see more devices?

BrianVallelunga commented 2 years ago

I've never had it paired to an iPhone. I use Android, but do have an iPad I can use if that helps. I just checked and there is no connected HomeKit integration listed in the Lutron app on my iPad.

Jc2k commented 2 years ago

So in the data you posted the bit that says "entity-map" - thats basically raw homekit metadata from your Lutron. It's probably the most bare HomeKit metadata i've ever seen. It's almost like a its a HomeKit bridge with no HomeKit compatible accessories paired to it. So we need to make sure that an iOS device actually sees some devices to work out where the problem is.

BrianVallelunga commented 2 years ago

I was able to connect the processor to HomeKit via the Lutron app on the iPad. The Lutron app then has me select which devices to expose to HomeKit. When selected, those devices did show up in the Home app on the iPad.

Jc2k commented 2 years ago

And if you now unpair it from the iPad and add it back to Home Assistant?

BrianVallelunga commented 2 years ago

And if you now unpair it from the iPad and add it back to Home Assistant?

Sadly, no change.

Jc2k commented 2 years ago

What if you pair with the iPad but you don't use the Lutron app, just the Apple Home app. In fact, ideally remove the Lutron app to be sure.

My theory is that the Lutron app is doing some extra configuration behind the scenes using its native protocol that we are unable to replicate. If that gets cleared when you unpair i'm not really sure if we'll be able to help.

If pairing with the Apple Home app works, then we'll have to enable debug logging and verify its refreshing the entity-map wihen you pair with Home Assistant.

BrianVallelunga commented 2 years ago

This morning I paired the processor directly from the iPad's Home app without using the Lutron app at all. None of my switches or shades showed in the home app after pairing with that method either. It seems the Lutron app is needed to choose which devices get exposed to HomeKit. Ideally I'd be able to pair with the Lutron app, expose the devices, and then switch to HA, but that doesn't seem to work. I am curious as to how this worked for @Bcukier

I may just have to wait for the native Lutron Caseta integration that uses the LEAP API if this can't be resolved.

Jc2k commented 2 years ago

It might depend on how you remove the device from HomeKit on the iPad. How did you do that?

BrianVallelunga commented 2 years ago

Sorry, I was out of town this past week. I'll try a few more combinations and write back in the next day or two.

chrisdrackett commented 2 years ago

I'm having the same issue. There is a difference between connecting to real homekit and HASS. With real homekit you get a "Apple HomeKit" item listed in integrations:

image

when you click in you can select devices. For some reason this item does not show up when connecting to HASS.

Jc2k commented 2 years ago

I suspect the app knows about the HomeKit pairing, but it also knows it's not a pairing that's known to your iOS devices. We only support what you can setup with the native iOS app, if you need to do this setup in a vendor app you are probably out of luck unfortunately.

Sometimes there is a way to set devices up and unpair homekit but leave the settings in place. I do this with an Eve extend. Maybe if you remove the vendor app from your phone and then remove the pairing using the native apple app?

But it just might actually be a device we can't support.

clarencetso commented 2 years ago

FWIW: I also just ran into the same issue pairing RA3 with the homekit controller. Just get one device/entity after successfully connecting in HASS. Didn't really do anything with iOS (mostly because even when I tried, the Lutron app wouldn't even integrate with Homekit properly)