Skip to content

Shadeys/DuoCo

 
 

Repository files navigation

ELK-BLEDOM Node.js CI

Control your chinese LED Controller with simple POST requests and Bluetooth Low-Energy (BLE)

Application for your phone

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

Turning on LEDs

Send post request to "http://yourip:5000/power" with the following request body: {"value": true}

Turning off LEDS

Send post request to "http://yourip:5000/power" with the following request body: {"value": false}

Changing color of LEDs

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" }

Changing brightness of LEDs

Send post request to "http://yourip:5000/brightness" with the following request body: { "value": 100 }

You can choose any number between 0 and 100.

Setup

Configuration

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"

Requirements

  • 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

Installation

  1. Edit the config files to your needs
  2. Install the needed packages
  3. Run using pm2 start index.js
  4. Enjoy.

About

Control your chinese LED Controller with simple POST requests and Bluetooth Low-Energy (BLE)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%