Skip to content

upsset.c: Recognize RANGE NUMBER and NUMBER types.#3164

Merged
jimklimov merged 4 commits intonetworkupstools:masterfrom
atanas-vladimirov:master
Nov 9, 2025
Merged

upsset.c: Recognize RANGE NUMBER and NUMBER types.#3164
jimklimov merged 4 commits intonetworkupstools:masterfrom
atanas-vladimirov:master

Conversation

@atanas-vladimirov
Copy link
Copy Markdown
Contributor

upsrw on Masterguard A1000/A2000 reports:

$ upsrw attic -l                                                     
[battery.packs]
Number of battery packs
Type: RANGE NUMBER
Option: "0-2" SELECTED

[device.uptime]
Device uptime in seconds
Type: NUMBER
Value: 84433

[driver.debug]
Current debug verbosity level of the driver program
Type: NUMBER
Value: 0

[driver.flag.allow_killpower]
Safety flip-switch to allow the driver daemon to send UPS shutdown command (accessible via driver.killpower)
Type: NUMBER
Value: 0

[output.voltage.nominal]
Nominal output voltage (V)
Type: ENUM NUMBER
Option: "220"
Option: "230" SELECTED
Option: "240"

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: RANGE NUMBER
Option: "0-5940" SELECTED

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: RANGE NUMBER
Option: "0-599940" SELECTED

[ups.id]
UPS system identifier
Type: RANGE NUMBER
Option: "0-99" SELECTED

This commit makes upsset to recognize RANGE NUMBER and NUMBER types.

Tested on Masterguard A1000 and A2000 units.

Signed-off-by: Atanas Vladimirov vladimirov.atanas@gmail.com

Tested on Masterguard A1000 and A2000 units.

Signed-off-by: Atanas Vladimirov <vladimirov.atanas@gmail.com>
…s#3164]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added this to the 2.8.5 milestone Nov 8, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 8, 2025

Dist and Docs NUT-tarballs-master.zip are available for commit c1c3d7f

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 8, 2025

Dist and Docs NUT-tarballs-PR-3164.zip are available for commit 6864b38

@jimklimov
Copy link
Copy Markdown
Member

FYI: I found what this reminds me about: #2525

Also, for future PRs, it is recommended to make separate branches for each feature (not post PRs from your master branch). On one hand, for larger contributions, the back-and-forth to get them reviewed, tested and merged can take a while - compromising your own ability to update your master branch to build recent upstream code. On another, this complicates contributing several unrelated changes simultaneously as different PRs :D

@atanas-vladimirov
Copy link
Copy Markdown
Contributor Author

Hi Jim,

Thanks for your point about not using the master branch in future :).

And what about PR #2525? I'm not sure I understand :)

P.S.: A few days ago I sent you an email with a few questions - not sure if it reached you (I sent it to jimklimov+nut @ ......)

@jimklimov
Copy link
Copy Markdown
Member

Regarding #2525 (and #2524) - just remembered there were ideas about CGI interface, which I think so far went nowhere. You seem like you might be interested in doing something about those too :)

@AppVeyorBot
Copy link
Copy Markdown

@jimklimov jimklimov merged commit f8ecd52 into networkupstools:master Nov 9, 2025
27 of 35 checks passed
jimklimov added a commit to jimklimov/nut that referenced this pull request Mar 27, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Mar 27, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Mar 27, 2026
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants