Comments (13)
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.
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.
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.
@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.
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.
Ok, thanks for the quick reply. Yes, could very well be the case, that HomeKit is kinda buggy with iOS9.
from hc.
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.
@kevinduterne This should already be fixed. Please get the latest changes from the master branch and try it again.
from hc.
Correct, get fixed the issue! Thx
from hc.
Is this still an issue?
from hc.
No It has been resolved
from hc.
With current code from master, I can also confirm that this is no longer an issue with iOS 9.3.1.
from hc.
Thanks
from hc.
Related Issues (20)
- High io load (read)
- Listening to homekit HOT 6
- Quotation mark in accessory name prevents it from being added
- accessory tv HOT 7
- NewIPTransport add validation HOT 3
- Can use from Linux or Android HOT 1
- Issues with dnssd v1.2.0 HOT 5
- specify advertised IP for dnssd HOT 2
- Characteristic: Button Event HOT 2
- Build window fail HOT 2
- multiple accessories events HOT 2
- not support utf-8 chinese language HOT 1
- bridge must not expose more than 150 objects HOT 1
- TemperatureSensor steps ignored HOT 1
- Maintenance status? HOT 4
- addition & examples HOT 2
- Is there has plan to support new device types? HOT 1
- Expose `http.ServeMux` to allow applications to add additional endpoints HOT 1
- Radiation sensor HOT 5
- Client is unknown HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hc.