Need to reset HomeKit pairing at every launch

The mapdb hack was actually a coincidence, and actually didn’t do anything. The problem stems from a race condition in HomeKit. The steps to get it to work consistently are as follows:

  1. Log into karaf console and run smarthome:homekit clearPairings
  2. Restart openHab
  3. Check logs for [WARN ] [nhab.io.homekit.internal.HomekitImpl] - Could not find existing MAC in org.eclipse.smarthome.storage.json.JsonStorage. Generating new MAC. This will require re-pairing of iOS devices.
  4. Restart openHab again.
  5. Make sure you do not see the “Could not find existing MAC” message in the logs. If you do, start over.
  6. Repair your iOS device.
  7. Restart openHab to ensure it stuck.
3 Likes