Skip to content

sharpbai/UI021-usbrelay-node-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

a usb relay nodejs library for UI021

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published