Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never finds "Homebridge" accessory on iOS #163

Closed
masonjames opened this issue Sep 13, 2015 · 19 comments
Closed

Never finds "Homebridge" accessory on iOS #163

masonjames opened this issue Sep 13, 2015 · 19 comments

Comments

@masonjames
Copy link
Contributor

Installation seemed to go very well.

Running the app shows a warning:
*** WARNING *** Please fix your application to use the native API of Avahi!
But continues to load the app. It finds all my Next, Hue Light Bulbs, and WeMO Switches (awesome!)
It finishes with
EventedHTTPServer Server listening on port 51826 +0ms

The first time I started the iOS app, I went to 'Accessory' and one named "Homebridge" was already available. I selected it. Was asked for the code (from the config.json file). I added it, but then got an error on the iOS app.
The homebridge app seemed to be pairing devices just fine. It made it through a series of 'pairings' before also erroring out.

Restarting everything and now no homebridge accessory is never found by iOS. I've tried rebooting, restarting, both the raspberry pi and the iOS device with no luck. Any ideas? Since I'm not getting error messages now I'm not sure what to look for.

Any help is much appreciated. Thanks!

@velocityware
Copy link

I am having the same problem. I just went to settings, privacy, and reset my HomeKit, and I was able to find the homebridge again using a different app...but same problem...errors out.

@KhaosT
Copy link
Contributor

KhaosT commented Sep 13, 2015

@masonjames @velocityware can you grab the log from iOS device? (You can get log from iOS device using Xcode or Apple Configurator)

@velocityware
Copy link

tail -f /var/log/homebridge.*
==> /var/log/homebridge.err <==
Sun, 13 Sep 2015 04:01:13 GMT EventedHTTPServer Server listening on port 51826
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
Sun, 13 Sep 2015 04:12:16 GMT Accessory [Homebridge] Creating new AccessoryInfo for our HAP server
Sun, 13 Sep 2015 04:12:16 GMT Accessory [Homebridge] Creating new IdentifierCache
Sun, 13 Sep 2015 04:12:16 GMT EventedHTTPServer Server listening on port 51826

==> /var/log/homebridge.log <==
[Wink] Initializing platform accessory 'Living room Lamp On Table - GE Link Bulb'...
[Wink] Initializing platform accessory 'Living Room Lamp Near Window - GE Link Bulb'...
[Wink] Initializing platform accessory 'Master Bedroom Pati Light - GE Link Bulb'...
[Wink] Initializing platform accessory 'Master Bedroom Rob Light - GE Link Bulb'...
[Wink] Initializing platform accessory 'Basement Foyer - GE Link Bulb'...
[Wink] Initializing platform accessory 'Kitchen light'...
[Wink] Initializing platform accessory 'Master Bedroom - Overhead'...
[Wink] Initializing platform accessory 'Bobby's Room Light'...
[Wink] Initializing platform accessory 'Workout Room - GE Link Bulb'...
[Wink] Initializing platform accessory 'Office Light'...

