USB relay commands
10,067
Here's what you need (tested on Linux) :
- HIDAPI from http://www.signal11.us/oss/hidapi/
- USBRELAY from https://github.com/darrylb123/usbrelay/blob/master/README.md
Use it like :
- usbrelay ZG4HU_1=1
- usbrelay ZG4HU_1=0
to switch the first relay on and off. ZG4HU_2 addresses the second relay and without arguments you even get the relay status.
-- Hans
Author by
Admin
Updated on June 28, 2022Comments
-
Admin almost 2 years
I have this USB Relay: http://www.ebay.com/itm/5V-USB-Relay-2-Channel-Programmable-Computer-Control-For-Smart-Home-/141097843081?pt=LH_DefaultDomain_0&hash=item20da163989 Al I need is to send close/open to the device (to turn on & off an LED light)
How can I do that using C# or C++?
Thanks Boaz
-
P.Windridge over 6 yearsA couple more comments because I've been playing with it today: (1) I think the ID (ZG4HU in post above) is specific to your device. (2) The HIDAPI library is in the package libhidapi-dev on Ubuntu.