balena-io-hardware / autokit-relay-3d

2 stars 0 forks source link

Automation kit usb relay

This repo contains the files needed to source components and assemble the USB relay device that is to be used as part of the automation kit suite.

Block diagram

The device is built around an off the shelf USB relay, with an enclosure built around it for both safety and ease of use.

To control the USB relay, the following tool can be used: https://github.com/darrylb123/usbrelay The quickest way to use it is to install the package:

sudo apt-get install usbrelay

Check your device's serial number:

sudo usbrelay

Example output:

root@a6a7c99:/usr/src/app# usbrelay HURTM_1=0
Orig: HURTM, Serial: HURTM, Relay: 1 State: fd
Device Found
  type: 16c0 05df
  path: /dev/hidraw0
  serial_number:
  Manufacturer: www.dcttech.com
  Product:      USBRelay2
  Release:      100
  Interface:    0
  Number of Relays = 2
Serial: HURTM, Relay: 1 State: fd
1 HID Serial: HURTM Serial: HURTM, Relay: 1 State: fd

Serial: HURTM, Relay: 1 State: fd --- Found

And then toggle it with:

sudo usbrelay HURTM_1=0

Capabilities

Interface

Hardware

Software