Skip to content

feat: add NUT (Network UPS Tools) integration base#126

Open
RoiArthurB wants to merge 1 commit intodevfrom
feat/nut-integration-11356153773324197732
Open

feat: add NUT (Network UPS Tools) integration base#126
RoiArthurB wants to merge 1 commit intodevfrom
feat/nut-integration-11356153773324197732

Conversation

@RoiArthurB
Copy link
Contributor

@RoiArthurB RoiArthurB commented Mar 9, 2026

This PR introduces the base system for integrating UPS monitoring using Network UPS Tools (NUT). It leverages the modern nut-client package and its Monitor class to listen for UPS events such as ONBATT, ONLINE, and LOWBATT.

When the Controller initializes, it will instantiate NutManager. The manager checks if the specified UPS is available; if not, it gracefully exits and cleans itself up. Stub functions have been added to log events and outline future implementations like executing server shutdowns or turning off connected VR headsets via ADB.

Related #74


PR created automatically by Jules for task 11356153773324197732 started by @RoiArthurB

* Install modern `nut-client` library.
* Add default `.env` configuration (NUT_HOST, NUT_PORT, NUT_UPS_NAME).
* Create `NutManager` to handle UPS connections and monitor `ONBATT`, `ONLINE`, and `LOWBATT` events.
* Integrate `NutManager` into `Controller` initialization and restarts.
* Add list of possible features to implement inside the stub handle methods of `NutManager`.
* Gracefully warn and cleanup the class when no UPS is available.

Co-authored-by: RoiArthurB <16764085+RoiArthurB@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

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.

1 participant