==> /var/log/homebridge.err <==
Sun, 13 Sep 2015 04:12:43 GMT EventedHTTPServer [10.0.1.23] New connection from client
Sun, 13 Sep 2015 04:12:43 GMT EventedHTTPServer [10.0.1.23] HTTP server listening on port 54826
Sun, 13 Sep 2015 04:12:52 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-setup
Sun, 13 Sep 2015 04:12:52 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-setup
Sun, 13 Sep 2015 04:12:52 GMT HAPServer [CC:22:3D:E3:CE:31] Pair step 1/5
Sun, 13 Sep 2015 04:12:52 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:10 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-setup
Sun, 13 Sep 2015 04:13:10 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-setup
Sun, 13 Sep 2015 04:13:10 GMT HAPServer [CC:22:3D:E3:CE:31] Pair step 2/5
Sun, 13 Sep 2015 04:13:11 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:11 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-setup
Sun, 13 Sep 2015 04:13:11 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-setup
Sun, 13 Sep 2015 04:13:11 GMT HAPServer [CC:22:3D:E3:CE:31] Pair step 3/5
Sun, 13 Sep 2015 04:13:11 GMT HAPServer [CC:22:3D:E3:CE:31] Pair step 4/5
Sun, 13 Sep 2015 04:13:11 GMT HAPServer [CC:22:3D:E3:CE:31] Pair step 5/5
Sun, 13 Sep 2015 04:13:11 GMT Accessory [Homebridge] Paired with client 1CE32F58-7144-4033-B149-8BFFA3003E05
Sun, 13 Sep 2015 04:13:11 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:11 GMT EventedHTTPServer [10.0.1.23] Client connection closed
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP connection was closed
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP server was closed
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] New connection from client
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP server listening on port 54826
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-verify
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-verify
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] Pair verify step 1/2
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-verify
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-verify
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] Pair verify step 2/2
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] Client 1CE32F58-7144-4033-B149-8BFFA3003E05 verification complete
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP request: /accessories
Sun, 13 Sep 2015 04:13:12 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: GET /accessories
Sun, 13 Sep 2015 04:13:12 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] New connection from client
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP server listening on port 54827
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] Client connection closed
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP connection was closed
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP server was closed
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP request: /pair-verify
Sun, 13 Sep 2015 04:13:13 GMT HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-verify
Sun, 13 Sep 2015 04:13:13 GMT HAPServer [CC:22:3D:E3:CE:31] Pair verify step 1/2
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP Repsonse is finished
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] Client connection closed
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP connection was closed
Sun, 13 Sep 2015 04:13:13 GMT EventedHTTPServer [10.0.1.23] HTTP server was closed

@KhaosT
Copy link
Contributor

KhaosT commented Sep 13, 2015

@velocityware I mean the log from iOS side, when you pair your accessory.
screen shot 2015-09-12 at 10 09 52 pm

@velocityware
Copy link

I did the same steps as last night (stop process, delete everthing in the persist directory, start the process), and this time, everything worked as normal! Last night, nothing helped.

Perhaps there is some communications callback, under the hood of homekit, to apple which was causing the problem. I am going to test some other apps other than mytouchhome, later today. If it fails, I will send over both logs.

@masonjames
Copy link
Contributor Author

I did the same as @velocityware. The folks at MyTouchHome recommended I resetting the homekit configuration. So I did that, deleted the persist directory (made a backup of it), and restarted.

This time I got success as well! The individual wemo & hue lights all showed up correctly. Turning them on and off with Siri has worked incredibly well.

I've got an iPad mini running iOS 9.1. This is the device everything worked on. I have an iPhone running 8.4.1. The accessories still don't show on this device. I'll do some more testing and report back.

There's no difference between the new persists directory and the old one, so I'm not sure what difference that made other than forcing the individual accessory discovery.

I'm familiar with console and have both xcode and apple configurator, but am not familiar with pulling logs from either. I'll look into that and see if I can find anything useful there. This is pretty stinkin' awesome!

@masonjames
Copy link
Contributor Author

Well, it worked once (and when it did it worked great!) but I haven't been able to get it working again.

I'm thinking the issue may be more with the MyTouchHome app though. Here's what I get when I currently try to open the app and add a home "Error: Cloud data sync is in progress"
img_0193

And I got this message during setup (even when it worked):
img_0190

Logs from Homebridge don't show any activity, but the app does appear to be running. I'll look into xcode next.

@KhaosT
Copy link
Contributor

KhaosT commented Sep 13, 2015

@masonjames This is a HomeKit issue. Please make sure you enabled iCloud Drive and iCloud Keychain on your iOS device. If this issue still persist, please try to reset HomeKit (under Privacy > HomeKit)

@nzhome
Copy link

nzhome commented Sep 14, 2015

  1. on the iphone reset HomeKit (under Privacy > HomeKit)
  2. on the server, delete the /persist folder and all files inside, you will find that folder under /homebridge/.

