GithubHelp home page GithubHelp logo

Comments (13)

bwdezend avatar bwdezend commented on August 19, 2024

More specifically - when my iOS device leaves the WiFi network and rejoins, it appears the encrypted session is not properly re-neogtiated and left open. I can easily reproduce this by:

1: Checking the state of a device on my bridge
2: Turning WiFi off on my iOS device
3: Checking the state (which is now Unreachable)
4: Turning WiFi back on
5: Checking the state a 3rd time.

from hc.

brutella avatar brutella commented on August 19, 2024

HomeKit on iOS leaves the TCP connection open as long as possible. When the connection is left open and not closed, the next read on the socket fails. The library then closes the connection and prints out the error to the console. The server is NOT dead at this point and still waits for new connections.

It seems to me an iOS bug when the connection is left open when the device leaves the network. I don't know how to fix that on the server side. Any ideas?

from hc.

bwdezend avatar bwdezend commented on August 19, 2024

The iOS client takes a long time to renegotiate a connection after one of these idle connection timeouts occur. After testing this weekend, it will eventually reconnect, but it often takes 10+ attempts over 30 or 45 minutes to be able to re-establish. I agree this smells like an iOS bug.

Stopping and restarting the server seems to be the only way I can ensure a quick restoration of services. I'll keep looking and see if I can find a way to mitigate this timeout.

from hc.

mxlje avatar mxlje commented on August 19, 2024

@bwdezend I am seeing the same behavior, but even after restarting the accessory (I am experimenting with https://github.com/brutella/hklight), I can’t get my phone to reconnect. Do you have any new information on this?

I’m still relatively new to HomeKit and hc, but I really like the prospects of creating my own "devices" in Go.

from hc.

bwdezend avatar bwdezend commented on August 19, 2024

I had to suspend work on HomeKit hacking due to time constraints. Sadly, I have nothing new to share. There's also a chance that iOS9 has yet again changed things.

from hc.

mxlje avatar mxlje commented on August 19, 2024

Ok, thanks for the quick reply. Yes, could very well be the case, that HomeKit is kinda buggy with iOS9.

from hc.

kevinduterne avatar kevinduterne commented on August 19, 2024

Is this also causing the connection to become "not reachable" after any connection loss of the IOS device? 5 to 10 min after adding the Homekit bridge it will become unavailable in the Home app..
On the server I am seeing :
[INFO] Close connection and remove session
Then i have to repair before I can use it again..
Is there anything to do about this?

from hc.

brutella avatar brutella commented on August 19, 2024

@kevinduterne This should already be fixed. Please get the latest changes from the master branch and try it again.

from hc.

kevinduterne avatar kevinduterne commented on August 19, 2024

Correct, get fixed the issue! Thx

from hc.

brutella avatar brutella commented on August 19, 2024

Is this still an issue?

from hc.

kevinduterne avatar kevinduterne commented on August 19, 2024

No It has been resolved

from hc.

bwdezend avatar bwdezend commented on August 19, 2024

With current code from master, I can also confirm that this is no longer an issue with iOS 9.3.1.

from hc.

brutella avatar brutella commented on August 19, 2024

Thanks

from hc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.