Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add APC UPS widget #4840

Merged
merged 6 commits into from
Mar 2, 2025
Merged

Feature: Add APC UPS widget #4840

merged 6 commits into from
Mar 2, 2025

Conversation

nicupavel
Copy link
Contributor

Proposed change

This adds a widget for APC/Schneider UPS products using apcupsd. It shows UPS status, LOAD, Battery level, and running time left in case of power-failure.
It's a lighter alternative to monitor APC UPS than PeaNUT + NUT combo for systems with lower resources.

image

Closes #4426

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Documentation only
  • Other (please explain)

Checklist:

  • If applicable, I have added corresponding documentation changes.
  • If applicable, I have reviewed the feature / enhancement and / or service widget guidelines.
  • I have checked that all code style checks pass using pre-commit hooks and linting checks.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. There are some obvious issues with the PR, doesn’t seem like anything major. And I have to ask, was this written partly or mostly by AI?

since I don’t have an APC UPS, please provide some example output from the device to test with.

@nicupavel
Copy link
Contributor Author

And I have to ask, was this written partly or mostly by AI?

No.

since I don’t have an APC UPS, please provide some example output from the device to test with.

  1. Download apcups_output.dmp (binary output from apcupsd)
  2. Run: socat -U TCP4-LISTEN:3551,reuseaddr,fork OPEN:apcups_output.dmp
  3. Test: socat -t 4 - tcp:127.0.0.1:3551
  4. Edit services.yaml apcups widget with URL: TCP://127.0.0.1:3551

Should see this data on the widget:
image

@shamoon shamoon enabled auto-merge (squash) March 2, 2025 15:29
Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Screenshot 2025-03-02 at 7 28 44 AM

@shamoon shamoon merged commit fdf405f into gethomepage:dev Mar 2, 2025
5 checks passed
@nicupavel
Copy link
Contributor Author

Thank you!

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