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

Bridge disconnects from the iPhone #36

Closed
rafdalb opened this issue Feb 8, 2016 · 7 comments
Closed

Bridge disconnects from the iPhone #36

rafdalb opened this issue Feb 8, 2016 · 7 comments

Comments

@rafdalb
Copy link

rafdalb commented Feb 8, 2016

Hello,

I'm trying to use the openhab home kit bridge with my iPhone.

I'm using a linux vm ubuntu 14.04 (different from the Openhab controller which is running on a raspberry).

Installation went apparently fine, and I'm also able to run the bridge which is connected to the iPhone.

After a while (1 minutes or more, when I leave the iPhone going in standby mode, and I switch it on again) I see the device disconnected, and even doing a refresh it doesn't work.

The only way to have it working again is to stop the bridge and restart it.

I sniffed the bonjour packets and apparently the bridge answers the mdns requests coming from the phone.

Did you ever experience this problem?

Software release used:

root@openhab:/home/rafdalb# nodejs --version
v0.12.9
root@openhab:/home/rafdalb# npm --version
2.14.9

iOS 9.2.1

Openhab 1.8.1

@htreu
Copy link
Owner

htreu commented Feb 9, 2016

Which Version of the bridge did you use (git hash)? Pls try the 1.3.0 beta 1 tag. There was a Problem with invalid values and Homekit started to ignore the bridge. This is fixed in 1.3.0.

@rafdalb
Copy link
Author

rafdalb commented Feb 9, 2016

I just downloaded master zip file from github web site.

It seems to be 1.3.0.

Is it the release I should use or not?

Thanks,
Raffaele.

