maximkulkin / esp-homekit

Apple HomeKit accessory server library for ESP-OPEN-RTOS
MIT License
1.1k stars 168 forks source link

Cannot find device after removing it. #197

Closed hitenlulla closed 2 years ago

hitenlulla commented 2 years ago

Hello, I was trying something and I removed the device from my homekit by mistake, Now I'm not able to get that device on the homekit app. One solution I found was to reupload the code but it's not possible to do this again and again. As I'm planning to put this device into my ceiling and I will not be able to remove it. Is there anything that I can add in the code to fix this?

maximkulkin commented 2 years ago

So, normally when you properly unpair a device (meaning, while being on the same network and device is online and accessible) it should get back to initial mode when you can pair again. If for some reason the device wasn't accessible when you have unpaired it, the device will still be paired, even though your phone will not. For such cases people usually implement some kind of reset functionality into devices, e.g. a dedicated reset button, or holding a normal button for a long time or some other procedures (e.g. I had a lightbulb that required turning it on and off five times in a row with proper delays to reset it as it had no buttons at all).

So, I suggest you revise your firmware and implement a convenient and accessible reset functionality. Also, prefer unpairing when device is online.