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.3.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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyqwikswitch-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d0cf5a3ce7bebd0a295f431e5960a90c4d2760f689c540801daf5808b1440c86
MD5 5150c0f3dd147a3fcd5def4fd5c629a6
BLAKE2b-256 56350ef78f1f49d17f26aa133378e086de137b8572f3e275f164694707f830bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyqwikswitch-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4edcb72ac081b0b1b0a8ca1e5f82ce51d8c564ab645ea002f1da5cf59c0efed5
MD5 1fca5dbfff5e3612d9a7f9456665c444
BLAKE2b-256 e247842845c1ebbea12ede76d14fa598fc44254c49b90285ce75f509d8f713f0

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