maximkulkin / esp-homekit

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

Add auto configuration via QRcode. #33

Closed cduvenhorst closed 6 years ago

cduvenhorst commented 6 years ago

This adds support for the auto configuration via QRCode scanning. Therefore it calculates and advertises a setup hash, which is based on the accessory identifier and an setupID.

To support QRCode creation and display, a setup URI is generated and passed to a new callback function.

The main use case however will be to set the password and the setupID and use a pre-rendered qrcode.

renssies commented 6 years ago

Nice, I was about to implement this myself but was running into issues creating a base36 payload. But good job!

renssies commented 6 years ago

@cduvenhorst why did you close this PR?

cduvenhorst commented 6 years ago

Lack of interest.

renssies commented 6 years ago

Hmm ok, but you are still working on it in your own fork I see?

MrUrdam commented 6 years ago

Why lack of interest. This would be a great feature!!! I’m really hoping for a implementation in master

cduvenhorst commented 6 years ago

Ok. Somehow the 4 char setupIdentifier has to be persistent between device restarts. No big deal if you set it in the config. But if it is generated, it must be stored in the flash. Just like the accessoryID.

renssies commented 6 years ago

Can't you just re-use the accessory ID code for that?

C44Supra commented 5 years ago

Any hints on how to create these codes? I've got the simulator and I have the sample led_strip_animated running but I'm unsure about how to proceed.

cduvenhorst commented 5 years ago

Have a look at my QRCode PoC https://github.com/cduvenhorst/sonoff-s20-homekit/blob/master/README.md