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:
- Log into karaf console and run
smarthome:homekit clearPairings
- Restart openHab
- 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.
- Restart openHab again.
- Make sure you do not see the “Could not find existing MAC” message in the logs. If you do, start over.
- Repair your iOS device.
- Restart openHab to ensure it stuck.