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
Hashes for pyhid_usb_relay-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa07c92e43edbc044d1206eddfeaf99aaab3b48aa38c6c29b2ea3a21a514f28 |
|
MD5 | ccbe5778bdb9a75b7d7e8184c13f4363 |
|
BLAKE2b-256 | c8f1b018e746f441ffbd5bdc58617b851acc38707278d4843955857e23eb4cd4 |