Skip to content
a usb relay nodejs library for UI021
C Makefile C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
usbrelay
.gitignore
LICENSE
README.md
binding.gyp
index.js
package.json
relay.cc

README.md

UI021-usbrelay-node-modules

a usb relay nodejs library for UI021

link: http://freeeasy-life.com/product/ui_mod/ur

##usage

setRelay([deviceId], [portId], [status])

set usbrelay on deviceId(1n) and portId(1126) to status(1=on, 0=off) return value is 0 (ok) or -1 (error)

getRelay([deviceId], [portId])

get usbrelay status on deviceId(1n) and portId(1126) return value is current status 1 (on), 0 (off) or -1 (error)

toggleRelay([deviceId], [portId])

toggle usbrelay on deviceId(1n) and portId(1126) return value is current status after toggle: 1 (on), 0 (off) or -1 (error)

You can’t perform that action at this time.