Skip to main content

Control pwrusb.com power strip outlets

Project description

# pwrusb

A python wrapper for controlling pwrusb.com power strip outlets.

## Installation notes

To avoid copyright issues, several files are not included in this distribution. Makefile will attempt to download and install these files automatically. Or, they can be downloaded from the Mac software distribution from the [pwrusb website](http://www.pwrusb.com/downloads.html). These files are:

PwrUSBImp.h
PwrUsbCmd.cpp
libpowerusb.dylib

A version of libusb-1.0 will need to be installed. One straightforward way to get this is via [homebrew](http://brew.sh/) with:

brew install libusb

The `swig` package also needs to be installed in your python distribution for pwrusb to work.

## Usage

Example usage:

import pwrusb
bank = 0
for outlet in [1, 2, 3]:
print "outlet {} is {}".format(outlet, pwrusb.get_single_outlet_state(bank, outlet))
pwrusb.set_single_outlet_state(bank, 2, True)
for outlet in [1, 2, 3]:
print "outlet {} is {}".format(outlet, pwrusb.get_single_outlet_state(bank, outlet))
for outlet in [1, 2, 3]:
pwrusb.set_single_outlet_state(bank, outlet, False)

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

pwrusb-0.2.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file pwrusb-0.2.0.tar.gz.

File metadata

  • Download URL: pwrusb-0.2.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pwrusb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8d641e935cc529b15184502204db2ccb3531da4a2066aa06a53164fa752c2e65
MD5 651cbfe4fa993661de3d9ee34ae1dd36
BLAKE2b-256 a08c5b100b165c0e368dadebfd4c6bce964dea52cd4eaf10ff4bde058a5b41d9

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