run with full logs to the screen, in case more issues arise...
DEBUG=* node app.js

@pir2
Copy link

pir2 commented Sep 16, 2015

Had the same problem. One thing I noticed that even if you reset the Homekit data in iOS [reset HomeKit (under Privacy > HomeKit)], it actually retains the data somehow and doesn't actually reset anything, so it remembers the devices you added. To add the homebridge, you have to change the "username" in config.json

  1. open config.json
  2. Change the username MAC Address. I changed the last digit to something else and iOS was able to find the homebridge.
"bridge": {
"name": "GiveItANewNameJustInCase",
"username": "Change the MAC Address Here",
"port": 51826,

@masonjames
Copy link
Contributor Author

I updated all devices to ios 9+ (iphone on ios 9 and iPad on ios 9.1beta). I cleared the Privacy > HomeKit settings on both devices and closed the apps. Then I pulled the latest from github and removed the persist folder and restarted the homebridge app on the raspberry pi.

I get the following:
img_0196
Different error than before, but ultimately I'm still unable to add homebridge as an accessory. Will keep trying and totally open to suggestions. I got it working once... I know it can work again!

Thanks :)

@masonjames
Copy link
Contributor Author

BTW, I have since been able to get this app working consistently with homebridge. For whatever reason, Siri seems to respond immediately/appropriately as long as i have the iOS app actually running.

Quick/dirty video: https://www.youtube.com/watch?v=gmGpVxwGo-s

Marking this as closed. Thanks everyone who helped :)

@Tigo72
Copy link

Tigo72 commented Feb 21, 2016

@masonjames
@velocityware
@KhaosT

I have the same situation you had in the beginning: homebridge is running, everything seems fine, Eve finds the Homebridge, but no accessories and there is no way I can enter the pin.

I have changed usernames, bridge names, cleared persist folder and homekit settings.. the lot.

I am running the homebridge on a synology, debian chroot install. Does anyone have a hint as to how to get to the accessories and entering of the pin?

Thanks, Tigo

@KhaosT
Copy link
Contributor

KhaosT commented Feb 21, 2016

@Tigo72 did you also get the "insufficient permission" error?

@Tigo72
Copy link

Tigo72 commented Feb 21, 2016

@KhaosT thanks for your reply.
No, I do not get any errors. Everything seems fine at first glance: Homebridge starts correctly, Hue and Domoticz accessories are loaded by Homebridge, but they simply do not show up in either Eve or Insteon+. The Homebridge is recognized in the apps, but I cannot enter a pin and no accessory is found by the apps.

My iphone runs ios 9.2.1 but on my iPad with an older ios version it doesn't work either.

@KhaosT
Copy link
Contributor

KhaosT commented Feb 21, 2016

@Tigo72 What do you mean by "The Homebridge is recognized in the apps, but I cannot enter a pin and no accessory is found by the apps"? Do you mean that you can see homebridge in the HomeKit app but when tapping the app, it doesn't ask you to pair?

@Tigo72
Copy link

Tigo72 commented Feb 21, 2016

@KhaosT Yes, that is exactly what I mean :-)

@Tigo72
Copy link

Tigo72 commented Feb 22, 2016

@KhaosT I found a solution: had to change the port. Thanks for thinking along though! I appreciate it.

Best, Tigo

@Tigo72
Copy link

Tigo72 commented Feb 23, 2016

Hi,

I changed to 51827 - make sure your ports are forwarded (all) within the
synology.

It did the trick for me.

All Bets,
Tigo

2016-02-23 10:43 GMT+01:00 Surroot notifications@github.com:

Hey @Tigo72 https://github.com/Tigo72 I've the same problem...
When I want to connect to Homebridge in the Elgato Eve App it shows
Homebridge. I can click on it but the progress bar runs to the end without
the pin prompt.
To which port did you change the setting in config.json?

Best regards


Reply to this email directly or view it on GitHub
#163 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants