[Nut-upsdev] instcmd "beeper.off "

Peter Selinger selinger at mathstat.dal.ca
Mon Aug 13 10:57:59 UTC 2007


Most UPS that I have seen support only "muting" the beeper; I haven't
seen any that allow you to turn off the beeper permanently (although
that is a theoretical possibility provided in the HID powerdevices
specification). 

Muting is only possible when the beeper is already ringing, and only
lasts until the next alarm condition. 

The renaming you suggest makes sense, but hasn't been done for two
reasons that I can think of:

* backward compatibility (beeper.off has been documented since time
  immemeorial)
* "off" is a more natural companion to "on".

A good compromise might be to do the renaming you suggest, but also
allow "off" as a synonym to "mute" for devices that don't implement
the "real off" functionality. I.e.:

CMDDESC beeper.on "Enable the UPS beeper"
CMDDESC beeper.mute "Temporarily mute the UPS beeper"
CMDDESC beeper.off "Permanently disable the UPS beeper, if possible, else temporarily mute the UPS beeper"
CMDDESC beeper.toggle "Toggle the UPS beeper"

-- Peter

Arjen de Korte wrote:
> 
> While working on the mge-hid subdriver, I wanted to add the
> 'beeper.mute' command. Unfortunately, the description I intended to use
> was used already by the 'beeper.off' instcmd:
> 
> 	CMDDESC beeper.off "Temporarily mute the UPS beeper"
> 
> Now of course we could add another instcmd 'beeper.reallyoff', but
> instead I would prefer to bite the buller and do the following:
> 
> 	CMDDESC beeper.off "Disable the UPS beeper"
> 	CMDDESC beeper.mute "Temporarily mute the UPS beeper"
> 
> I propose to rename the existing 'beeper.off' commands in the drivers
> and documentation to 'beeper.mute' and possibly add a real 'beeper.off'
> command. It looks to me that the HID subdrivers should support that
> (value=1) and the belkinuniv driver too.
> 
> Of course this will have consequences for drivers that already implement
> this command:
> 
> 	apc-hid
> 	belkin-hid
> 	belkinunv
> 	energizerups
> 	metasys
> 	mge-hid
> 	nitram
> 	powerpanel
> 	safenet
> 	tripplite-hid
> 	upscode2
> 
> Any thoughts?
> 
> Best regards, Arjen
> 
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
> 




More information about the Nut-upsdev mailing list