An unofficial NodeJS SDK with TypeScript Support for Embrava Blynclight Products.
To run the SDK you will need NodeJS (14.x) and npm. This library is modeled on the decompiling Blynclight .NET SDK - version 3.0.4;
This library can be installed via npm:
npm install blync-node-ts
Or installed locally:
git clone https://github.com/xadamxk/blync-node-ts.git
cd ./blync-node-ts
npm install
npm link
cd ../test-project
npm link blync-node-ts
- Supports multiple Blynclight Devices (Embrava Embdedded, Blynclight Mini)
- Control device lights (color, light level, blind speed)
- Play device sounds (sound files, repeat audio)
- Control device sound (volume, mute status)
- Supported on Windows and Linux
const {
// Classes
BlyncConnector,
BlyncLightByte,
BlyncColor,
// Enums
BlyncBlinkSpeedEnum,
BlyncLightLevelEnum,
BlyncLightStatusEnum,
} = require('blync-node-ts')
/* Turn light and sound off on exit */
['exit', 'uncaughtException', 'SIGINT', 'SIGTERM', 'SIGQUIT']
.forEach(signal => process.on(signal, () => {
device.turnOff();
process.exit();
}));
const blyncConnector = new BlyncConnector();
const device = blyncConnector.getDevice(0);
/* Set color (white) - full brightness - no blink */
device.sendCommand(
new BlyncColor(255, 255, 255),
new BlyncLightByte(BlyncLightStatusEnum.ON, BlyncLightLevelEnum.FULL, BlyncBlinkSpeedEnum.OFF)
);
More examples can be found in /examples.
This project can be forked from Github. Please issue pull requests from feature branches and follow conventional commit standards. Submit bug reports or requests as issues - be sure to provide your operating system, Synclight device, and model number.
- fix commit hooks
- sort-package-json on commit
- lint on commit
- Find device by name
- Find device by index
- BlyncDevice functions
- Support color enum
- Add device support for USB30 devices