From 1d2a6f92372dfc8a3b2be5e8860bd27453ae3f29 Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Fri, 25 Oct 2019 18:51:56 +0200 Subject: [PATCH 1/6] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66ae6a0..667889e 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,9 @@ I hope I didn't miss any sources and mentioned every author. In case I forgot so - [ ] 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. +- [x] If no wifi, at least enable button mode. +- [x] Also enable McLighting in Wifi AP mode. +- [ ] Search an non blocking alternative for WifiManager - [ ] 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) - [ ] Display version and parameters (Number of LEDs, definition settings, ..) in the web UI [Issue](https://github.com/toblum/McLighting/issues/150) From fa31f97c47759c3664dc4c5d2c40bf52077c34e9 Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Sun, 17 Nov 2019 13:34:22 +0100 Subject: [PATCH 2/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 667889e..fe688ef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # McLighting v2 - The ESP8266 based multi-client lighting gadget -[![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.6-blue.svg)](https://github.com/toblum/McLighting/blob/master/Arduino/McLighting/version.h) +[![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.7-blue.svg)](https://github.com/toblum/McLighting/blob/master/Arduino/McLighting/version.h) 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. @@ -64,8 +64,8 @@ I hope I didn't miss any sources and mentioned every author. In case I forgot so - [ ] 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 -- [x] If no wifi, at least enable button mode. -- [x] Also enable McLighting in Wifi AP mode. +- [ ] If no wifi, at least enable button mode. +- [ ] Also enable McLighting in Wifi AP mode. - [ ] Search an non blocking alternative for WifiManager - [ ] 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) From a613b8c9782f7c30a715730526ae2c4fde96d3b1 Mon Sep 17 00:00:00 2001 From: ryancasler Date: Sun, 8 Dec 2019 01:00:54 -0500 Subject: [PATCH 3/6] Power Supply Update Moved the pin setting for POWER_SUPPLY to definitions.h instead of the main sketch. --- Arduino/McLighting/McLighting.ino | 4 ++-- Arduino/McLighting/definitions.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index ee06621..5909938 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -781,13 +781,13 @@ void loop() { if (prevmode != mode) { snprintf(mqtt_buf, sizeof(mqtt_buf), "OK =off", ""); } #endif #if defined(POWER_SUPPLY) - if (prevmode != mode) {digitalWrite(POWER_SUPPLY, LOW); } // power off -> external power supply + if (prevmode != mode) {digitalWrite(POWER_SUPPLY, !POWER_ON); } // power off -> external power supply #endif } #if defined(POWER_SUPPLY) if (mode != OFF) { - if (prevmode != mode) {digitalWrite(POWER_SUPPLY, HIGH); } // power on -> external power supply + if (prevmode != mode) {digitalWrite(POWER_SUPPLY, POWER_ON); } // power on -> external power supply } #endif diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index f47c0a8..87c155e 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -13,6 +13,9 @@ //#define LED_TYPE_WS2811 // Uncomment, if LED type uses 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) #define LED_BUILTIN 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192 #define POWER_SUPPLY 12 // PIN (12 / D6) If defined, enable output to control external power supply +#if defined(POWER_SUPPLY) + #define POWER_ON HIGH // Define the output state to turn on the power supply, either HIGH or LOW. Opposite will be uses for power off. +#endif char HOSTNAME[65] = "McLightingRGBW"; // Friedly hostname is configurable just for the start. Hostname should not contain spaces as this can break Home Assistant discovery if used. From 99394f86725eeb0b0403eda808077d0428b4e763 Mon Sep 17 00:00:00 2001 From: sehraf Date: Mon, 16 Dec 2019 18:28:21 +0100 Subject: [PATCH 4/6] fix #if block missing the last line Causes compiling error when ENABLE_LEGACY_ANIMATIONS is not enabled. --- Arduino/McLighting/request_handlers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index b7b0a8a..1cc3495 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -521,8 +521,8 @@ void handleSetNamedMode(uint8_t * mypayload) { ws2812fx_mode = FX_MODE_THEATER_CHASE_RAINBOW; mode = SET_MODE; } -#endif } +#endif void handleSetWS2812FXMode(uint8_t * mypayload) { if (isDigit(mypayload[1])) { From aa4e7fa5c8c2a94e715fc64eb9012df28d1cef80 Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Mon, 16 Dec 2019 21:11:24 +0100 Subject: [PATCH 5/6] Bump to 2.2.8 * Version Bump to 2.2.8 rgbw 3colors * Bugfixes * adressed issue #59 --- Arduino/McLighting/McLighting.ino | 1 + Arduino/McLighting/definitions.h | 8 ++++---- Arduino/McLighting/request_handlers.h | 1 + Arduino/McLighting/version.h | 2 +- Arduino/McLighting/version_info.ino | 5 +++++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 5909938..d2b1b98 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -727,6 +727,7 @@ void loop() { WiFi.disconnect(); WiFi.setSleepMode(WIFI_NONE_SLEEP); WiFi.mode(WIFI_STA); + WiFi.hostname(HOSTNAME); WiFi.begin(); } else { if ((strlen(mqtt_host) != 0) && (mqtt_port != 0) && (mqtt_reconnect_retries < MQTT_MAX_RECONNECT_TRIES)) { diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index 87c155e..c2c7705 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -171,10 +171,10 @@ bool updateState = false; // Button handling #if defined(ENABLE_BUTTON) -//#define BTN_MODE_SHORT "STA|mo|fxm| h| s| r1| g1| b1| w1| r2| g2| b2| w2| r3| g3| b3| w3" // Example - #define BTN_MODE_SHORT "STA| 5| 0|255|196| 0| 0| 0|255| 0| 0| 0| 0| 0| 0| 0| 0" // Static white - #define BTN_MODE_MEDIUM "STA| 5| 48|200|196|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fire flicker - #define BTN_MODE_LONG "STA| 5| 46|200|196|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fireworks random +//#define BTN_MODE_SHORT "STA|mo|fxm| s| b| r1| g1| b1| w1| r2| g2| b2| w2| r3| g3| b3| w3" // Example + #define BTN_MODE_SHORT "STA| 5| 0|196|255| 0| 0| 0|255| 0| 0| 0| 0| 0| 0| 0| 0" // Static white + #define BTN_MODE_MEDIUM "STA| 5| 48|196|200|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fire flicker + #define BTN_MODE_LONG "STA| 5| 46|196|200|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fireworks random unsigned long keyPrevMillis = 0; const unsigned long keySampleIntervalMs = 25; byte longKeyPressCountMax = 80; // 80 * 25 = 2000 ms diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index 1cc3495..e8431fe 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -1395,6 +1395,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght DBG_OUTPUT_PORT.println("Re-connecting to Wi-Fi..."); WiFi.setSleepMode(WIFI_NONE_SLEEP); WiFi.mode(WIFI_STA); + WiFi.hostname(HOSTNAME); WiFi.begin(); } diff --git a/Arduino/McLighting/version.h b/Arduino/McLighting/version.h index c3b43d1..e51a3f8 100644 --- a/Arduino/McLighting/version.h +++ b/Arduino/McLighting/version.h @@ -1 +1 @@ -#define SKETCH_VERSION "2.2.7.RU1.rgbw.3c" +#define SKETCH_VERSION "2.2.8.RU1.rgbw.3c" diff --git a/Arduino/McLighting/version_info.ino b/Arduino/McLighting/version_info.ino index fbbb069..226b95f 100644 --- a/Arduino/McLighting/version_info.ino +++ b/Arduino/McLighting/version_info.ino @@ -168,4 +168,9 @@ * 09 Oktober 2019 * Version Bump to 2.2.7 rgbw 3colors * added output to control external power supply + * + * 06 December 2019 + * Version Bump to 2.2.8 rgbw 3colors + * Bugfixes + * adressed issue #59 */ From 0eeec51bb0fa610f39d513bab2b6ec12da4a1ad6 Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Sun, 19 Jan 2020 11:14:14 +0100 Subject: [PATCH 6/6] Update platformio.ini --- platformio.ini | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 5803450..8d2cfec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,6 +25,11 @@ description = The ESP8266 based multi-client lighting gadget # arduino core 2.4.1 = platformIO 1.7.3 # arduino core 2.4.2 = platformIO 1.8.0 # arduino core 2.5.0 = platformIO 2.0.4 +# arduino core 2.5.1 = platformIO 2.1.1 +# arduino core 2.5.2 = platformIO 2.2.3 +# arduino core 2.6.1 = platformIO 2.3.0 +# arduino core 2.6.2 = platformIO 2.3.1 +# arduino core 2.6.3 = platformIO 2.3.2 # arduino core stage = platformIO feature#stage # ------------------------------------------------------------------------------ arduino_core_2_3_0 = espressif8266@1.5.0 @@ -33,7 +38,10 @@ arduino_core_2_4_1 = espressif8266@1.7.3 arduino_core_2_4_2 = espressif8266@1.8.0 arduino_core_2_5_0 = espressif8266@2.0.4 arduino_core_2_5_1 = espressif8266@2.1.1 -arduino_core_2_5_2 = espressif8266@2.2.0 +arduino_core_2_5_2 = espressif8266@2.2.3 +arduino_core_2_6_1 = espressif8266@2.3.0 +arduino_core_2_6_2 = espressif8266@2.3.1 +arduino_core_2_6_3 = espressif8266@2.3.2 arduino_core_stage = https://github.com/platformio/platform-espressif8266.git#feature/stage framework = arduino