[SOLVED] HomeKit Integration - Pairing Problems (iOS 10 - iOS 14)

Hi Guys,

today i updated to Openhab 3.0 and still was facing problems with Homekit Pairing!
But i’ve done it twice today :smiley:

My Steps:

  1. Delete Homekit in Openhab & Delete OH-Bridge from the IOS HOME App

  2. Stop Openhab
    sudo systemctl stop openhab

  3. Delete all Homekit Files
    sudo find / -name homekit*
    (delete all Homekit related files, had some “lib/openhab2” files too)
    rm -r /var/lib/openhab/config/org/openhab/homekit.config
    rm -r /var/lib/openhab/jsondb/homekit.json
    and so on…

  4. Delete Cache
    sudo openhab-cli clean-cache

  5. Delete all Homekit Backups
    /var/lib/openhab/jsondb/backup
    rm -r 1608xxxxxxxx–homekit.json

  6. Start Openhab
    sudo systemctl start openhab

  7. Install Homekit

  8. Setup Homekit and Restart OH

  9. Get into Console / Karaf
    sudo ssh openhab@localhost -p 8101

  10. Check if Homekit is running (Console)
    list | grep Homekit
    homekit (gives you Usage Info)

  11. Optional: Check for Homekit Items (Console)
    openhab:homekit list

  12. Set Trace (Console)
    log:set TRACE io.github.hapjava

  13. Check the Log (most Important Step) (Console)
    log:tail io.github.hapjava (Keep the Window open)

  14. Home.app add OH Bridge
    you should see some stuff in the Log/Console

  15. Check Error in Log
    i was getting *“Terminated homekit connection from… Bad Client Credentials” all the time

  16. The current Pin didn’t work and i tried all my previous Pins -> SUCCESS
    then i missclicked in the OH homekit settings and pressed save with another Pin and i lost the connection again :smiley: damn

and did it again, but without uninstalling Homekit, maybe that works too.

  1. Delete Bridge on IOS
  2. Stop Openhab
  3. Delete every Homekit File (incl. Backups)
  4. start Openhab
  5. Console -> Clear Pairings
    openhab:homekit clearPairings
  6. setup a new Pin and check if IP Address is correct ( lost it twice )
  7. save and check nano /var/lib/openhab/config/org/openhab/homekit.config
    looks like this
:org.apache.felix.configadmin.revision:=L"3"
networkInterface="192.168.xxx.xxx"
service.pid="org.openhab.homekit"
  1. Pair again
  2. enjoy (the current Pin in the Setting works for me now )

So keep your old PINs in mind :smiley:

openhab is using old backup stuff, even when you reinstall homekit as you can see here, so delete them. ( Step 4 )

4 Likes