
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
This is a python lib for control your Bluetooth Low Energy (BLE) lamp.
The lib offers the following functionality:
bt-lamp should work with at least some lamps (that are non-RGB, dimmable, cool/warm only) that use the following app
Lamps tested to work include
Lib tested on raspberry 2. Lib need sudo permissions
Your bluetooth card needs to support at least Bluetooth v4.0 LE and have working drivers / firmware for Linux.
Working cards (not exhaustive):
firmware-realtek
packageYou van use lib from command line or import as module. To install the module, run:
pip install bt_lamp
sudo -E env PATH=$PATH python -m bt_lamp command name [level] [log-level]
Available command:
level - lamp brightness, number between 1 and 10
from bt_lamp import BtLamp
lamp = BtLamp("MY_LAMP")
# setup
lamp.setup()
# on
lamp.on()
# off
lamp.off()
# cold
lamp.cold(5)
# warm
lamp.warm(5)
# dual
lamp.dual(5)
Before you can control your lamp, you have to perform an initial setup so the lamp will remember a unique name that you specify.
To setup more than one lamp, setup each lamp individually by assigning a new name to each lamp.
To perform the initial setup:
sudo -E env PATH=$PATH python -m bt_lamp setup LAMP0
To reiterate sudo permissions are required to access the ble stack on modern linux
FAQs
Controll bluetooth lamp from python
We found that bt-lamp demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.