2017-02-05 16:22:11 +01:00
# McLighting v2 - The ESP8266 based multi-client lighting gadget
2016-05-09 18:03:39 +02:00
2019-03-18 17:39:30 +01:00
[![Gitter ](https://badges.gitter.im/mclighting/Lobby.svg )](https://gitter.im/mclighting/Lobby?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge) [![Build Status ](https://travis-ci.com/toblum/McLighting.svg?branch=master )](https://travis-ci.com/toblum/McLighting) [![License: MIT ](https://img.shields.io/badge/License-MIT-yellow.svg )](https://opensource.org/licenses/MIT) [![version ](https://img.shields.io/badge/version-v2.2.3-blue.svg )](https://github.com/toblum/McLighting/blob/master/Arduino/McLighting/version.h)
2016-08-12 08:14:10 +02:00
2018-12-12 11:03:37 +01:00
McLighting (the multi-client lighting gadget) is a very cheap internet-controllable lighting solution based on the famous ESP8266 microcontroller and WS2811/2812 led strips. It features among other things a web-interface, a REST-API and a websocket connector.
2016-05-09 18:03:39 +02:00
2018-12-12 10:39:10 +01:00
Because of it's open architecture and APIs it's easy to build new clients for different platforms (iOS, Android, Windows Universal Apps, Siri/Cortana integration, ...).
2016-05-09 18:03:39 +02:00
2018-04-07 22:48:17 +02:00
[![Demo video WebClient ](https://j.gifs.com/kRPrzN.gif )](https://youtu.be/rc6QVHKAXBs)
[![Demo video Apple Homekit integration ](https://j.gifs.com/gJP2o6.gif )](https://youtu.be/4JnGXZaPnrw)
2018-12-12 11:03:37 +01:00
---
2018-05-13 17:48:40 +02:00
2016-05-09 18:03:39 +02:00
## The Hardware
2017-08-07 22:14:52 +02:00
2018-12-12 11:03:37 +01:00
The project is based on the ESP8266 and WD2811/WS2812 LED strips. There are many variations of the ESP chip out there, but for beginners we suggest a NodeMCU dev board, as these are as "plug 'n' play"as it can get.
A standalone ESP8266 or an Adafruit Huzzah should work too.
2017-08-07 22:14:52 +02:00
2018-12-12 11:03:37 +01:00
The RGB LED strips are also available in many different flavours (as strips or as standalone LEDs) and can easily be chained.
2017-02-19 00:13:19 +01:00
2018-12-12 11:03:37 +01:00
For a detailed explanation see our wiki: [Hardware ](../../wiki/Hardware )
2017-02-05 16:22:11 +01:00
2017-01-04 16:49:54 +01:00
2016-05-21 22:15:34 +02:00
## Software installation
2016-08-12 08:14:10 +02:00
2018-12-12 11:03:37 +01:00
You can read how to get started on the software side of this project
again in out wiki: [Software installation ](../../wiki/Software-installation )
2016-06-11 22:06:40 +02:00
2018-12-12 11:03:37 +01:00
---
2016-06-11 22:06:40 +02:00
2016-05-12 23:05:38 +02:00
### Used Libraries
2016-05-21 22:15:34 +02:00
This project uses libraries and code by different authors:
2016-05-12 23:05:38 +02:00
2018-12-12 10:39:10 +01:00
- [WiFiManager ](https://github.com/tzapu/WiFiManager ) by tzapu (tested with version 0.12.0)
2016-05-12 23:05:38 +02:00
2018-12-12 10:39:10 +01:00
- [WS2812FX ](https://github.com/kitesurfer1404/WS2812FX ) by kitesurfer1404 (tested with version downloaded 2017-02-05)
2016-05-12 23:05:38 +02:00
2018-12-12 10:39:10 +01:00
- [WebSockets ](https://github.com/Links2004/arduinoWebSockets ) by Links2004 (tested with version 2.0.6)
2016-06-11 22:06:40 +02:00
2018-12-12 10:39:10 +01:00
- [Adafruit NeoPixel ](https://github.com/adafruit/Adafruit_NeoPixel ) by adafruit (tested with 1.1.2)
2016-05-12 23:05:38 +02:00
2018-12-12 10:39:10 +01:00
- Optional: [PubSubClient ](https://github.com/knolleary/pubsubclient/ ) by knolleary (tested with 2.6.0)
_Only when you have activated MQTT in definitions.h._
2016-05-12 23:05:38 +02:00
The sketch also uses the following built-in library:
2018-12-12 10:39:10 +01:00
- Ticker by [@igrr ](https://github.com/igrr )
2016-05-12 23:05:38 +02:00
Parts of the code were taken or inspired by the following sources:
2018-12-12 10:39:10 +01:00
- [HSB3RGB conversion ](https://blog.adafruit.com/2012/03/14/constant-brightness-hsb-to-rgb-algorithm/ )
- [TV simulator ](https://github.com/BulldogLowell/PhoneyTV ) logic inspired by BulldogLowell
- [SPIFFS Webserver ](https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer/examples/FSBrowser ) by Hristo Gochkov
2016-05-12 23:05:38 +02:00
Thank you to all the authors for distributing their software that way.
I hope I didn't miss any sources and mentioned every author. In case I forgot someone please let me know and I will fix it.
2016-05-10 08:42:50 +02:00
## Todos
2018-04-07 23:13:57 +02:00
- [ ] Support multiple strips and control them separately or together [Issue ](https://github.com/toblum/McLighting/issues/118 )
2018-12-12 10:47:42 +01:00
- [ ] Remove old / wrong EEPROM settings completely [Issue]
- [ ] Customer profile to define segments of (in)active areas on the strip [Issue ](https://github.com/toblum/McLighting/issues/37 )
- [ ] Additional clients
- [ ] If no wifi, at least enable button mode.
- [ ] Also enable McLighting in Wifi AP mode.
- [ ] Multiple buttons/GPIO Inputs. [Issue ](https://github.com/toblum/McLighting/issues/119 )
2019-01-25 20:15:39 +01:00
- [ ] IR remote support [issue ](https://github.com/toblum/McLightingUI/issues/3 )
- [ ] Make number of pixels, MQTT and PIN configurable via front end [Issue ](https://github.com/toblum/McLighting/issues/93 ) and [Issue ](https://github.com/toblum/McLighting/issues/272 )
2019-03-06 16:38:19 +01:00
- [ ] Make switching between methods: Adafruit NeoPixel, NeoPixelBus's DMA, NeoPixelBus's UART1 and NeoPixelBus's UART2 via REST API
2019-03-08 20:59:20 +01:00
- [ ] Add Espalexa library support [Issue ](https://github.com/toblum/McLighting/issues/348 )
2019-01-25 20:15:39 +01:00
- [x] Make number of pixels, RGB Order and PIN configurable via REST API
- [x] Bundle webpages instead of SPIFFS [Issue ](https://github.com/toblum/McLighting/issues/93 )
- [x] Music visualizer / Bring back ArtNet [Issue ](https://github.com/toblum/McLighting/issues/111 )
- [x] Display version and parameters (Number of LEDs, definition settings, ..) in the web UI [Issue ](https://github.com/toblum/McLighting/issues/150 )
2018-12-12 10:47:42 +01:00
- [x] MQTT support
- [x] Save favourite effects? [Issue ](https://github.com/toblum/McLighting/issues/35 )(https://github.com/toblum/McLighting/issues/101)
- [x] OTA update [Issue ](https://github.com/toblum/McLighting/issues/92 )
2016-05-10 08:42:50 +02:00
- [x] Fix issue with websockets connection problems
2018-04-07 22:48:17 +02:00
- [x] Switch to the [NeoPixelBus library ](https://github.com/Makuna/NeoPixelBus/wiki )
2017-02-05 16:22:11 +01:00
- [x] Use the led strip for status information in connection phase
2017-05-28 14:22:23 +02:00
- [x] Enhance the documentation
2017-02-05 16:22:11 +01:00
- [x] Stability improvements
2017-08-26 17:45:26 +02:00
- [x] RGBW mode [Issue ](https://github.com/toblum/McLighting/issues/24 )
- [x] Add called command to response [Issue ](https://github.com/toblum/McLighting/issues/19 )
2018-01-21 01:20:20 +01:00
- [x] Button control [Issue ](https://github.com/toblum/McLighting/issues/36 )
- [x] Retain last state [Issue ](https://github.com/toblum/McLighting/issues/47 )
2018-04-07 22:48:17 +02:00
- [x] Make a set of NodeRed nodes.
2016-05-10 08:42:50 +02:00
2016-06-11 22:06:40 +02:00
2016-05-09 18:03:39 +02:00
## Licence
2018-11-20 22:42:24 +01:00
[MIT ](https://choosealicense.com/licenses/mit/ )
2016-05-09 18:03:39 +02:00
2016-06-11 22:06:40 +02:00
## Disclaimer
You use this project at your own risk. This is not a solution that should be used in productive environments, but this code and guide could give you a quick start for your own experiments. Please keep also in mind that there are currently some security features missing.
2016-05-12 23:05:38 +02:00
*More information will be added as soon as I clean up the code and complete documentation.*