rafdalb@openhab:~/OpenHAB-HomeKit-Bridge-master$ more package.json
{
"name": "openHAB-HomeKit-Bridge",
"version": "1.3.0",
"author": "Henning Treu henning.treu@googlemail.com",

On 09 Feb 2016, at 06:22, Henning Treu notifications@github.com wrote:

Which Version of the bridge did you use (git hash)? Pls try the 1.3.0 beta 1 tag. There was a Problem with invalid values and Homekit started to ignore the bridge. This is fixed in 1.3.0.


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

@htreu
Copy link
Owner

htreu commented Feb 9, 2016

Yes, 1.3.0 is good. Please provide a minimal sitemap and openhab item description which causes the problems. Also, start the bridge with DEBUG=*,-babel npm start -- --name ... and provide the log output.

@rafdalb
Copy link
Author

rafdalb commented Feb 9, 2016

Hello,

thanks.

I’ve my sitemap with several items, but I created one dedicated for the bridge. This is very simple

pi@raspberrypi:~ $ cat /etc/openhab/configurations/sitemaps/hk.sitemap

sitemap hk label="HomeKit Stellapolare"
{
Switch item=Antifurto
Switch item=AllLights
}

Openhab is installed on a raspberry using 223 final address (192.168.6.233), while the bridge is on a VM running ubuntu over vmware 5.5.

Debug is this one, after a while I don’t see debugging anymore because, as said, the iDevice is not able to contact the Bridge.. My impression is that this is due some mDNS strange behaviour.

Let me know if you need more info.

Thanks for helping on this,
Raf.

root@openhab:/home/rafdalb/OpenHAB-HomeKit-Bridge-master# DEBUG=*,-babel npm start -- --name "beta" --server 192.168.6.223:8080 --sitemap hk

openHAB-HomeKit-Bridge@1.3.0 start /home/rafdalb/OpenHAB-HomeKit-Bridge-master
node index.js start "--name" "beta" "--server" "192.168.6.223:8080" "--sitemap" "hk"

*** WARNING *** The program 'nodejs' 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=nodejs
*** WARNING *** The program 'nodejs' 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=nodejs&f=DNSServiceRegister
Starting the bridge beta ...
AccessoryProvider processing widget: SwitchItem Antifurto Attivo +0ms
AccessoryProvider processing widget: SwitchItem Tutte le luci +10ms
EventedHTTPServer Server listening on port 52826 +16ms
UpdateListener open ws connection for url http://192.168.6.223:8080/rest/items/AllLights +14ms
UpdateListener open ws connection for url http://192.168.6.223:8080/rest/items/Antifurto +1ms
EventedHTTPServer [::ffff:192.168.6.13] New connection from client +1s
EventedHTTPServer [::ffff:192.168.6.13] HTTP server listening on port 54826 +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /pair-verify +3ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: POST /pair-verify +0ms
HAPServer [a2:95:e0:bd:de:19] Pair verify step 1/2 +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +7ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /pair-verify +18ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: POST /pair-verify +0ms
HAPServer [a2:95:e0:bd:de:19] Pair verify step 2/2 +1ms
HAPServer [a2:95:e0:bd:de:19] Client 2E10705B-C799-445F-913A-2E31AC8F1702 verification complete +4ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /accessories +7ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /accessories +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +3ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +69ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +1ms
Accessory [beta] Processing characteristic set: [{"aid":2,"iid":11,"ev":true},{"aid":3,"iid":11,"ev":true}] +1ms
Accessory [beta] Registering Characteristic "Reachable" for events +0ms
Accessory [beta] Registering Characteristic "Reachable" for events +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=3.9 +58ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=3.9 +1ms
Accessory [beta] Getting value for Characteristic "On" +1ms
SwitchItem read power state: [ON] true for Tutte le luci from http://192.168.6.223:8080/rest/items/AllLights +18ms
Accessory [beta] Got Characteristic "On" value: true +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=2.9 +109ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=2.9 +1ms
Accessory [beta] Getting value for Characteristic "On" +0ms
SwitchItem read power state: [OFF] false for Antifurto Attivo from http://192.168.6.223:8080/rest/items/Antifurto +14ms
Accessory [beta] Got Characteristic "On" value: false +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +57s
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +0ms
Accessory [beta] Processing characteristic set: [{"aid":2,"iid":9,"ev":true}] +0ms
Accessory [beta] Registering Characteristic "On" for events +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=2.9 +5ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=2.9 +0ms
Accessory [beta] Getting value for Characteristic "On" +0ms
SwitchItem read power state: [OFF] false for Antifurto Attivo from http://192.168.6.223:8080/rest/items/Antifurto +17ms
Accessory [beta] Got Characteristic "On" value: false +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +46ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +0ms
Accessory [beta] Processing characteristic set: [{"aid":3,"iid":9,"ev":true}] +1ms
Accessory [beta] Registering Characteristic "On" for events +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=3.9 +9ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=3.9 +0ms
Accessory [beta] Getting value for Characteristic "On" +0ms
SwitchItem read power state: [ON] true for Tutte le luci from http://192.168.6.223:8080/rest/items/AllLights +16ms
Accessory [beta] Got Characteristic "On" value: true +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +1ms

EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +11s
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +0ms
Accessory [beta] Processing characteristic set: [{"aid":2,"iid":9,"ev":false}] +0ms
Accessory [beta] Unregistering Characteristic "On" for events +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +4ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +1ms
Accessory [beta] Processing characteristic set: [{"aid":3,"iid":9,"ev":false}] +0ms
Accessory [beta] Unregistering Characteristic "On" for events +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +8s
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +0ms
Accessory [beta] Processing characteristic set: [{"aid":2,"iid":9,"ev":true}] +0ms
Accessory [beta] Registering Characteristic "On" for events +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=2.9 +6ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=2.9 +0ms
Accessory [beta] Getting value for Characteristic "On" +0ms
SwitchItem read power state: [OFF] false for Antifurto Attivo from http://192.168.6.223:8080/rest/items/Antifurto +15ms
Accessory [beta] Got Characteristic "On" value: false +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics +46ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: PUT /characteristics +0ms
Accessory [beta] Processing characteristic set: [{"aid":3,"iid":9,"ev":true}] +1ms
Accessory [beta] Registering Characteristic "On" for events +1ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP request: /characteristics?id=3.9 +4ms
HAPServer [a2:95:e0:bd:de:19] HAP Request: GET /characteristics?id=3.9 +0ms
Accessory [beta] Getting value for Characteristic "On" +1ms
SwitchItem read power state: [ON] true for Tutte le luci from http://192.168.6.223:8080/rest/items/AllLights +13ms
Accessory [beta] Got Characteristic "On" value: true +0ms
EventedHTTPServer [::ffff:192.168.6.13] HTTP Repsonse is finished +0ms

UpdateListener ws disconnected for url http://192.168.6.223:8080/rest/items/AllLights +4m
UpdateListener ws disconnected for url http://192.168.6.223:8080/rest/items/Antifurto +7ms
UpdateListener reopen ws connection for url http://192.168.6.223:8080/rest/items/AllLights +10s
UpdateListener reopen ws connection for url http://192.168.6.223:8080/rest/items/Antifurto +2ms
UpdateListener open ws connection for url http://192.168.6.223:8080/rest/items/Antifurto +19ms
UpdateListener open ws connection for url http://192.168.6.223:8080/rest/items/AllLights +1ms

On 09 Feb 2016, at 19:27, Henning Treu notifications@github.com wrote:

Yes, 1.3.0 is good. Please provide a minimal sitemap and openhab item description which causes the problems. Also, start the bridge with DEBUG=*,-babel npm start -- --name ... and provide the log output.


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

@rafdalb
Copy link
Author

rafdalb commented Feb 10, 2016

Sorry,

I'm an idiot, it was related to mDNS probably but because I didn't enable iCloud keychain.

Really really Sorry if you lost time trying to understand.

I think I'll remove the issue because it not an issue.

Sorry again,
Raf.

@htreu
Copy link
Owner

htreu commented Feb 10, 2016

No Problem at all. Just leave the issue here for further reference.

@htreu htreu closed this as completed Feb 10, 2016
@rafdalb
Copy link
Author

rafdalb commented Feb 11, 2016

I talked too early,

I’m still convinced this is something related to mDNS but I’m not able to compare what’s happening with a “certified” home kit device because I don’t have one, and at this point I’m not sure it is the HomeKit Bridge software.

What happens is the following:

  • After I add the accessory using Elgato Eve I see the accessory working with the software.
  • After a while I see the accessory not reachable by Elgato Eve but Siri still works if I give commands using Siri (which is what I need in my case, I use Openhab native application as alternative)
  • When I open Elgato I see the mDNS request with wireshark asking for ._hap. saying my specific is cached, so no answer is received (which is expected in my opinion).

That’s the behaviour I see, just FYI.

On 10 Feb 2016, at 10:35, Henning Treu notifications@github.com wrote:

No Problem at all. Just leave the issue here for further reference.


Reply to this email directly or view it on GitHub #36 (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

2 participants