feat(daemon): Add UPSD (NUT) protocol support, Proxmox VM shutdown action, pause/resume monitoring, and network-loss/unreachable handling; bump config version to 4.2

This commit is contained in:
2026-02-20 11:51:59 +00:00
parent 782c8c9555
commit 42b8eaf6d2
30 changed files with 2183 additions and 697 deletions

View File

@@ -34,10 +34,17 @@ export class ShutdownAction extends Action {
// CRITICAL SAFETY CHECK: Shutdown should NEVER trigger unless UPS is on battery
// A low battery while on grid power is not an emergency (the battery is charging)
// When UPS is unreachable, we don't know the actual state - don't trigger false shutdown
if (context.powerStatus !== 'onBattery') {
logger.info(
`Shutdown action skipped: UPS is not on battery (status: ${context.powerStatus})`,
);
if (context.powerStatus === 'unreachable') {
logger.info(
`Shutdown action skipped: UPS is unreachable (communication failure, actual state unknown)`,
);
} else {
logger.info(
`Shutdown action skipped: UPS is not on battery (status: ${context.powerStatus})`,
);
}
return false;
}