Skip to content
/ pyAPC Public

Python library to control APC UPS PDU, specifically a AP7911A. This may work with other models.

License

Notifications You must be signed in to change notification settings

ril3y/pyAPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyAPC

Python library to control APC UPS PDU, specifically a AP7911A. This may work with other models. Note you need to enable DHCP (without tokens?!) and the http server. You can do this by getting a serial to usb cable for this unit.

Usage

Just import PyAPC and create a instance of the class object. Then you can just send outlet commands like the following. The 2nd parameter in the apply_outlet_command is a list of integers that correspond to the outlet number.

apc = PyAPC("http://192.168.1.218", "apc", "apc")
apc.login()
apc.apply_outlet_command(OutletCommand.OFF_IMMEDIATE, [14, 6])

Additional implemented (untested) command are:

class OutletCommand(Enum):
    NO_ACTION = 1
    ON_IMMEDIATE = 2
    ON_DELAYED = 3
    OFF_IMMEDIATE = 4
    OFF_DELAYED = 5
    REBOOT_IMMEDIATE = 6
    REBOOT_DELAYED = 7
    CANCEL_PENDING_COMMANDS = 8

About

Python library to control APC UPS PDU, specifically a AP7911A. This may work with other models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages