Restart modem: pause Smart Power auto power-cycle until the modem is back
Lint / JS (eslint) (push) Successful in 14s
Lint / Python (flake8) (push) Successful in 1m5s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Security / Python Security (bandit) (push) Successful in 1m13s
Lint / Python (flake8) (pull_request) Successful in 1m14s
Test / Python Tests (pytest) (push) Successful in 1m51s
Security / Python Security (bandit) (pull_request) Successful in 1m25s
Lint / JS (eslint) (pull_request) Successful in 19s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Test / Python Tests (pytest) (pull_request) Successful in 1m32s
Lint / JS (eslint) (push) Successful in 14s
Lint / Python (flake8) (push) Successful in 1m5s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Security / Python Security (bandit) (push) Successful in 1m13s
Lint / Python (flake8) (pull_request) Successful in 1m14s
Test / Python Tests (pytest) (push) Successful in 1m51s
Security / Python Security (bandit) (pull_request) Successful in 1m25s
Lint / JS (eslint) (pull_request) Successful in 19s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Test / Python Tests (pytest) (pull_request) Successful in 1m32s
UniFi Smart Power on the RPDU's modem outlet saw the internet down while the modem rebooted and cut its power mid-boot: once during the 11-20 restart and twice after the 11-24 AT&T-app reboot. UniFi only exposes auto power-cycle as on or off, so the button now turns it off for every outlet that has it on, and the monitor turns it back on when the restart ends (back, or after 30 minutes). - UnifiClient.auto_power_cycle_outlets / set_auto_power_cycle: sends the device's outlet_overrides back with only cycle_enabled changed, then reads them again to confirm. The only UniFi setting Gandalf changes. - A failed pause doesn't stop the restart; a failed restart turns it back on. A failed restore is retried every cycle and shown as broken in Needs attention until it works. - The panel note and confirm text mention the pause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a7792063ba
commit
a5d4fc3156
9 files changed
+304
-19
No files matched your search
@@ -555,11 +555,20 @@ for read-only checks, stored in `monitor_state.modem_checks`:
|
||||
1. switches the `uptime_kuma` maintenance window on (if that fails it stops and asks whether to go on
|
||||
without it),
|
||||
2. starts Gandalf maintenance (a global suppression for up to 20 minutes, shown in the banner),
|
||||
3. posts the gateway's Restart Device form. If that fails, steps 1 and 2 are undone.
|
||||
3. pauses UniFi Smart Power auto power-cycle on every outlet that has it on (the modem's RPDU outlet).
|
||||
Otherwise Smart Power sees the internet down while the modem boots and cuts its power mid-boot,
|
||||
turning one restart into two or three. If the pause fails, the restart still goes ahead.
|
||||
4. posts the gateway's Restart Device form. If that fails, steps 1 to 3 are undone.
|
||||
|
||||
The monitor then waits for the gateway to answer with its WAN up and an uptime showing it restarted
|
||||
(at least 3 minutes later), switches the Kuma window off, ends the suppression, and records how long it
|
||||
took (`monitor_state.modem_restart`). After 30 minutes it ends both regardless. One restart at a time.
|
||||
(at least 3 minutes later), switches the Kuma window off, ends the suppression, turns auto power-cycle
|
||||
back on, and records how long it took (`monitor_state.modem_restart`). After 30 minutes it ends all three
|
||||
regardless. One restart at a time.
|
||||
|
||||
Auto power-cycle is the only UniFi setting Gandalf ever changes. It sends the outlet's settings back
|
||||
with only `cycle_enabled` changed and reads them again to confirm. If turning it back on fails, the
|
||||
monitor retries every cycle, and Needs attention shows it as broken until it succeeds. A modem reboot
|
||||
from the AT&T app isn't covered, so Smart Power can still interrupt one; use the button instead.
|
||||
|
||||
The login posts md5(access code + nonce), as the gateway's own page does, so the code itself is never sent.
|
||||
The session is kept between checks and renewed when it expires. A refused code is reported in Needs
|
||||
|
||||
Reference in new issue
Block a user