Skip to main content

Control digital loggers web power switch

Project description

Build Status Package Codestyle Documentation


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

import dlipower

print("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.com
Turning off the first outlet
The powerstate of the first outlet is currently OFF
Renaming the first outlet as "Traffic light"
The current status of the powerswitch is:
DLIPowerSwitch at lpc.digital-loggers.com
Outlet	Hostname       	State
1	Traffic light  	OFF
2	killer robot   	ON
3	Buiten verlicti	ON
4	Meeting Room Li	OFF
5	Brocade LVM123 	ON
6	Shoretel ABC123	ON
7	Shortel 24V - T	ON
8	Shortel 24V - T	ON

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zt_dlipower-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zt_dlipower-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file zt_dlipower-0.1.1.tar.gz.

File metadata

  • Download URL: zt_dlipower-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zt_dlipower-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3837981774c586a3157b0b39d19fd1d9a04b3e40ab33cdd236967614feda3a6c
MD5 6c30f48b1a2433fe2017069e26382377
BLAKE2b-256 8f8a46b4f69b8e4cdde126725147e099a10bf8bd5ef6f0d6e4dac78e46131161

See more details on using hashes here.

File details

Details for the file zt_dlipower-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zt_dlipower-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zt_dlipower-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db8b97562720efcdeaee2c3adc5b43f43f290dbcbf7c0e3c98ede6471fb77b97
MD5 12f1535d6f306358e2316e12148cda16
BLAKE2b-256 aefb6cf962fa92b484b66af3b9203463a8c8173d66739dc114ddf8e1cdae2c01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page