AchimPieters / ESP8266-HomeKit-Motion-Sensor

ESP8266 – HomeKit Motion Sensor
MIT License
7 stars 4 forks source link

Homekit Configuration Code not accepted #1

Closed gerardwr closed 4 years ago

gerardwr commented 4 years ago

Hi,

I have been trying some of your Homekit projects on an ESP8266.

For instance, the ESP8266-Homekit_Switch works nicely. The documentation is excellent, and downloading the firmware and adding the device in the Home App using the QRCODE works fine.

But the ESP8266-Homekit-Motion-Sensor binary fails in the IOS Home App:

Would appreciate if you can help me solve this issue.

Kind regards, Gerard.

Schermafbeelding 2019-09-28 om 18 36 13
AchimPieters commented 4 years ago

@gerardwr I just made a quick setup and tested it once again, but it works fine. You probably didn't scan the QR Code, it's in the folder images. Here is the direct link.

https://raw.githubusercontent.com/AchimPieters/ESP8266-HomeKit-Motion-Sensor/master/images/qrcode.png

The blog on https://studiopieters isn't posted yet.

gerardwr commented 4 years ago

Hello Achim,

Thanks for your help.

You're right, I thought the QR code was missing so I thought I could use the password code 558-98-144 from main.c.

With the QR code from the images folder, adding the Motion Sensor to the Home App works without problems.

Output from the Arduino Serial Monitor below shows that the Motion Sensor on GPIO12 is working.

Appreciate your help, thanks for sharing your work and knowledge.


13:59:35.563 -> mDNS announcement: Name=Motion Sensor-9F812A-D509 md=Motion Sensorpv=1.0id=D5:09:7A:1C:91:70c#=1s#=1ff=0sf=0ci=10sh=j8gDnQ== Port=5556 TTL=4500
13:59:35.992 -> >>> HomeKit: Got new client connection: 4
13:59:35.992 -> >>> HomeKit: [Client 4] Pair Verify Step 1/2
13:59:36.438 -> >>> HomeKit: [Client 4] Pair Verify Step 2/2
13:59:36.438 -> >>> HomeKit: [Client 4] Found pairing with 79D9ADAF-20C1-461B-9A5F-3C6E47592998
13:59:36.583 -> >>> HomeKit: [Client 4] Verification successful, secure session established
13:59:36.618 -> >>> HomeKit: [Client 4] Get Accessories
13:59:36.909 -> >>> HomeKit: [Client 4] Update Characteristics
13:59:36.909 -> >>> HomeKit: [Client 4] Update Characteristics
13:59:36.944 -> >>> HomeKit: [Client 4] Get Characteristics
14:00:07.120 -> Motion Detected on 12
14:00:07.120 -> Motion Stopped on 12
14:00:07.158 -> Motion Stopped on 12
14:00:07.158 -> Motion Detected on 12
gerardwr commented 4 years ago

For any other readers : I just learned that the QR code must be generated with a special tool using the password and setUpId information in the main.c code.

Details here :https://github.com/maximkulkin/esp-homekit/tree/master#qr-code-pairing

AchimPieters commented 4 years ago

@gerardwr I already described that part here: https://www.studiopieters.nl/esp-homekit-sdk-qr-code