swttt / com.swttt.homekit

Homekit for Homey
https://apps.athom.com/app/com.swttt.homekit
GNU Affero General Public License v3.0
35 stars 20 forks source link

Devices are missing in the Apple Home app after Homey restart (PTP) #248

Closed dirkg173 closed 1 year ago

dirkg173 commented 1 year ago

Hi @robertklep, this morning I updated the Philips Hue, without the bridge app to test v2.0.42 (changelog: Updated Homey Zigbee modules). Because of some problems with mostly all ZigBee devices after disconnecting 3 ZigBee devices from power and connecting them again (I know that this is not supposed to be done, but this was needed due to maintenance work), I performed a PTP. After Homey was up and running again and there were no more problems with the ZigBee devices, I wanted to switch on a ZigBee smart plug via Siri. However, Siri resp. Apple Home didn't knew this device anymore. So I looked in the Apple Home app and noticed that all Philips Hue and Lidl ZigBee devices, and all virtual devices from the Device Capabilities app were missing, but other ZigBee devices from Aqara, INNR and IKEA were still there. According to the HomeyKit app, these missing devices (Philips, Lidl, Device Capabilities) were also not added, but this was the case before the PTP. When I noticed this I remembered that after the last Homey firmware update (v8.1.0), devices were also missing in the Apple Home app. However, I did not pay close attention which devices they were. I'm still on v4.1.10. Could the problem be fixed with the test version (because changelog: 4.2.1 Fix storage issues)?

Thx in advance Dirk

(Sorry for the long back story.)

robertklep commented 1 year ago

With "not added", do you mean on the App Settings page? And when you add a device, does it show up on in the Home app again?

The test version is only relevant if you're running iOS 16.2 (which is currently in beta).

dirkg173 commented 1 year ago

Right, with "not added" I mean on the HomeyKit App Setting page. So you have to add the devices again. And yes, after adding the devices again in the HomeyKit App Settings, the devices are also back in the Apple Home app in the default room.

robertklep commented 1 year ago

Not entirely sure how that could have happened.

To give a bit of background on how HomeyKit works: after a Homey reboot, it will first wait until there are no more devices being added (as long as apps are still being started up, they will add their devices to Homey).

Then it expose all devices to HomeKit if they were previously also exposed to HomeKit. Also for new devices: if HomeyKit can handle them they will default to "expose to HomeKit".

The only reason it will mark a device as "don't expose to HomeKit" is when it thinks it's unable to handle the device, which is apparently what happened in your case, but I don't see how that could happen with devices that were previously working fine.

As you know, I'm working on a complete rewrite that should be more robust, so I would suggest switching to that app once it's available (I'm quite close to a first test version, hopefully somewhere in the upcoming days depending on how long it will take Athom to approve the app).

dirkg173 commented 1 year ago

Hi @robertklep, thanks for the explanation. Today I installed the HomeKitty App (v1.0.1) and deinstalled the HomeyKit app, but I didn't restarted Homey until now. I will have a look on it, when I restart Homey the next time. Therefore, I am closing this request. BR Dirk