Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
bluetooth-bulb
Advanced tools
A node.js library for the BlueClick Bluetooth Bulb
Special thanks to @mrose17 for sending me a bulb!
Notes:
npm install bluetooth-bulb
var BlueoothBulb = require('bluetooth-bulb');
Discover
BlueoothBulb.discover(callback(bluetoothBulb));
Connect
bluetoothBulb.connect(callback);
Disconnect
bluetoothBulb.disconnect(callback);
Pair
// If pair key has not been set previously, it must be set within 10s of powering the bulb.
// Otherwise, pair must be called, immediately after connect (otherwise the bulb will terminate the connection)
bluetoothBulb.pair(key, callback); // key must be 0 - 255
Get Brightness
// value range is: 0 - 125
bluetoothBulb.getGreenBrightness(callback(value));
bluetoothBulb.getRedBrightness(callback(value));
bluetoothBulb.getWhiteBrightness(callback(value));
bluetoothBulb.getBlueBrightness(callback(value));
Set Brightness
// value range is: 0 - 125
bluetoothBulb.setGreenBrightness(value, callback);
bluetoothBulb.setRedBrightness(value, callback);
bluetoothBulb.setWhiteBrightness(value, callback);
bluetoothBulb.setBlueBrightness(value, callback);
Get Friendly Name
bluetoothBulb.getFriendlyName(callback(friendlyName));
Get Pair Counter
// how many pair keys are there
bluetoothBulb.getPairCounter(callback(pairCounter));
Disconnect Workaround
// no-op, keeps connection alive
bluetoothBulb.disconnectWorkaround(callback);
Get Bulb State
// get the current state of the bulb
bluetoothBulb.getBulbState(callback(bulbState));
Remove Pairs
// Remove all pair keys from the bulb (will need to set a new pair key after operation)
bluetoothBulb.removePairs(callback);
Get Device Name
bluetoothBulb.getDeviceName(callback(deviceName));
Get Model Number
bluetoothBulb.getModelNumber(callback(modelNumber));
Get Firmware Revision
bluetoothBulb.getFirmwareRevision(callback(firmwareRevision));
Get Hardware Revision
bluetoothBulb.getHardwareRevision(callback(hardwareRevision));
Get Manufacturer Name
bluetoothBulb.getManufacturerName(callback(manufacturerName));
FAQs
A node.js library for the BluetoothBulb
We found that bluetooth-bulb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.