Changes

Jump to navigation Jump to search
no edit summary
Line 73: Line 73:  
===Conecting multiple UPS's===
 
===Conecting multiple UPS's===
 
To be added http://bugs.contribs.org/show_bug.cgi?id=629
 
To be added http://bugs.contribs.org/show_bug.cgi?id=629
 +
 +
==Modifying UPS Parameters==
 +
In some cases you may wish to modify parameters on the actual UPS such as the Low Charge/LOWBATTERY setting. This requires the use of the '''upsrw''' command and temporary modifications to the '''upsd.users''' configuration file. In general, the UPS data should be left protected and changes thought out. If you wish to make the administrative privileges more permanent, then you can make custom templates as identified in the section "Additional Information".
 +
 +
In the examples below, it is assumed your UPS name is '''ups''' and that the UPS is local. you can verify the UPS name via:
 +
upsc -l
 +
 +
To determine the modifiable parameters for your UPS execute the command:
 +
upsrw ups
 +
 +
next we need to create a temporary user with privileges to modify these parameters. First make a safe copy of /etc/ups/upsd.users
 +
cp /etc/ups/upsd.users /etc/ups/upsd.users.backup
 +
 +
Modify /etc/ups/upsd.users and add the user "admin" or anything else you prefer. The entry should look like the other entries and be something like:
 +
      [admin]
 +
              password = admin
 +
              allowfrom = localhost
 +
              actions = set
 +
 +
Now reload the config files:
 +
upsd -c reload
 +
 +
You can now modify the parameters you wish using a command similar to:
 +
upsrw -s battery.charge.low=20 -u admin -p admin ups
 +
 +
Where the value after '''-s''' should be one of the parameters identified by the '''upsrw ups''' command and where "-u admin -p admin" is the username and password set above and '''ups''' is the name of your ups. You can of course verify your changes using '''upsrw ups'''.
 +
 +
After you are done, clean up:
 +
mv /etc/ups/upsd.users.backup /etc/ups/upsd.users
 +
upsd -c reload
 +
 +
 +
More information on upsrw can be found at:
 +
 +
http://opensource.mgeups.com/howto.htm
 +
 +
man upsrw
    
==Aditional Information==
 
==Aditional Information==
147

edits

Navigation menu