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

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.7.tar.gz (7.5 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.7-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyqwikswitch-1.0.7.tar.gz
Algorithm Hash digest
SHA256 28d73f9984442094f63979eb3a20f2f5f5a8bcc9be902784ba35f12d8434d9f5
MD5 0f242b8dd2d998817787ca88a94b6cc0
BLAKE2b-256 30aa18de79724533cd9214d430739f118bd35f31a96d3956fac9d4a621bf9624

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyqwikswitch-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2bbdf3256b54a21183c3be3a3113af99368c2718e33d4498a1b6a61b340105f2
MD5 3df98349b0465965ef04ac9705200b42
BLAKE2b-256 ad8d7e77805b6263bf40e84eff9063ac8b67e23bcdf0a06c440962182ce9d0a5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.94

1 file

0.93

1 file

0.92

1 file

0.91

1 file

0.71

1 file

0.8

1 file

0.7

1 file

0.6

1 file

0.5

1 file

0.4

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page