elero-usb-transmitter-client
Elero USB Transmitter Client for node.js to send commands to Elero USB Stick and receive information. This libaray needs Elero Transmitter Stick (https://www.der-sonnenschutz-shop.de/elero-221250001-centero-transmitter-stick.html).
Features
- send commands to control shutters
- get current state of shutters
Installing
Using npm:
$ npm install elero-usb-transmitter-client
Example
Initialize
const client = '/dev/ttyUSB0'
Creats a new client object. You have to use the path to the device as a parameter. Type npx @serialport/list in command line to get a list of serial devices.
Get information
//open connection to deviceawait client//get info of channel 1const response = await clientconsole//close connection if it is not needed anymoreawait client
Writable properties of device
await client//move shutters on channel 1 downconst response = await clientconsoleawait client