Skip to content

Repository files navigation

Build StatusPackageCodestyleDocumentation


Digital Loggers Network Power Switch Python Module

This is a python module and a script to mange the Digital Loggers Web Power switch.

The module provides a python class named PowerSwitch that allows managing the web power switch from python programs.

When run as a script this acts as a command line utility to manage the DLI Power switch.

SUPPORTED DEVICES

This module has been tested against the following Digital Loggers Power network power switches:

  • ProSwitch
  • WebPowerSwitch II
  • WebPowerSwitch III
  • WebPowerSwitch IV
  • WebPowerSwitch V
  • Ethernet Power Controller III

Example

importdlipowerprint('Connecting to a DLI PowerSwitch at lpc.digital-loggers.com')
switch=dlipower.PowerSwitch(hostname="lpc.digital-loggers.com", userid="admin")
print('Turning off the first outlet')
switch.off(1)
print('The powerstate of the first outlet is currently', switch[0].state)
print('Renaming the first outlet as "Traffic light"')
switch[0].name='Traffic light'print('The current status of the powerswitch is:')
print(switch)
Connecting to a DLI PowerSwitch at lpc.digital-loggers.comTurning off the first outletThe powerstate of the first outlet is currently OFFRenaming the first outlet as "Traffic light"The current status of the powerswitch is:DLIPowerSwitch at lpc.digital-loggers.comOutlet	Hostname State1	Traffic light OFF2	killer robot ON3	Buiten verlicti	ON4	Meeting Room Li	OFF5	Brocade LVM123 ON6	Shoretel ABC123	ON7	Shortel 24V - T	ON8	Shortel 24V - T	ON

About

Python modules to manage Digital Loggers Web Power Switch

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages