Merge pull request #580 from iranl/reboot-on-ble-stuck
Reboot on BLE stuck disconnecting
This commit is contained in:
Submodule lib/nuki_ble updated: 51ad6d8cde...55a04473bd
@@ -4041,6 +4041,11 @@ void NukiOpenerWrapper::notify(Nuki::EventType eventType)
|
||||
{
|
||||
_preferences->putInt(preference_lock_pin_status, 2);
|
||||
}
|
||||
else if(eventType == Nuki::EventType::BLE_ERROR_ON_DISCONNECT)
|
||||
{
|
||||
Log->println("Error in disconnecting BLE client, rebooting");
|
||||
restartEsp(RestartReason::BLEError);
|
||||
}
|
||||
}
|
||||
|
||||
void NukiOpenerWrapper::readConfig()
|
||||
|
||||
@@ -4071,6 +4071,11 @@ void NukiWrapper::notify(Nuki::EventType eventType)
|
||||
{
|
||||
_preferences->putInt(preference_lock_pin_status, 2);
|
||||
}
|
||||
else if(eventType == Nuki::EventType::BLE_ERROR_ON_DISCONNECT)
|
||||
{
|
||||
Log->println("Error in disconnecting BLE client, rebooting");
|
||||
restartEsp(RestartReason::BLEError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ enum class RestartReason
|
||||
{
|
||||
RequestedViaMqtt,
|
||||
RequestedViaWebServer,
|
||||
BLEError,
|
||||
BLEBeaconWatchdog,
|
||||
RestartOnDisconnectWatchdog,
|
||||
RestartIntervalWatchdog,
|
||||
@@ -73,6 +74,8 @@ inline static String getRestartReason()
|
||||
return "RequestedViaWebServer";
|
||||
case RestartReason::ReconfigureWebServer:
|
||||
return "ReconfigureWebServer";
|
||||
case RestartReason::BLEError:
|
||||
return "BLEError";
|
||||
case RestartReason::BLEBeaconWatchdog:
|
||||
return "BLEBeaconWatchdog";
|
||||
case RestartReason::RestartOnDisconnectWatchdog:
|
||||
|
||||
Reference in New Issue
Block a user