[Nut-upsdev] shutdown.* and load.*, and how to possibly add more instcmd for bcmxcp

Alf Høgemark alf at i100.no
Thu Aug 8 17:16:59 UTC 2013


I am considering adding support in the bcmxcp driver for the following 
commands available in bcmxcp specification :
#define PW_UPS_ON                       .. /* UPS on command. length 1-2 */
#define PW_UPS_ON_TIME              .. /* Scheduled UPS on in n minutes. 
length 3-4 */
#define PW_UPS_ON_AT_TIME        .. /* Schedule UPS on at specified date 
and time. length 7-8 */
#define PW_UPS_OFF_TIME            .. /* Scheduled UPS off in n minutes. 
length 3-4 */
#define PW_UPS_OFF_AT_TIME      .. /* Schedule UPS off at specified date 
and time. length 7-8 */

Possibly I would also like to add support for the following, but this 
might not make sense :
#define PW_GO_TO_BYPASS             .. /* Transfer load from inverter to 
bypass. length 1 or 3 */

But I do not currently know what name I should use for the "instcmd" for 
each of these.
For the three "ON" commands, do you think it make sense to add "instcmd" 
for these ?
In the other drivers, I only see "load.on". Is "load.on" a proper 
instcmd to use ?
For example "load.on", "load.on.delayed", "load.on.delayed.time"

For the two "OFF" commands, is "load.off" appropriate ?

What is the difference between "load.off" and "shutdown.stayoff" ?

The following two are already mapped in the driver :
#define PW_LOAD_OFF_RESTART        .. /* Delayed LoadPowerOff & Restart 
command. length 2-4 */
This is mapped to shutdown.return
#define PW_UPS_OFF                        .. /* UPS off command. length 
1-2 */
This is mapped to shutdown.stayoff

As additional info, here is the instcmd I found in the other drivers, 
the number being the number of times it was found in source code
      23 ("shutdown.return")
      20 ("shutdown.stayoff")
      19 ("test.battery.start")
      18 ("load.off")
      16 ("load.on")
      11 ("test.battery.stop")
       8 ("shutdown.stop")
       8 ("shutdown.reboot")
       6 ("test.panel.start")
       5 ("test.failure.start")
       5 ("beeper.enable")
       4 ("shutdown.reboot.graceful")
       4 ("reset.input.minmax")
       4 ("beeper.mute")
       3 ("test.failure.stop")
       3 ("test.battery.start.quick")
       3 ("test.battery.start.deep")
       3 ("bypass.stop")
       3 ("bypass.start")
       3 ("beeper.toggle")
       3 ("beeper.on")
       3 ("beeper.off")
       3 ("beeper.disable")
       2 ("load.on.delay")
       2 ("load.off.delay")
       1 ("test.system.start")
       1 ("test.panel.stop")
       1 ("input.on")
       1 ("input.off")
       1 ("calibrate.stop")
       1 ("calibrate.start")
The same info, just sorted alphabetically :

Alf Hogemark

More information about the Nut-upsdev mailing list