Library to interface Qwikswitch USB Hub
Project description
pyqwikswitch library
QwikSwitch USB Modem library for Python 3
See http://www.qwikswitch.co.za for more information on the Qwikswitch devices.
The library contains threaded and async interfaces and supports relays, buttons, LED dimmers and decoding of various sensors
QSUsb class
-
Get a list of all devices & values. (http://localhost:2020/&device)
QSUsb.devices()
[{"id": "@0c26e0","name": "buitelig","type": "rel","val": "ON", "time": "1460146507","rssi": "45%"}, .....]
-
Long poll (http://localhost:8080/&listen) for device changes and button presses. This is non-blocking and should be stopped manually (
.stop()
)QSUsb.listen(callback)
-
Set a specific device according to ID. (dim 5%) or 100 (on) (http://localhost:8080/@0ac2f0=5)
QSUsb.set(id, value)
Dimmers values can be adjusted to get a more linear behaviour by setting
dim_adj
between 1 - 2
Example usage
See example.py for a basic usage and tests though the synchronous interface
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
File details
Details for the file pyqwikswitch-0.94.tar.gz
.
File metadata
- Download URL: pyqwikswitch-0.94.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 229c96cfedc432bd08fb150b04926106076740734f2483354aa2852e9b338507 |
|
MD5 | 4268ac22e312b759270593dc52fc965a |
|
BLAKE2b-256 | 385d903d59a94fdbd6a8f70d9f49c32ac7f332d1ffe995e5cd5a20b39ce5194c |