A tool for controlling USB HID relays
Project description
Python Utility for controlling HID USB Relays
This utility is a Python version of usb-relay-hid
Getting Started
Setup a python virtual environment and install requirements:
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
The module can be installed with:
./setup.py install
The provided pyusb-hid-relay command is pretty much the same as the
hidusb-relay-cmd from the usb-relay-hid project, and aims to be feature
compatible. Additional commands are implemented, and the best way to discover
what options are available is to run:
pyusb-hid-relay --help
Configuration
Coming soon
Permissions
If you want to access the relay devices as a normal user (which is recommended,
since it will respect your local configuration), you will need to modify your
udev rules to allow access to the HID device. You can do this by creating a
file named /etc/udev/rules.d/90-hidusb-relay.rules with the following
contents:
# Give all users access to USB HID Relay
SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0660", GROUP="dialout"
You may need to reload your udev rules with sudo udevadm control --reload-rules and unplug and reattach the USB relay board for this to take
effect
NOTE This rule allows any user that is part of the dialout group to
access the board. If this is not what you want, you should change the udev
rules.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhid-usb-relay-0.0.1.tar.gz.
File metadata
- Download URL: pyhid-usb-relay-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5921a8a9cb4ede8cc57278644728b95fd8a5de2ac4f5e8b286b0729113a166a
|
|
| MD5 |
6c68ca5415c04f03d724aff51bdebf0f
|
|
| BLAKE2b-256 |
88f8193e836f406f5d91dfceda5c63d4aeab3b92503ab1789c7c5a6098384555
|
File details
Details for the file pyhid_usb_relay-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyhid_usb_relay-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa07c92e43edbc044d1206eddfeaf99aaab3b48aa38c6c29b2ea3a21a514f28
|
|
| MD5 |
ccbe5778bdb9a75b7d7e8184c13f4363
|
|
| BLAKE2b-256 |
c8f1b018e746f441ffbd5bdc58617b851acc38707278d4843955857e23eb4cd4
|