Skip to main content

Library to interface Qwikswitch USB Hub

Project description

pyqwikswitch library codecov

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

pyqwikswitch-1.0.4.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyqwikswitch-1.0.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pyqwikswitch-1.0.4.tar.gz.

File metadata

  • Download URL: pyqwikswitch-1.0.4.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.2

File hashes

Hashes for pyqwikswitch-1.0.4.tar.gz
Algorithm Hash digest
SHA256 597a2e6d7a9be4a7a86daf2cf4bb4885704bc008499ac2aa2e742fbae0beec28
MD5 524ab446aba8051f5c03291a3a571883
BLAKE2b-256 048e29922445bb5a096ca2dec7ce9dc5a2b2757c1ac69c8696e96b451a9fbe7a

See more details on using hashes here.

File details

Details for the file pyqwikswitch-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqwikswitch-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c15e43619e62d3909e07827f2d817eed01f6380056b683d71246ae2569e347d8
MD5 c2fdfef2b16b888cb731a321cf3733e8
BLAKE2b-256 f34d87d7610cacf9c4970afdeb14c027bd58e3c37e62ea974dade71d6fa90671

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