Svet is a tiny Telegram bot, a GraphQL Server and a React Native app to manage Playbulb smart lightning devices. It uses Bluteooth LE to send commands to them, and can control multiple devices at the same time.
- MIPOW Playbulb Sphere
- MIPOW Playbulb Comet
- MIPOW Smart Bulb
/help
- This help message/on
- Turns on all lights/off
- Turns off all lights/set $COLOR
- Sets the lights to specified color/devices
- Lists connected devices/reconnect
- Tries to reconnect to all devices/colors
- Lists known colors
- Get an Telegram bot token here
- Ensure that your NodeJS is properly configured
- Copy
.env.example
file to.env
and insert your bot token & telegram username - Done 🎉
Run the following command:
npm start
This should start Svet bot and/or GraphQL server ✨
Run the following command:
sudo setcap cap_net_raw,capcap_net_bind_service+eip $(eval readlink -f `which node`)
This grants the node binary cap_net_raw privileges, so it can start/stop BLE advertising.
Copy svet.service
into /etc/systemd/system/svet.service
, and modify the environment variables.
node
v8.0.0- A bluetooth adapter
App photo by Jake Fagan on Unsplash