diff --git a/composer.json b/composer.json index 721f4ab..e3f26d7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dashboard/unifi", "description": "UniFi network management, WiFi stats, and captive portal authentication for the Dashboard platform", - "version": "1.10.0", + "version": "1.10.1", "type": "library", "license": "MIT", "autoload": { diff --git a/src/Console/RotatePasswords.php b/src/Console/RotatePasswords.php index 8468b54..4f39516 100644 --- a/src/Console/RotatePasswords.php +++ b/src/Console/RotatePasswords.php @@ -104,6 +104,18 @@ class RotatePasswords extends Command ]); } } catch (\Throwable $e) { + // "Not found" in a sibling just means the + // PPSK isn't mirrored on that band — totally + // normal if GUEST was only configured on one + // band. Skip quietly; don't poison the + // run status. + if (str_contains($e->getMessage(), 'not found')) { + \Illuminate\Support\Facades\Log::info('unifi.ppsk_sibling_skipped', [ + 'sibling_wlan' => $siblingWlanId, + 'ppsk_name' => $ppsk->name, + ]); + continue; + } $this->error("Sibling rotate failed for wlan {$siblingWlanId}: {$e->getMessage()}"); $failedPpsks[] = ['name' => $ppsk->name . ' (sibling wlan ' . $siblingWlanId . ')', 'error' => $e->getMessage()]; } diff --git a/src/Http/Controllers/WifiController.php b/src/Http/Controllers/WifiController.php index 7ac9f66..fdd0beb 100644 --- a/src/Http/Controllers/WifiController.php +++ b/src/Http/Controllers/WifiController.php @@ -314,7 +314,11 @@ class WifiController extends Controller ]); } } catch (\Throwable $e) { - \Illuminate\Support\Facades\Log::warning('unifi.ppsk_sibling_update_failed', [ + // PPSK absent on this band is fine — just + // means it isn't mirrored. Anything else + // gets warning-logged. + $level = str_contains($e->getMessage(), 'not found') ? 'info' : 'warning'; + \Illuminate\Support\Facades\Log::log($level, 'unifi.ppsk_sibling_update', [ 'sibling_wlan' => $siblingWlanId, 'error' => $e->getMessage(), ]);