Yurik72 / ESPHap

ESP32/ESP8266 Arduino library for native Apple Homekit Accessory Protocol (HAP)
MIT License
265 stars 60 forks source link

Clear pairing information #102

Closed a11009 closed 3 years ago

a11009 commented 3 years ago

I'm sorry to bother you . My C language is poor , so i can not clear pairing information. I would appreciate you if you can help me package a function or teach me some details in order to remove the pairing information ? Thank you very much .

init_hap_storageReaded bytes ->1409

HomeKit: init_storage_ex size 0x581 Home Integration: hap_services added chararacteristic 0: 00000023-0000-1000-8000-0026BB765291 Home Integration: hap_services added chararacteristic 1: 00000025-0000-1000-8000-0026BB765291 Home Integration: hap_init_homekit_server library version v1.1 Home Integration: homekit_is_paired 1 HomeKit: Starting server HomeKit: Using existing accessory ID: 29:CA:D3:95:26:75 HomeKit: Found admin pairing with 5F24A199-146E-4BEA-9908-E8DC95FAA940, disabling pair setup HomeKit: Configuring mDNS

a11009 commented 3 years ago

When i try to add SPIFFS.remove("/pair.dat"); to the code,the problem seems to have been solved。

Yurik72 commented 3 years ago

There are a few possibility to remove existing pairings:

  1. When device is online (connected to Wifi) pairing can be removed from Apple Home App. Just remove deivice. But if device is not online pairing will no be removed on device and you need next steps..
  2. You can remove pairing.dat from the web interface , see readme section
  3. You can remove pairing.dat from the code (you exactly mentioned about that) and as well some logic can be implemented. Like long press on the some button can trigger removing pairing.dat
a11009 commented 3 years ago

Okey,I have already solved this problem,thanks your reply.

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年8月2日(星期一) 中午1:42 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Yurik72/ESPHap] Clear pairing information (#102)

There are a few possibility to remove existing pairings:

When device is online (connected to Wifi) pairing can be removed from Apple Home App. Just remove deivice. But if device is not online pairing will no be removed on device and you need next steps..

You can remove pairing.dat from the web interface , see readme section

You can remove pairing.dat from the code (you exactly mentioned about that) and as well some logic can be implemented. Like long press on the some button can trigger removing pairing.dat

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.