Merge pull request #3 from toblum/master

Resync to my branch
This commit is contained in:
Deb 2018-04-07 21:53:24 -04:00 committed by GitHub
commit b5fdb7e87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1017 additions and 995 deletions

View file

@ -789,6 +789,10 @@ void setup() {
#endif #endif
}); });
#ifdef HTTP_OTA
httpUpdater.setup(&server,"/update");
#endif
#ifdef HTTP_OTA #ifdef HTTP_OTA
httpUpdater.setup(&server, "/update"); httpUpdater.setup(&server, "/update");
#endif #endif

View file

@ -1,11 +1,11 @@
//#define USE_NEOANIMATIONFX // Uses NeoAnimationFX, PIN is ignored & set to RX/GPIO3 //#define USE_NEOANIMATIONFX // Uses NeoAnimationFX, PIN is ignored & set to RX/GPIO3, see: https://github.com/debsahu/NeoAnimationFX
#define USE_WS2812FX // Uses WS2812FX #define USE_WS2812FX // Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
// Neopixel // Neopixel
#define PIN 14 // PIN (14 / D5) where neopixel / WS2811 strip is attached #define PIN D1 // PIN (14 / D5) where neopixel / WS2811 strip is attached
#define NUMLEDS 300 // Number of leds in the strip #define NUMLEDS 24 // Number of leds in the strip
#define BUILTIN_LED 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192 #define BUILTIN_LED 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
#define BUTTON 0 // Input pin (4 / D2) for switching the LED strip on / off, connect this PIN to ground to trigger button. #define BUTTON 4 // Input pin (4 / D2) for switching the LED strip on / off, connect this PIN to ground to trigger button.
const char HOSTNAME[] = "McLighting01"; // Friedly hostname const char HOSTNAME[] = "McLighting01"; // Friedly hostname
@ -16,6 +16,7 @@ const char HOSTNAME[] = "McLighting01"; // Friedly hostname
#define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active #define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active
#define ENABLE_BUTTON // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control #define ENABLE_BUTTON // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control
#if defined(USE_NEOANIMATIONFX) and defined(USE_WS2812FX) #if defined(USE_NEOANIMATIONFX) and defined(USE_WS2812FX)
#error "Cant have both NeoAnimationFX and WS2812FX enabled. Choose either one." #error "Cant have both NeoAnimationFX and WS2812FX enabled. Choose either one."
#endif #endif
@ -68,13 +69,12 @@ uint32_t autoParams[][4] = { // color, speed, mode, duration (seconds)
uint16_t color_temp = 327; // min is 154 and max is 500 uint16_t color_temp = 327; // min is 154 and max is 500
#endif #endif
const char mqtt_clientid[] = "NeoPixelStrip01"; // MQTT ClientID const char mqtt_clientid[] = "NeoPixelsStrip"; // MQTT ClientID
char mqtt_host[64] = ""; char mqtt_host[64] = "";
char mqtt_port[6] = ""; char mqtt_port[6] = "";
char mqtt_user[32] = ""; char mqtt_user[32] = "";
char mqtt_pass[32] = ""; char mqtt_pass[32] = "";
#endif #endif

View file

@ -6,12 +6,34 @@
> 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, ...). > 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, ...).
___ [![Demo video WebClient](https://j.gifs.com/kRPrzN.gif)](https://youtu.be/rc6QVHKAXBs)
Update 15.02.2018:
Replaced Home Assistant Support using MQTT Light to MQTT JSON Light.
Update 12.02.2018: [![Demo video Apple Homekit integration](https://j.gifs.com/gJP2o6.gif)](https://youtu.be/4JnGXZaPnrw)
___
Update 07.04.2018:
And even more changes to McLighting! Most of them were contributed by user @debsahu. Thank you!
- AMQTT is now the default MQTT library, it's a bit more lightweight and stable. You can still use PubSubClient if you want to.
- You can use @debsahu great NeoAnimationFX library as a alternative to WS2812FX. It's based on the NeoPixelBus instead of Adafruits NeoPixel library. It can handle longer strips more efficient. If you want, give it a try. WS2812FX is still the default.
- Some more changes regarding Homeassistant integration.
Please see the [Wiki](https://github.com/toblum/McLighting/wiki/Software-installation) for details on the required libraries.
If you have problems with the new version, let us know. You can get the last version [here](https://github.com/toblum/McLighting/tree/Before_AMQTT_NeoAnimationFX).
I'm also working on a alternative web interface for McLighting in the meanwhile, but it may take some more time.
For the german users: McLighting was used in [Kliemannsland](https://youtu.be/3TUjszkS3bY?t=1211) (a funny web show) when they built a really big Neopixel installation.
Update 18.03.2018:
The code for integration with homeassistant was merged into master. It's currently active by default. You can safely disable it in definitions.h when use do not want to use it, or want to use McLighting on a small ESP_01.
There are some informations in the [Wiki](https://github.com/toblum/McLighting/wiki/Homeassistant-integration).
Update 17.02.2018:
User @debsahu contributed code for integration with homeassistant. It's currently in a separate branch (https://github.com/toblum/McLighting/tree/feature/ha_integration). If you're using Homeassistant, please try it out and give feedback.
User @FabLab-Luenn created a version of McLighting (https://github.com/FabLab-Luenen/McLighting) for 6812 and other RGBW strips. Give it a try, if you own such strips.
A thank you goes to all contributors.
Update 12. / 15.02.2018:
Added Home Assistant Support using MQTT Light. A better implementation would be using MQTT Light JSON. Added Home Assistant Support using MQTT Light. A better implementation would be using MQTT Light JSON.
Replaced Home Assistant Support using MQTT Light to MQTT JSON Light.
Update 31.01.2018: Update 31.01.2018:
User @codmpm did a very professional McLighting installation and even designed his own PCBs. He has a great writeup for his project at: https://allgeek.de/2018/01/29/esp8266-neopixel-controller/ (in german). User @codmpm did a very professional McLighting installation and even designed his own PCBs. He has a great writeup for his project at: https://allgeek.de/2018/01/29/esp8266-neopixel-controller/ (in german).
@ -61,11 +83,6 @@ Today I presented the project at [Pi and More 9](https://piandmore.de/) and got
___ ___
[![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)
## The Hardware ## The Hardware
The project ist based on the famous ESP8266 microcontroller and WD2811/WS2812 LED strips. There are many variations of the ESP chip out there, but I chose the NodeMCU dev board, because it's powered by micro USB and has a voltage converter included to power the ESP which uses 3.3V. The project ist based on the famous ESP8266 microcontroller and WD2811/WS2812 LED strips. There are many variations of the ESP chip out there, but I chose the NodeMCU dev board, because it's powered by micro USB and has a voltage converter included to power the ESP which uses 3.3V.
@ -111,15 +128,14 @@ I hope I didn't miss any sources and mentioned every author. In case I forgot so
## Todos ## Todos
- [x] MQTT support - [x] MQTT support
- [ ] Support multiple strips and control them separately or together - [ ] Support multiple strips and control them separately or together [Issue](https://github.com/toblum/McLighting/issues/118)
- [ ] Save favourite effects? [Issue](https://github.com/toblum/McLighting/issues/35) - [ ] Save favourite effects? [Issue](https://github.com/toblum/McLighting/issues/35)
- [ ] Make number of pixels, MQTT and PIN configurable via front end [Issue](https://github.com/toblum/McLighting/issues/93) - [ ] 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/101)
- [ ] OTA update [Issue](https://github.com/toblum/McLighting/issues/93) - [x] OTA update [Issue](https://github.com/toblum/McLighting/issues/93)
- [ ] Bundle webpages instead of SPIFFS [Issue](https://github.com/toblum/McLighting/issues/93) - [ ] Bundle webpages instead of SPIFFS [Issue](https://github.com/toblum/McLighting/issues/93)
- [ ] Remove old / wrong EEPROM settings completely (https://github.com/toblum/McLighting/issues/92) - [ ] Remove old / wrong EEPROM settings completely (https://github.com/toblum/McLighting/issues/92)
- [x] Fix issue with websockets connection problems - [x] Fix issue with websockets connection problems
- [ ] Add support for 433MHz wireless socket using the [RC switch](https://github.com/sui77/rc-switch) library. - [x] Switch to the [NeoPixelBus library](https://github.com/Makuna/NeoPixelBus/wiki)
- [ ] Switch to the [NeoPixelBus library](https://github.com/Makuna/NeoPixelBus/wiki)
- [x] Use the led strip for status information in connection phase - [x] Use the led strip for status information in connection phase
- [x] Enhance the documentation - [x] Enhance the documentation
- [x] Stability improvements - [x] Stability improvements
@ -129,9 +145,11 @@ I hope I didn't miss any sources and mentioned every author. In case I forgot so
- [x] Button control [Issue](https://github.com/toblum/McLighting/issues/36) - [x] Button control [Issue](https://github.com/toblum/McLighting/issues/36)
- [x] Retain last state [Issue](https://github.com/toblum/McLighting/issues/47) - [x] Retain last state [Issue](https://github.com/toblum/McLighting/issues/47)
- [ ] Additional clients - [ ] Additional clients
- [ ] If no wifi, at least enable button mode. [Issue](https://github.com/toblum/McLighting/issues/88) - [ ] If no wifi, at least enable button mode.
- [ ] Also enable McLighting in Wifi AP mode. - [ ] Also enable McLighting in Wifi AP mode.
- [ ] Make a set of NodeRed nodes. - [x] Make a set of NodeRed nodes.
- [ ] Multiple buttons/GPIO Inputs. [Issue](https://github.com/toblum/McLighting/issues/119)
- [ ] Music visualizer / Bring back ArtNet [Issue](https://github.com/toblum/McLighting/issues/111)
## Licence ## Licence