This project is deprecated and replaced by ELK-BLEDOM-RECODE.
Control your chinese LED Controller with simple POST requests and Bluetooth Low-Energy (BLE)
I recommend checking my other repo where I made a simple application using expo and react-native that you can use on your phone!
ELK-BLEDOM-APP
Send post request to "http://yourip:5000/power" with the following request body: {"value": true}
Send post request to "http://yourip:5000/power" with the following request body: {"value": false}
Send post request to "http://yourip:5000/color" with the following request body:
{ "color": "any colorname from colors.json" }
or alternatively you can specify a custom hex code with the following request body:
{ "color": "FF00FF", "mode": "custom" }
Send post request to "http://yourip:5000/brightness" with the following request body:
{ "value": 100 }
You can choose any number between 0 and 100.
You can set the Bluetooth Address in "config/config.json" under "bid". You can also set which handle it should write to in "config"/config.sjon" under "handle" You can also specify an alternative device that it should use to communicate with, in "config/config.json" under "device"
- Raspberry Pi with Bluetooth capability (with any linux os installed)
- gatttool
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
(not tested) - some coding knowledge
- shelljs
- expressjs
- nodejs ( w3schools tutorial for installation )
- ( recommended ) pm2
npm install -g pm2
- Edit the config files to your needs
- Install the needed packages
- Run using
pm2 start index.js
- Enjoy.