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.0.5.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: zt_dlipower-0.0.5.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for zt_dlipower-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e4436b4ea905940827acf56fd0b7b228be73a310f1df37846d63661dd180ba83
MD5 abb15f2a8aa9ee46008f511a425de186
BLAKE2b-256 9aa40bf389d7259ed523f4055f21e33d909dcd7fd4615e43e1adbf845099747b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zt_dlipower-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b78bc439f9fb3cf30bf04602d73293cdaaa6bfafec671c1490838a5df43c2ec
MD5 b3094ccb4b923aece5b1641c09f66ab9
BLAKE2b-256 5d981e03d81c60f2c29a1b6aa8834b92c623cba0cf02246d5a055e27a3de7b9c

See more details on using hashes here.

Supported by

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