question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to connect to accessory

See original GitHub issue

Expected Behavior

Home app should be able to add HomeBridge as an accessory to the app.

Current Behavior

When trying to add Homebridge as an accessory to the Home app, it crashes HomeBridge and says “Couldn’t add Homebridge-479D” inside the Home app.

Steps to Reproduce (for bugs)

Install homebridge on a raspberry pi connected via ethernet. Attempt to add accessory to Home using iOS 12.2

Versions

  • Homebridge: 0.4.49
  • Node: v6.9.5
  • OS: Raspbian 4.14.98 2019-04-08

Configuration

{
  "mdns": {
    "interface": "192.168.1.85"
  },

  "bridge": {
    "name": "Homebridge",
    "username": "XX-XX-XX-XX-XX-XX",
    "port": 51826,
    "pin": "031-45-154"
  },

  "description": "This is my config",

  "platforms": [
    {
    "platform": "SmartThings",
    "name": "SmartThings",
    "app_url": "https://graph-na02-useast1.api.smartthings.com:443/api/smartapps/installations/",
    "app_id": "XXXXXXXX",
    "access_token": "XXXXXXXX",
    "update_method": "direct",
    "direct_port": 8000
    }
  ]
}

Homebridge Log / Command Output

[5/13/2019, 1:23:30 AM] Loaded config.json with 0 accessories and 1 platforms.
[5/13/2019, 1:23:30 AM] ---
[5/13/2019, 1:23:39 AM] Loaded plugin: homebridge-smartthings-tonesto7
Homebridge Version: 2.4
[5/13/2019, 1:23:39 AM] Registering platform 'homebridge-smartthings.SmartThings'
[5/13/2019, 1:23:39 AM] ---
[5/13/2019, 1:23:40 AM] Loading 1 platforms...
[5/13/2019, 1:23:40 AM] [SmartThings] Initializing SmartThings platform...
[5/13/2019, 1:23:40 AM] [SmartThings] Fetching SmartThings devices.
[5/13/2019, 1:23:41 AM] [SmartThings] Mode: (Mode - Home)
[5/13/2019, 1:23:41 AM] [SmartThings] Unknown Capabilities: ["Health Check"]
[5/13/2019, 1:23:41 AM] [SmartThings] Initializing platform accessory 'Evan's Ceiling Lights'...
[5/13/2019, 1:23:41 AM] [SmartThings] Initializing platform accessory 'Mode - Home'...
[5/13/2019, 1:23:41 AM] [SmartThings] Initializing platform accessory 'Security Alarm'...
Setup Payload:
X-HM://0023ISYWYCC90
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
QR CODE HERE
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
CODE HERE
[5/13/2019, 1:23:42 AM] [SmartThings] update_method: direct
[5/13/2019, 1:23:43 AM] Homebridge is running on port 51826.
[5/13/2019, 1:23:43 AM] [SmartThings] Direct Connect Is Listening On 192.168.1.85:8000
[5/13/2019, 1:23:43 AM] [SmartThings] SmartThings Hub Communication Established
[5/13/2019, 1:25:16 AM] TypeError: "list" argument must be an Array of Buffers
    at Function.Buffer.concat (buffer.js:314:13)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:26:35)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
    at Object.encode (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/tlv.js:51:39)
    at HAPServer._handlePairStepFive (/opt/node/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:459:21)
    at HA

As stated above i am unable to connect my homebridge into the home app. The iphone is connected via wifi and the raspberry pi is connected via ethernet but these are the same wifi network. I am using the smarthings plugin from here https://github.com/tonesto7/homebridge-smartthings-tonesto7 but I dont think that is what is causing the issue. I believe this is an issue with the HAP server authentication but not sure what. The same error occurs with a sample config as well.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
KhaosTcommented, May 13, 2019

@evy0311 if possible, can you try update node to some recent version? Like 10.x or 12.x?

0reactions
mafyatacommented, Nov 15, 2019

Uninstall homebridge and plugins and install them again

Read more comments on GitHub >

github_iconTop Results From Across the Web

One solution for "couldn't connect to accessory" error ... - Reddit
Go to iOS wifi settings, and select the accessory under Devices (below the Choose a Network section), and follow the prompt. After the...
Read more >
Add an accessory to the Home app - Apple Support
If you can't add an accessory · Update your iPhone or iPad to the latest version of iOS or iPadOS. · Make sure...
Read more >
How To Fix 'HomeKit Devices Won't Connect' Problems
How to fix 'HomeKit devices won't connect' problems · Start with the basics: Wi-Fi and Bluetooth · Check that you're logged into iCloud...
Read more >
Can't Connect HomeKit-Enabled Accessories Using iPhone?
If you are still unable to control your accessory, then reboot your iPhone by pressing and holding on Home button and sleep/wake button...
Read more >
No Response HomeKit error? Here's the fix! - iMore
If you cannot move your accessories or the dedicated hub, adding a brand-specific range extender or another accessory in between may help. You ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found