File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ enum customLockActions
4444
4545//Miscellaneous
4646#define HOMEKEY_COLOR TAN
47- #define SETUP_CODE "46637726" //code used for homekit setup
47+ #define SETUP_CODE "46637726" // HomeKit Setup Code (only for reference, has to be changed during WiFi Configuration or from WebUI)
4848#define OTA_PWD "homespan-ota" //custom password for ota
4949#define DEVICE_NAME "HK" //Device name
5050#define HOMEKEY_ALWAYS_UNLOCK 0 // Flag indicating if a successful Homekey authentication should always set and publish the unlock state
Original file line number Diff line number Diff line change @@ -900,8 +900,10 @@ void setupWeb() {
900900 }
901901 else if (!strcmp (p->name ().c_str (), " hk-setupcode" )) {
902902 if (strcmp (espConfig::miscConfig.setupCode .c_str (), p->value ().c_str ()) && p->value ().length () == 8 ) {
903- homeSpan.setPairingCode (p->value ().c_str ());
904- espConfig::miscConfig.setupCode = p->value ().c_str ();
903+ if (homeSpan.controllerListBegin () == homeSpan.controllerListEnd ()) {
904+ homeSpan.setPairingCode (p->value ().c_str ());
905+ espConfig::miscConfig.setupCode = p->value ().c_str ();
906+ }
905907 }
906908 }
907909 else if (!strcmp (p->name ().c_str (), " control-pin" )) {
You can’t perform that action at this time.
0 commit comments