-
Notifications
You must be signed in to change notification settings - Fork 83
Can not add bridge with iOS13? #93
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
Comments
I have the same problem |
are you running the latest code from HAP-Java, including 0201d9a ? That should fix iOS 13. If you're using it within OpenHAB, you might want to check out https://github.com/ccutrer/openhab2-addons/releases/tag/2.5.0-cody2 (but with caveats). Otherwise, you'll need to compile and drop latest HAP-Java into whatever other project yourself; there's not a new release yet. |
Pairing is not working for me, too. It seems that netty closes the connection too early. I added some Thread.sleep and it helped to get some steps further, but finally failed. |
Compiled current code but same issue :/. |
I'm having the same issue. I'm seeing the following error when I try to pair my phone to openHAB:
|
@frank-f this is with an upgraded bcprov, right? That‘s not working. |
@J-N-K I finally got the version from your repo to compile - it's that one. Edit: I downgraded bcprov in your fork back to 1.51 - it's not working like that either. |
home app has different functions for initial devices load (json parsing) and for device updates. if you have time, please try to figure out which device exactly is making issue (but trying to bridge with one device with two, etc), so that we can fix it. |
Hey nice catch. But I even tried adding a bridge without any devices and that did not work as well. :( |
and you should see the request from the phone in openhab.log |
I am not using openHAB I am using it as Library |
Honestly, I gave up with this. I installed v2.4.0-homekit-6 (https://github.com/hap-java/openhab2-addons/releases/), which didn't work with iOS 13 either. So I booted up an old iOS 12 device, added everything flawlessly on the first try and now I'm happy I have my smart home stuff working again. I have thermostats, lights (on/off and dimmable), a temperature sensor and door/window sensors - if that helps. |
I have the same issue. I use the source code from here with a simple java main (from samples branch) but i am unable to bind with my iPhone. But it seams that some kind of timeout happen. If i couple with on iPhone using iOS 12 it work but the iOS 13 devices still dont have access. I also tryed: |
i got it working. i have around 90 devices of all different types and it works perfect with ios13 as well as with latest Ipados and tvOs. if you want to give a try,
the repos |
Does not work for me :( |
ok. try to enable the logging "io.github.hapjava" = DEBUG. then you should see the JSON the library sends to home app. this JSON must not have any "null" value or values out of range (json has min/max values as well).
if you get your JSON, please paste it here, this will help us to fix the library and make it more robust. |
Like the others, 12 worked for me, 13 does not. |
Exactly. We get to the final pairing step, then the connection closes. If we add sleeps (so that the connection stays alive a little bit longer), we sometimes get to the accessories read step and fail then. |
@yfre I checked out: https://github.com/yfre/HAP-Java -b master Then i add the java main from samples and a log4j2.xml with default log level debug:
Here a tcpdum of the connection: |
thanks for details @GreenRover
it does not like spaces in the bridge name. :( and try again. |
@yfre Now i get some steps further Iphone XS IOS 13.1.3 Server:
|
Does not change anything for me as well. iPhone XS iOS 13.2.2 |
hmm. i did some tests. it does not really stable. sometimes it works, sometime it doesnt.. kind of 50/50. need to investigate further
|
@GreenRover @christiantschoerner as many are affected i want to get this fixed asap. |
@yfre (-; That worked (tested 1 times, later more tests, the add device button of my iPhone wont work any more)
|
Looks good for me too, had a chance to try it a few times. Nice work! |
ok. background: the quick fix was: do not mark as bound at all, keep it discoverable. |
Way back in iOS9, there was an issue caused by leaving the advertisement discoverable. Given the success Apple has with driving upgrades, it's probably not worth maintaining backwards compatibility with older iOS versions, but thought I'd point it out: de6822d#diff-066f526e6b621ce14b59cda4b6dc2a81 |
I agree. If this solution works on 10-13 we should be good (10 is the last to work in iPad 4 and iPhone 5s). |
So consensus is to merge #95 as-is? |
So guys what is the final result. Do we have a fix or not :D |
As i understand it it only was a temporary fix. Or is there still a final one? |
@yfre can you please update the status? |
added one more change to PR to ensure discoverability is disabled once pairing is completed. works fine with ios13 but could not test with older version. |
Okay Am I silly or where can I download this? The last "release" was in March and the last push to production was 2 months ago. And do I need to change anything special in my code? |
Switch discoverable to false once client is authenticated
Hello, |
what kind of issue you have? how the log look like?can you try with reduced number of device - e.g. try with a simple switch / light first and once it works, add other devices |
I am trying with the Sample project, with the simple MockSwitch.
|
what happening afterwards? can you see the bridge in home app ? does it ask for PIN? |
Yes, i can see the bridge in home app, and it is ask for the pin. After that nothing happen (no log record), just wheeling and timeouting the accessory (birdge) adding. |
just tried with ios13.4 and it works but maybe i have a newer version of java-hap |
Just turned off the firewall and it is working like a charm. My fault, so sorry :/ |
cool! added firewall to my checklist :) |
Doesn't work for me. Pairing completes, the service says it's re-registering, and then removeUser is called and the device says the process failed. iOS 13.3.1. I already tried with and without re-registering the service, but to no avail. What I find strange is that the request for accessories is received BEFORE the service is re-registering itself. Could this be the problem? Is there maybe a better way like updating the service instead of re-registering it (by using ServiceInfo.setText)? Or re-register the service immediately after sending the final pairing response, so that the service is ready when the next request comes? |
Update: if I remove the MockSwitch and just create the bridge, I can add the bridge successfully. So it must have something to do with the device. I already checked the JSON and it's identical to the one posted here for a successful attempt. No null or anything strange. Any idea? |
in the older iOS i had to remove "home" and create again time-to-time to get rid of some strange issues. but with ios 13.3.x i could repeat pairing many times without getting any issues. can you now add the device? without removing the bridge and home. just add device and restart the sample. |
No, I can't, because I have to search again and then the bridge isn't found, because it's paired :-( I also cleared Home completely, but that changes nothing. Any info I can provide? |
i did recently the refactoring of HAP in order to add support for optional attributes. the changes are not merged yet, but it would be interesting to know whether you get the same issue with a newer version. could you maybe try run the sample that is based on the refactored version? or build it yourself form #102 |
Hmm, the jar is only 10 kb and doesn't seem to work? And building it myself would require updating the library, too, because the sample uses parameters for createBridge that I haven't seen before ;-) |
you are right. the libs are missing. |
Hmm, ok, that one works, so the error is probably somewhere on my side. Ok, here's what I'm trying to do: I'm triyng to get HAP-Java working with IKVM in C#/.NET. Which seems to work for the most part, but I have no idea why it fails on this "small" detail. If you have time, I have put the logs of both your sample and mine (using the same, cross-compiled 2.0 jar). Apart from the logging difference, I can't make out much difference, only that your's works and mine doesn't :-( |
After numerous attempts and switching of library versions, I finally got it working. In the end, the problem was one single character in the Json file ;-) I returned a .NET bool for the power state, which converted to "False" instead of "false". doh ;-) |
Hi, I hope I didn't miss it in the discussion: in which version is this expected to be fixed? As far as I can tell right now, I tried both 1.1.3 and then 1.1.5 and in both of them the pairing does not work with iOS 13.x. It happened to me once from like 20-30 attempts that it worked, but it was literally just once. Is there a plan to port the fix to the original 1.1.x "beowulfe" series? Or do I have to eventually migrate to the 1.2.x series? I am using HAP Java 1.1.x as a "driver" for HAP Scala and my derived personal projects. |
Probably never mind. So far it seems that the migration to 1.2 is extremely smooth. I will hopefully not need the older versions. (But maybe somebody else will?) |
* 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>
closing as obsolete |
Since iOS 13 I can not add the bridge. With iOS 12 it works. Is there anything new what is should be aware of? The iPhone says it can not be added because it could not connect to the device. Thanks for help and thank you for the project!
The text was updated successfully, but these errors were encountered: