Closed Ceda closed 3 years ago
Seeing the same thing; pairing is much improved, but doesn't persist after reboot. I think this may be a regression in 1.0.7
Ok, Firts will answer for the original issue from Ceda. In the provided logs I'm clearly see that problem is related to store pairing information into the pair.dat
Failed to open pair.dat
>>> HomeKit: key saved
>>> HomeKit: Generated new accessory key
Failed to open pair.dat
Means that ESP can't write file and defintelly that reason is problem to keep pairing information So my suggestion is check compilation setting. For instance correct are:
ESP8266 v2.7.4 (in Boards Manager) Board: NodeMCU 1.0 (ESP-12E Module) - Note, this is a NodeMCU v1.0 Rev2.0 (192.168.1.155) CPU Freq: 120MHz Flash Size: 4MB (FS:2MB oTA:~1019KB) Debug port: Disabled Debug level: None IwIP Variant: v2 Higher Bandwidth VTables: Flash Exceptions: Legacy (new can return nullptr) Erase Flash: Only Sketch
Than check why you can't write/read from the SPIFFS. This are basic things and not exactly related to the library ASs well you can provide me a full sketch which you are trying to use
Seeing the same thing; pairing is much improved, but doesn't persist after reboot. I think this may be a regression in 1.0.7
Hello , could you provide me a sketch which are reproduciong that. v1.0.7 doesn't contain any changes to keepm pairing. But definetelly i will check
Ok, Firts will answer for the original issue from Ceda. In the provided logs I'm clearly see that problem is related to store pairing information into the pair.dat
Failed to open pair.dat >>> HomeKit: key saved >>> HomeKit: Generated new accessory key Failed to open pair.dat
Means that ESP can't write file and defintelly that reason is problem to keep pairing information So my suggestion is check compilation setting. For instance correct are:
ESP8266 v2.7.4 (in Boards Manager) Board: NodeMCU 1.0 (ESP-12E Module) - Note, this is a NodeMCU v1.0 Rev2.0 (192.168.1.155) CPU Freq: 120MHz Flash Size: 4MB (FS:2MB oTA:~1019KB) Debug port: Disabled Debug level: None IwIP Variant: v2 Higher Bandwidth VTables: Flash Exceptions: Legacy (new can return nullptr) Erase Flash: Only Sketch
Than check why you can't write/read from the SPIFFS. This are basic things and not exactly related to the library ASs well you can provide me a full sketch which you are trying to use
Hi, thanks for reply... Trying change board settings and didn't help :/ Still can't write/open pair.dat
Board settings:
Sketch: EspHap_RGB_Motion.ino.zip
Ok, Let's try one of the following
if (!SPIFFS.begin()) {
#endif
Serial.print("SPIFFS Mount failed");
}
Insert
```c
if (SPIFFS.format())
{
Serial.print("SPIFFS FORMATTED");
}
Than try to execute sketch one time and see a result, in case of sucess formating you need remove those lines and use ESP
Ok, Let's try one of the following
- After lines
if (!SPIFFS.begin()) { #endif Serial.print("SPIFFS Mount failed"); }
Insert
if (SPIFFS.format()) { Serial.print("SPIFFS FORMATTED"); }
Than try to execute sketch one time and see a result, in case of sucess formating you need remove those lines and use ESP
- Try to upload any small file within ESP8266 Sketch Data Upload, it should as well make a format
Just trying ESP8266 Sketch data upload and find pairing is successful. Thanks for help 👍
>>> HomeKit: Using existing accessory ID: 8B:32:F6:A8:2C:59
>>> HomeKit: find pairings
>>> HomeKit: Found admin pairing with E5D14223-5021-47D6-BE9A-A9F83244461E, disabling pair setup
But pairing on esp8266 still not work ideally :/ After delete pairing file trought filebrowse, next pairing is ok..
>>> HomeKit: Got new client connection: local 192.168.0.115:5556, remote 192.168.0.193:50842
>>> HomeKit: [Client 1073694852] Got 129 incomming data, encrypted is
>>> HomeKit: [Client 1073694852] Pair Setup Step 1/3
>>> HomeKit: [Client 1073694852] Got 582 incomming data, encrypted is
>>> HomeKit: [Client 1073694852] Pair Setup Step 2/3
>>> HomeKit: [Client 1073694852] Computing SRP shared secret
>>> HomeKit: [Client 1073694852] Verifying peer's proof
>>> HomeKit: [Client 1073694852] Generating own proof
>>> HomeKit: [Client 1073694852] Got 284 incomming data, encrypted is
>>> HomeKit: [Client 1073694852] Pair Setup Step 3/3
>>> HomeKit: Added pairing with E5D14223-5021-47D6-BE9A-A9F83244461E
>>> HomeKit: Free saved_preinit_pairing_context
>>> HomeKit: Configuring mDNS
>>> HomeKit: MDNS.restart: EspLed-E64C, IP: 192.168.0.115
>>> HomeKit: MDNS.begin: EspLed-E64C, IP: 192.168.0.115
>>> HomeKit: [Client 1073694852] Successfully paired
>>> HomeKit: [Client 1073694852] Disconnected!
>>> HomeKit: Free heap: 29392
>>> HomeKit: [Client 1073694852] Closing client connection
>>> HomeKit: WiFiServer receives a new client (current 0, max 4)
>>> HomeKit: Got new client connection: local 192.168.0.115:5556, remote 192.168.0.193:50843
>>> HomeKit: [Client 1073694884] Got 162 incomming data, encrypted is
>>> HomeKit: [Client 1073694884] Pair Verify Step 1/2
>>> HomeKit: Free heap: 27888
>>> HomeKit: [Client 1073694884] Got 251 incomming data, encrypted is
>>> HomeKit: [Client 1073694884] Pair Verify Step 2/2
>>> HomeKit: [Client 1073694884] Found pairing with E5D14223-5021-47D6-BE9A-A9F83244461E
>>> HomeKit: [Client 1073694884] Verification successful, secure session established
>>> HomeKit: Free heap: 27824
>>> HomeKit: [Client 1073694884] Disconnected!
>>> HomeKit: Free heap: 29752
>>> HomeKit: [Client 1073694884] Closing client connection
But pairing on esp8266 still not work ideally :/ After delete pairing file trought filebrowse, next pairing is ok..
Looks you are using wrong version . Pairing bug is fixed in #37 , commit But pairing on esp8266 still not work ideally :/ After delete pairing file trought filebrowse, next pairing is ok..
check commit https://github.com/Yurik72/ESPHap/commit/8d7a33d2a30e701cc5f7e0329db8abde7ca6bd3e In your logs i do not see those changes Due to
HomeKit: Configuring mDNS HomeKit: MDNS.restart: EspLed-E64C, IP: 192.168.0.115 HomeKit: MDNS.begin: EspLed-E64C, IP: 192.168.0.115 HomeKit: [Client 1073694852] Successfully paired
Mdn is trying init again... Please make sure that you have right version
But pairing on esp8266 still not work ideally :/ After delete pairing file trought filebrowse, next pairing is ok..
Looks you are using wrong version . Pairing bug is fixed in #37 , commit But pairing on esp8266 still not work ideally :/ After delete pairing file trought filebrowse, next pairing is ok..
check commit 8d7a33d In your logs i do not see those changes Due to
HomeKit: Configuring mDNS HomeKit: MDNS.restart: EspLed-E64C, IP: 192.168.0.115 HomeKit: MDNS.begin: EspLed-E64C, IP: 192.168.0.115 HomeKit: [Client 1073694852] Successfully paired
Mdn is trying init again... Please make sure that you have right version
It is strange. I am on master.
commit e59cab2e84cce987d8167679e513e016edee3689 (HEAD -> master, upstream/master, origin/master)
Author: yurik972 <yurik.kovalenko@gmail.com>
Date: Fri Feb 12 15:04:56 2021 +0200
small fixes
commit 3d69c496c111ae782291e1fcf5de2ac0d6407237
Author: yurik972 <yurik.kovalenko@gmail.com>
Date: Thu Feb 11 19:03:32 2021 +0200
typo
Very strange, just checked twice and paired without any problem Latest commit is https://github.com/Yurik72/ESPHap/commit/148660a97d0128aa96dfd76c4849d7af0b9fc9f1
Send me a log pls
I apologize for the confusion, i just update repo, but not library in arduino folder... Now pairing work great... Many thanks and closing issue...
Seeing the same thing; pairing is much improved, but doesn't persist after reboot. I think this may be a regression in 1.0.7
Hello , could you provide me a sketch which are reproduciong that. v1.0.7 doesn't contain any changes to keepm pairing. But definetelly i will check
Follow up: I re-installed the library, I'm no longer having this issue! Not sure if I was mistakenly using an outdated version or something.
Hi, just trying new release 1.7, and pairing work better then in older release, but not every try.. Now I'm experimenting with RGB motion example.. After success pairing device work, but after restart i can't reconnect and device not responding.
Looks like problem in older release, after Pair Verify Step is disconnected.
Thx for help and great project! I use on few devices original Maxim project and looking for alternative which offers more and simpler use third party libs and it is your project.. ;)
Log after restart...
Full log