-
Notifications
You must be signed in to change notification settings - Fork 83
#93 Fix discoverability & pairing with ios13 #95
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
Conversation
merge with upstream
so does discoverable never get set to false now? |
if we do it before response ("return response"), ios stop the pairing. after "return response" java hap not active anymore. probably we need to attach to event like "response" delivered and connection is closed. not sure though how to catch this even.. maybe "channelInactive". |
@ccutrer Can you please accept this fix, or instead fix it otherwise? No one can discover the openhab bridge anymore... this is very annoying... |
Openhab uses a customized build which includes this fix. |
I'm facing pairing problems with ios13 as well. And I can confirm that the pull request is fixing the problem. At least in my environment. |
@ccutrer - any objection to me merging this? |
I have no objections. @yfre added two new commits since my last comment that should turn off discoverability (hopefully properly), and I was just waiting for more confirmation that that worked. |
It is working, but only partially. Now the bridge does appear in the Home app every time, but after I enter the pairing code it’s just loading and after a little while it throws back a message that it cannot be added. Is this a new issue or is it related to this same issue? |
@scothi: Are you sure, it is the same problem? Does your code/setup work with older ios versions? What is the output of the device? |
Unfortunatelly I cannot test with an older ios version, I don’t have another device. I’m trying with 13.3 ios and the sample project (https://github.com/hap-java/HAP-Java/tree/sample). |
Same problem here, iOS 13.3.1. After third pairing phase, createUser is called and then it fails. It seems the the accessories request is received before the service gets recreated, is that good? I would imageine it's not... Isn't there maybe a way to update the service instead of re-creating it? Or re-create it immediately after sending the response to the third pairing phase (and not when receiving the next request)? |
you should see on the log when the accessories request is received and what is the response to it. |
Yes, I do. And it looks ok (at least the same as in the log someone posted in the issue). It just doesn't work. As I wrote in the issue, if I remove the MockSwitch light bulb and just advertise the bridge, I can add it successfully. Any idea what might be causing that? |
* fix HAP subscription process * increase java version for travis * update fmt-maven-plugin to latest version * another fix for travis build. switch to openjdk * switch to openjdk8 * fix thermostat for io13. make temprature unit changeable * switch to openjdk * add subscribe/unsubscribe * fix the names of the garage door characteristics * switch to openjdk * hap-java#93 Fix discoverability & pairing with ios13 (hap-java#95) Switch discoverable to false once client is authenticated * Fixed package (hap-java#98) * add carbon dioxide sensor (hap-java#82) * increase java version * switch to openjdk8 * major refactoring to support optional attributes * add name, active and fault interfaces * make service characteristics complete * update CHANGES.md and README.md * Apply J-N-K patches for Openhab. update dependencies to be aligned with OH * fix some typos in the characteristics descriptions * fix for javadoc bug * fix potential NPE. adapt log level Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix typo and add some logging Signed-off-by: Eugen Freiter <freiter@gmx.de> * Add Doorbell, Microphone, Slat, Speaker, StatelessProgrammableSwitch accessories Signed-off-by: Eugen Freiter <freiter@gmx.de> * update readme Signed-off-by: Eugen Freiter <freiter@gmx.de> * add air purifier and air quality Signed-off-by: Eugen Freiter <freiter@gmx.de> * reduce log leve. align more with OH guidance on logging Signed-off-by: Eugen Freiter <freiter@gmx.de> * add service label service and hap protocol version service. fix Mute characteristic Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix the Id for TargetHorizontalTiltAngleCharacteristic Signed-off-by: Eugen Freiter <freiter@gmx.de> * add Faucet and HeaterCooler Signed-off-by: Eugen Freiter <freiter@gmx.de> * add humidifier dehumidifier accessory Signed-off-by: Eugen Freiter <freiter@gmx.de> * add irrigation system, clean up javadocs Signed-off-by: Eugen Freiter <freiter@gmx.de> * remove reference to spec Signed-off-by: Eugen Freiter <freiter@gmx.de> * add support for custom min/max values for temperatures Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix typos. add support for custom min/max values for threshold temperatures Signed-off-by: Eugen Freiter <freiter@gmx.de> * add constants for default min/max values Signed-off-by: Eugen Freiter <freiter@gmx.de> * put debugData back Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix the typo in CarbonDioxideSensorService * add support for valid-values (for enum characteristics) * CHANGES update * [hap-java#119] added support for valid values for target HumidifierDehumidifierState * [hap-java#119] added support for valid values for target HumidifierDehumidifierState * [hap-java#119] added support for valid values for target HumidifierDehumidifierState * [hap-java#119] added support for valid values for target HumidifierDehumidifierState * add support for qr code Signed-off-by: Eugen Freiter <freiter@gmx.de> * add default implementation for setup Id Signed-off-by: Eugen Freiter <freiter@gmx.de> * add support for linked services Some services require linked services to work, for example, the Television service which requires each input to be a linked service. With this change, support to link services is added, though it's not used in any existing service, as they don't need linking. This change also centralizes the generation of interface ids. They are now only generated in the registry. We were previously also generating them in the accessory controller, relying on an identical processing sequence. * port of hap-java#68 PR on jmDNS to latest code base Signed-off-by: Eugen Freiter <freiter@gmx.de> * incorporate review feedback Signed-off-by: Eugen Freiter <freiter@gmx.de> * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) * [hap-java#124](hap-java#124 * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) typo in JavaDoc * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) JavaDoc error fixed * Add support for FilterMaintenanceAccessory [hap-java#124](hap-java#124) JavaDoc error fixed * add linked service API Signed-off-by: Eugen Freiter <freiter@gmx.de> * expose addLinkedService at Service interface Signed-off-by: Eugen Freiter <freiter@gmx.de> * prepare release Signed-off-by: Eugen Freiter <freiter@gmx.de> Co-authored-by: Cody Cutrer <cody@cutrer.us> Co-authored-by: Eugen Freiter <efreiter@deloitte.de> Co-authored-by: sobeos <sobeos@gmail.com> Co-authored-by: Eugen Freiter <freiter@gmx.de> Co-authored-by: Martin Hanes <martin.hanes@gmail.com> Co-authored-by: Jiří Václavovič <jvaclavovic@gmail.com> Co-authored-by: Gert-Jan van der Heiden <gjvdspam@gmail.com> Co-authored-by: Dennis Frommknecht <dfrommi@users.noreply.github.com>
ios13 evaluate sdiscoverability (sf flag) differently than older ios and stop pairing process if this flag changes (see issue #93). this PR fix it by keeping discoverability true