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

Added ups.beeper.status support for Masterpower MF-UPS650VA #2661

Open
yonesmit opened this issue Oct 17, 2024 · 6 comments
Open

Added ups.beeper.status support for Masterpower MF-UPS650VA #2661

yonesmit opened this issue Oct 17, 2024 · 6 comments
Labels
enhancement impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) MGE MGE branded devices and (USB) chipsets, now part of Eaton; mostly bcmxcp drivers USB
Milestone

Comments

@yonesmit
Copy link
Contributor

yonesmit commented Oct 17, 2024

Hi,
Recently I start using a Masterpower MF-UPS650VA with nut. The device is detected correctly, it uses usbhid-ups driver and MGE HID 1.49 subdriver.
My problem was I couldn't control the beeper to silence it (ups.beeper.status). After some debugging I found that the feature was found in a different path than the ones that driver support (driver already support the feature in 2 different paths and it uses the first one it founds).
Driver support ups.beeper.status in this 2 paths:

UPS.BatterySystem.Battery.AudibleAlarmControl
UPS.PowerSummary.AudibleAlarmControl

And my ups uses this path:

UPS.AudibleAlarmControl

So I added the 3 lines needed to support the beeper status feature in the path used by my ups and compiled the driver.

	{ "ups.beeper.status", 0 ,0, "UPS.AudibleAlarmControl", NULL, "%s", HU_FLAG_SEMI_STATIC, beeper_info },
...
	{ "beeper.disable", 0, 0, "UPS.AudibleAlarmControl", NULL, "1", HU_TYPE_CMD, NULL },
	{ "beeper.enable", 0, 0, "UPS.AudibleAlarmControl", NULL, "2", HU_TYPE_CMD, NULL },

Now the feature is correctly supported.

battery.charge: 100
battery.charge.low: 10
battery.runtime: 7200
battery.type: PbAC
device.mfr: KSTAR
device.model: UPS HID
device.serial: HID-C01
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: UPS HID
driver.parameter.productid: 0001
driver.parameter.serial: HID-C01
driver.parameter.synchronous: auto
driver.parameter.vendor: KSTAR
driver.parameter.vendorid: 0463
driver.state: quiet
driver.version: 2.8.2.1081-1081-g78e0525d3
driver.version.data: MGE HID 1.49
driver.version.internal: 0.57
driver.version.usb: libusb-1.0.24 (API: 0x1000108)
input.frequency: 49.9
input.voltage: 230.5
outlet.1.status: on
output.voltage: 230.4
ups.beeper.status: disabled
ups.firmware:
ups.load: 8
ups.mfr: KSTAR
ups.model: UPS HID
ups.productid: 0001
ups.serial: HID-C01
ups.status: OL
ups.vendorid: 0463

I'm attaching the file with changes for your reference.

mge-hid.zip

Can the changes be added to project so this ups is supported directly in future releases?
Thanks in advance

Best Regards

yonesmit

@jimklimov jimklimov added this to the 2.8.3 milestone Oct 17, 2024
@jimklimov jimklimov added enhancement USB MGE MGE branded devices and (USB) chipsets, now part of Eaton; mostly bcmxcp drivers impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Oct 17, 2024
@jimklimov
Copy link
Member

Sounds great, thanks for sharing!

Would you care to post the change as a pull request, so it is attributed in your name in Git history?

@yonesmit
Copy link
Contributor Author

yonesmit commented Oct 17, 2024

Sounds great, thanks for sharing!

Would you care to post the change as a pull request, so it is attributed in your name in Git history?

I would but I don't know how to create a git pull request. I'm not sure if I need to create a branch, make changes in it and then submit comparing it with master branch or there is any other easier way. I'm not used to git yet (I've been out of world for last years XD ) Can you add the changes? if not I will try to do as soon as I learn how to do....
TIA
best regards,

@yonesmit
Copy link
Contributor Author

Finally I managed (?) to create the pull request. Tell me if there is something wrong. Sorry this is my fist time.
best regards

@callegar
Copy link

@yonesmit Nice to see better support for this UPS! Thanks! A quick question: does a manual exist for this thing? I have one and it came with no manual apart from a single page with no useful info.

@yonesmit
Copy link
Contributor Author

A single manual page, And another page to tell you the download link of kpower. That's all I got.
But it was really cheap and works quite well, the only problem I got is I needed to silence it.

@jimklimov
Copy link
Member

Thanks, looks good for a first shot! :)

To answer your earlier question, yes it is recommended to make a new branch in your repository for each feature you work on, so you don't have problems e.g. updating to changes from remote master branch as it changes over time while your large pull request awaits a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) MGE MGE branded devices and (USB) chipsets, now part of Eaton; mostly bcmxcp drivers USB
Projects
Status: Todo
Development

No branches or pull requests

3 participants