Skip to content

Dexter0-0/SmartLedLights-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266 Smart Led Lights

WiFi controlled Led Lights

Read the code »

Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Screenshots
  5. Contributing
  6. License
  7. Contact

About The Project

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

Built With

Backend:


Frontend:


Python Script:

Getting Started

In order to use the Smart Led Lights you need to follow this steps:

Hardware

  1. Connect the Led Strip to an ESP 8266
  2. Red -> D7
  3. D7 Green -> D6
  4. Blue -> D5
  5. Black -> GND
  6. If the Led Strip requires 12V use a different power source for them and make a circuit using mosfets like this one

esp8266

  1. Configure Arduino IDE to use the ESP8266 tutorial here
  2. Download the libraries under "Backend" from here
  3. Change the WiFiSSID and WiFiPassword variables to your networks SSID and Password
  4. Change the WebServerPort and WebSocketsPort variables to what port number you want
  5. Change the routes in setup to your desired password and allowed users ex: WebServer.on("/password=12345678&user=dexter", ServeMainPage);
  6. Change the websocket route in index.h with your ip (local or public ~see below~)
  7. Upload your code to the ESP8266

WiFi

! Follow this steps only if you want to be able to access the Leds outside your network !

  1. Go to port forwarding on your routers webpanel tutorial here
  2. Open the Serial in Arduino IDE after uploading the code on the ESP8266 and get the assigned IP of the ESP8266
  3. Forward the ports WebServer and WebSockets ports (can be changed in the code) to the ESP8266 Local IP

Python

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

Usage

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

Screenshots

plot

Contributing

This projects was made for myself.Any Contributions are greatly appreciated as I am sure there are a lot of improvments to be made

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Nandra Rares - [email protected]

About

Led Lights Controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published