homebridge: Accessory not found

Trying to add Homebridge via Home app and I keep getting accessory not found. Tried clearing accessories and persist folders. Made sure the Homebridge port is open on my firewall. Also tried reinstalling homebridge, homebridge-http, and homebridge-nest.

Expected Behavior

Homebridge gets added to Home.

Current Behavior

Home app says ‘Accessory not found’.

Steps to Reproduce (for bugs)

  1. Install homebridge, homebridge-http, homebridge-nest via npm -g install …

Versions

  • Homebridge: 0.4.45
  • Node: 8.11.3
  • OS: Windows 10 Pro

Configuration

For iOS I’ve tried both latest v11 and v12 GM candidate.

Homebridge Log / Command Output

C:\Users\gee4v\AppData\Roaming\npm\node_modules>CD /D "C:\Users\gee4v\AppData\Roaming\npm\node_modules\homebridge\bin" & node homebridge
[2018-9-13 15:00:37] Loaded config.json with 0 accessories and 1 platforms.
[2018-9-13 15:00:37] ---
[2018-9-13 15:00:37] Loaded plugin: homebridge-http
[2018-9-13 15:00:37] Registering accessory 'homebridge-http.Http'
[2018-9-13 15:00:37] ---
[2018-9-13 15:00:38] Loaded plugin: homebridge-nest
[2018-9-13 15:00:38] Registering platform 'homebridge-nest.Nest'
[2018-9-13 15:00:38] ---
[2018-9-13 15:00:38] Loading 1 platforms...
[2018-9-13 15:00:38] [Nest] Initializing Nest platform...
[2018-9-13 15:00:38] [Nest] Fetching Nest devices.
[2018-9-13 15:00:40] [Nest] initing thermostat "Hallway Thermostat": deviceId: yk6vjQGG_Q6RayOxBaKi0MrbYeLtLUy5 structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing protect "Leo’s Room Nest Protect": deviceId: 8eVs5FCudIKKQLq3zzbnAMrbYeLtLUy5 structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing protect "Entryway Nest Protect (Hallway)": deviceId: 8eVs5FCudIKybCZWH3euJ8rbYeLtLUy5 structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing protect "Office Nest Protect": deviceId: 8eVs5FCudILyCspg9Io1lsrbYeLtLUy5 structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing cam "Front Yard Camera (Driveway)": deviceId: I4gDBvpGQE0thXgYgu9gaAmAEjomQyKZPnDpLwYpYULK22Hi7S1MuQ structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing cam "Baby’s Room Camera": deviceId: KWM53rVByCrf4HwgJDtQ0RmQGi2eIkIu70oYoFYQIsrK22Hi7S1MuQ structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing cam "Front Yard Camera (Porch)": deviceId: LOgz2dRJyFUZH8J4Hotp5jYsaU-gozlkjvMjDOFNfrzK22Hi7S1MuQ structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] initing cam "Living Room Camera": deviceId: qaP6hgZHJkGjVBG5rEaPnGIaeJgvdC--p33mig3j-4zK22Hi7S1MuQ structureId: bjUH2YiBDvARehCWda80Lt6od_JJL5ZUziZiksY7HMLy59ERajx58Q
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Hallway Thermostat'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Leo’s Room Nest Protect'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Entryway Nest Protect (Hallway)'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Office Nest Protect'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Front Yard Camera (Driveway)'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Baby’s Room Camera'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Front Yard Camera (Porch)'...
[2018-9-13 15:00:40] [Nest] Initializing platform accessory 'Living Room Camera'...
Setup Payload:
...
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
...
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
...
[2018-9-13 15:00:40] Homebridge is running on port 51827.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 28 (8 by maintainers)

Most upvoted comments

Make sure you are on the same Wi-Fi network as HomeBridge is. Yes the Wi-Fi bands matter too.

Sorry for the confusion - here’s what I’ve figured out so far:

  • The details of ff are undocumented in the spec (it looks like it probably got redacted away when they sanitized the spec for non-commercial use). In general, there seem to be a lot of (presumably redaction) errors / omissions in the non-commercial specification (as well as conflicts between R1 and R2 of the spec).
  • The mDNS value of ff determines the value passed for kTLVTypeMethod in the <M1> request (Step 4.7.1 of the spec). Specifically, an ff value of 0 causes a value of 0 (“Pair Setup” in Table 5-3) to be sent, where an ff value of 1 causes a value of 1 (“Pair Setup with Auth” in Table 5-3) to be sent. Since this value denotes the auth method being used, it follows that the subsequent interactions will differ in these two cases.
  • Even though the specification specifies that we should expect a “Pair Setup with Auth” flow, doing so drops out after the accessory sends back its <M4> response, presumably because that method expects a different payload than we send back per the spec. If one advertises ff=0 (and thus the Home app follows the Pair Auth flow), it works just fine. Considering that the specification is ambiguous about what to advertise for ff, I assume this is another case of the specification being incorrect (or perhaps just incorrectly redacted).
  • All OSS HAP implementations I’ve seen so far advertise ff=0 and expect a kTLVType_Method value of 0, even though the specification says otherwise

For reference, the flow outlined in https://github.com/mtrudel/hap is correct as far as I’ve been able to tell. I spent a lot of time experimenting & synthesizing together various OSS HAP implementations to get to there, and it seems to work quite well so far. Check out https://github.com/mtrudel/hap/blob/master/lib/hap/discovery.ex and https://github.com/mtrudel/hap/blob/master/lib/hap/pair_setup.ex for details, but please bear in mind that it’s a work in progress and nothing beyond <M5> in the pair setup flow is even implemented yet.

Check that homebridge announces itself on the correct interface, use the mdns setting in config.json if not. See https://github.com/nfarina/homebridge/issues/1957.

Check that your router doesn’t do IGMP snooping. Especially the Fritz!Box is known to cause problems. See https://github.com/nfarina/homebridge/issues/1801.