Fix permit join not reset to 0
After a lights or sensor search is done it could take up to 30 minutes until the permit join variable was reset. The network was actually closed but the last set value was reported not the active one.
@@ -233,6 +233,14 @@ void DeRestPluginPrivate::permitJoinTimerFired()
return;
}
+ auto ctrlPermitJoin = apsCtrl->getParameter(deCONZ::ParamPermitJoin);
+ if (ctrlPermitJoin > 0 && gwPermitJoinDuration == 0)
+ {
+ // workaround since the firmware reports cached value instead hot value
+ apsCtrl->setPermitJoin(gwPermitJoinDuration);
+ permitJoinLastSendTime = {}; // force broadcast
+ }
+
// if (gwPermitJoinDuration == 0 && otauLastBusyTimeDelta() < (60 * 5))
// {
// // don't pollute channel while OTA is running
