pyqwikswitch library 
QwikSwitch USB Modem library for Python 3. The library supports relays, buttons, LED dimmers and decoding of various sensors
See http://www.qwikswitch.co.za for more information on the Qwikswitch devices.
The library is used in the Home Assistant QwikSwitch integration
QSUsb class
-
Get a list of all devices & values. (http://localhost:2020/&device)
QSUsb.devices()[{"id": "@0c26e0","name": "Light 1","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)Dimmer values can be adjusted to get a more linear behavior by setting
dim_adjbetween 1 - 2
Example usage
See example.py for a basic usage and tests though the synchronous interface
Metadata
Release files for pyqwikswitch 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyqwikswitch-1.0.7.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyqwikswitch-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / pyqwikswitch-1.0.7.tar.gz
| Download URL | pyqwikswitch-1.0.7.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28d73f9984442094f63979eb3a20f2f5f5a8bcc9be902784ba35f12d8434d9f5
|
|
BLAKE2b-256 checksum How to use checksums |
30aa18de79724533cd9214d430739f118bd35f31a96d3956fac9d4a621bf9624
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.2
|
Release files / pyqwikswitch-1.0.7-py3-none-any.whl
| Download URL | pyqwikswitch-1.0.7-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bbdf3256b54a21183c3be3a3113af99368c2718e33d4498a1b6a61b340105f2
|
|
BLAKE2b-256 checksum How to use checksums |
ad8d7e77805b6263bf40e84eff9063ac8b67e23bcdf0a06c440962182ce9d0a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.2
|