Skip to main content

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyqwikswitch-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ee02e6ffb338e1bf109c509f24bc49b2b76015dd12805e1f19b9524c1394edb3
MD5 a9451e44d3df9e3d04709c97e962f307
BLAKE2b-256 b2fc2106ebacd8fa88ac27b067d91f1e13a162f70e9d0eed61ba25e4eaf2a62e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyqwikswitch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27ef43e480d2e5a81aa104c2e7f4a8d816b813051b1a0800b1904a9059cf1035
MD5 03b07c0356b96a0dd23bdbb7f568d871
BLAKE2b-256 df2c7db45005c544a6daf4f55ca709b2d72f62d3224213f3f929f5d13a702ebe

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