WiFi controlled Led Lights
Read the code »
Report Bug
·
Request Feature
Table of Contents
There are a lot of Led Light Controllers out there but this one is highly customizable, responsive and can be controlled from anywhere in the world. You can also give acces to multiple people to control your Leds and see who changed what and when. At the moment, the Smart Led Lights come with this features:
Feature | Explanation |
---|---|
Static color | Choose one of 16.777216 colors |
Music Mode | Turning the Music Mode ON will make the Leds sync with the music you are listening to on Spotify |
Animate Current Color | Takes the current color and transitions between making it dimmer or brighter as fast or slow as you want |
Fade | Transitions between randomly generated colors as fast or slow as you want |
Romantic | Transitions between randomly generated shades of Red, Pink and Purple as fast or slow as you want |
Monochrome | Transitions between black (turnt off) and bright white as fast or slow as you want |
The Smart Led Lights have 3 components:
* Web and WebSocket Servers that run on an ESP8266 connected to the Leds
* The Users Device (Phone, Tablet, PC or Smart Fridge)
* A Python Script that gets the currently playing song and the data the Server needs to sync with the song
Backend:
Frontend:
Python Script:
In order to use the Smart Led Lights you need to follow this steps:
- Connect the Led Strip to an ESP 8266
- Red -> D7
- D7 Green -> D6
- Blue -> D5
- Black -> GND
- If the Led Strip requires 12V use a different power source for them and make a circuit using mosfets like this one
- Configure Arduino IDE to use the ESP8266 tutorial here
- Download the libraries under "Backend" from here
- Change the WiFiSSID and WiFiPassword variables to your networks SSID and Password
- Change the WebServerPort and WebSocketsPort variables to what port number you want
- Change the routes in setup to your desired password and allowed users ex: WebServer.on("/password=12345678&user=dexter", ServeMainPage);
- Change the websocket route in index.h with your ip (local or public ~see below~)
- Upload your code to the ESP8266
! Follow this steps only if you want to be able to access the Leds outside your network !
- Go to port forwarding on your routers webpanel tutorial here
- Open the Serial in Arduino IDE after uploading the code on the ESP8266 and get the assigned IP of the ESP8266
- Forward the ports WebServer and WebSockets ports (can be changed in the code) to the ESP8266 Local IP
Install the following libraries using pip
pip install lib 0
pip install lib 1
pip install lib 2
!! TODO write here how to make a spotify app and allow an account to use it and use spotipy
In order to control the Leds you need to open a browser on any device and enter the local IP of the ESP8266 (visible in Serial) or your public IP if you port forwarded see here followed by :WEB_SERVER_PORT/password=YOUR_PASSWORD&user=YOUR_USER
This projects was made for myself.Any Contributions are greatly appreciated as I am sure there are a lot of improvments to be made
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Nandra Rares - nandrarares16@gmail.com