Skip to content

UPS over USB (Network UPS Tools) - #110

Merged
UniqueDroid merged 3 commits into
mainfrom
feat/ups
Nov 1, 2026
Merged

UniqueDroid merged 3 commits into
mainfrom
feat/ups

Conversation

@UniqueDroid

Copy link
Copy Markdown
Owner

New system app nut (NUT 2.8.5: usbhid-ups, nutdrv_qx, blazer_usb, upsd, upsmon, upsc; 0.7 MB, flash: true) and its controller shareos-ups.

  • Everything runs as root from /tmp/shareos-ups (NUT_CONFPATH/NUT_STATEPATH); the drivers are started directly (-a ups), so the system app's bin/ layout works without upsdrvctl.
  • Shutdown policy: low (UPS's own LB), percent (ignorelb + override.battery.charge.low), minutes (timer started on ONBATT, cancelled on ONLINE, upsmon -c fsd if still OB). SHUTDOWNCMD arms the power schedule's wake-up and powers off.
  • killpower: POWERDOWNFLAG → S05board stop runs <driver> -k as the very last step (offdelay 30 s, ondelay 40 s), so the box comes back with the power.
  • Events → shareos-notify (de/en) and an event list in the UI. Optional NUT server (LISTEN 0.0.0.0/::, user monitor secondary).
  • NUT built --without-ssl via external.mk (otherwise 4.4 MB libssl/libcrypto in the package).
  • Tests: tests/test-ups.sh (20 checks, fake NUT programs, in backend-tests). NUT itself built locally for the target; not tested with a real UPS yet.

Generated by Claude Code

Status, messages on power events, clean shutdown on battery (low battery,
a percentage or minutes on battery), UPS output switched off afterwards
(S05board), NUT server for other computers. NUT without OpenSSL.
Services -> UPS in the interface, rpcd shareos.ups, tests/test-ups.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmfmQxsE59Ms99VrbCi1J1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmfmQxsE59Ms99VrbCi1J1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmfmQxsE59Ms99VrbCi1J1
@UniqueDroid
UniqueDroid merged commit 01b712c into main Nov 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants