Skip to main content

pyqwikswitch library codecov

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_adj between 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)

Source distribution for pyqwikswitch 1.0.7
File Size Uploaded
pyqwikswitch-1.0.7.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyqwikswitch 1.0.7
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.94

1 release file

0.93

1 release file

0.92

1 release file

0.91

1 release file

0.71

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page