Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
bluetooth-bulb
Advanced tools
Readme
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
The npm package bluetooth-bulb receives a total of 3 weekly downloads. As such, bluetooth-bulb popularity was classified as not popular.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.