Release of WLED 0.4 - the BLINKEN update
Added setting to change default boot preset Changed default NTP server Removed keywords.txt from dependencies because IDE would consider it as an (invalid) library Updated readme Updated binaries to 0.4
This commit is contained in:
parent
60530a2931
commit
973b8f62c8
Binary file not shown.
BIN
bin/wled04_1712121_RGBW.bin
Normal file
BIN
bin/wled04_1712121_RGBW.bin
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
80
readme.md
80
readme.md
@ -1,17 +1,21 @@
|
||||
## Welcome to my project WLED!
|
||||
|
||||
WLED is a basic, fast and (relatively) secure implementation of a ESP8266 webserver to control Neopixel (WS2812B) leds
|
||||
|
||||
Uses ESP arduino version 2.3.0 (latest as of October 2017).
|
||||
Contents in the /data directory may be uploaded to SPIFFS.
|
||||
Uses ESP Arduino core version 2.3.0 (latest as of December 2017).
|
||||
|
||||
Features: (V0.4)
|
||||
### Features: (V0.4)
|
||||
- RGB, HSB, and brightness sliders
|
||||
- Settings page - configuration over network
|
||||
- Access Point and station mode - automatic failsafe AP
|
||||
- WS2812FX library integrated for nearly 50 special effects!
|
||||
- WS2812FX library integrated for over 50 special effects!
|
||||
- Secondary color support lets you use even more effect combinations
|
||||
- Support for RGBW strips
|
||||
- 25 user presets! Save your favorite colors and effects and apply them easily!
|
||||
- Nightlight function (gradually dims down)
|
||||
- Notifier function (multiple ESPs sync color via UDP broadcast)
|
||||
- Support for power pushbutton
|
||||
- Custom Theater Chase
|
||||
- Full OTA software update capability
|
||||
- Password protected OTA page for added security (OTA lock)
|
||||
- Alexa smart home device server
|
||||
@ -19,26 +23,24 @@ Features: (V0.4)
|
||||
- client HTML controlled
|
||||
- Edit page. Change html and other files via OTA. (needs to be enabled in source)
|
||||
|
||||
Compile settings:
|
||||
Board: WeMos D1 mini (untested with other HW, should work though)
|
||||
CPU frequency: 80 MHz
|
||||
Flash size : 4MB (3MB SPIFFS)
|
||||
Upload speed: 921600
|
||||
### Compile settings:
|
||||
- Board: WeMos D1 mini (untested with other HW, should work though)
|
||||
- CPU frequency: 80 MHz
|
||||
- Flash size : 4MB (3MB SPIFFS)
|
||||
- Upload speed: 921600
|
||||
|
||||
### Quick start guide:
|
||||
|
||||
Quick start guide:
|
||||
- If you do not plan to change the software, you can use the supplied binary files instead-
|
||||
Just flash a [basic HTTP OTA updater](https://github.com/Aircoookie/ESP8266MinimalHTTPUpdater) sketch and upload the bin!
|
||||
|
||||
-If you do not plan to change the software, you can use the supplied binary files instead-
|
||||
Just flash a basic HTTP OTA updater sketch and upload the bin!
|
||||
|
||||
|
||||
1. Make sure your ESP module has a min. 4MB SPI flash module. (SHOULD now support 1MB modules, untested)
|
||||
Connect a WS2812B RGB led strip to GPIO2. Optionally connect a NO-pushbutton to GPIO0 (internal pull-up) and ground.
|
||||
1. Connect a WS2812B RGB led strip to GPIO2. Optionally connect a NO-pushbutton to GPIO0 (internal pull-up) and ground.
|
||||
|
||||
2. Follow a guide to setup your Arduino client (I am using version 1.8.1) with the ESP8266 libraries.
|
||||
For current compiles I use version 2.3.0.
|
||||
|
||||
3. In file "wled00.ino", you should change the access point and OTA update passphrases for added security (you can change them later, this is just the "factory default"). Flash the sketch.
|
||||
You will need to install the NeoPixelBus library by Makuna. All other dependencies are included with WLED for convenience.
|
||||
|
||||
5. Connect to automatically started WiFi access point "WLED-AP" using default passwort "wled1234". Go to the IP "192.168.4.1".
|
||||
|
||||
@ -46,35 +48,39 @@ For current compiles I use version 2.3.0.
|
||||
|
||||
7. Have fun with the software!
|
||||
|
||||
|
||||
Advanced module control via HTTP requests:
|
||||
### Advanced module control via HTTP requests API:
|
||||
|
||||
Base URL scheme: "<moduleip>/win". This will return a XML file with some current values.
|
||||
Add one or multiple of the following parameters after the base url to change values:
|
||||
"&A=<0-255>" set LED brightness (yellow slider)
|
||||
"&R=<0-255>" set LED red value (red slider)
|
||||
"&G=<0-255>" set LED green value (green slider)
|
||||
"&B=<0-255>" set LED blue value (blue slider)
|
||||
"&W=<0-255>" set LED white value (white slider) (only when RGBW enabled)
|
||||
"&T=<0 or 1 or 2-255>" 0: switch off, on, toggle
|
||||
"&FX=<0-47>" set LED effect (refer to WS2812FX library)
|
||||
"&SX=<0-255>" set LED effect speed (refer to WS2812FX library)
|
||||
"&RN=<0 or 1>" receive notifications on or off
|
||||
"&SN=<0 or 1>" send (direct) notifications on or off
|
||||
"&NL=<0 or 1>" turns nightlight function on or off
|
||||
"&MD=<0 or 1>" sets client color picker mode (RGB/HSB)
|
||||
("&OL=<0, 1, 3 or 5>" experimental clock overlays)
|
||||
("&I=<0-255>" experimental individual LED control)
|
||||
("&I=<0-255>&I2=<0-255>" experimental individual LED range control)
|
||||
- "&A=<0-255>" set LED brightness (yellow slider)
|
||||
- "&R=<0-255>" set LED red value (red slider)
|
||||
- "&G=<0-255>" set LED green value (green slider)
|
||||
- "&B=<0-255>" set LED blue value (blue slider)
|
||||
- "&W=<0-255>" set LED white value (white slider) (only when RGBW enabled)
|
||||
- "&T=<0 or 1 or 2-255>" 0: switch off, on, toggle
|
||||
- "&FX=<0-47>" set LED effect (refer to WS2812FX library)
|
||||
- "&SX=<0-255>" set LED effect speed (refer to WS2812FX library)
|
||||
- "&RN=<0 or 1>" receive notifications on or off
|
||||
- "&SN=<0 or 1>" send (direct) notifications on or off
|
||||
- "&NL=<0 or 1>" turns nightlight function on or off
|
||||
- "&MD=<0 or 1>" sets client color picker mode (RGB/HSB)
|
||||
|
||||
(this list is incomplete, will be available in wiki)
|
||||
|
||||
### Other
|
||||
|
||||
Licensed under the MIT license
|
||||
Uses libraries:
|
||||
ESP8266 Arduino Core
|
||||
WS2812FX by kitesurfer1404 (Aircoookie fork)
|
||||
ESP8266 Arduino Core
|
||||
NeoPixelBus by Makuna
|
||||
[WS2812FX](https://github.com/kitesurfer1404/WS2812FX) by kitesurfer1404 (Aircoookie fork)
|
||||
Time library
|
||||
Timezone library by JChristensen
|
||||
arduino-esp8266-alexa-multiple-wemo-switch by kakopappa
|
||||
|
||||
Uses Linearicons by Perxis! (link in settings page)
|
||||
|
||||
#### This information will be moved to the wiki soon:
|
||||
|
||||
Software update procedure:
|
||||
|
||||
@ -84,7 +90,6 @@ Method 2: The software has an integrated OTA software update capability.
|
||||
First you have to enable it by typing in the correct OTA passphrase (default: "wledota") in the settings menu.
|
||||
Remove the tick in the checkbox "OTA locked". Then save settings and reboot the ESP.
|
||||
Now you can go to "<moduleip>/update" to update binary firmware.
|
||||
To edit flash content (images and HTML), go to "<moduleip>/edit". (only if USEFS was uncommented in source)
|
||||
After you are done, it is recommended to lock the OTA function again.
|
||||
To do so, tick the checkbox again (you can change the passphrase by typing in a new one now). Reboot.
|
||||
If you try to access the update page now, you should see the message "OTA lock active".
|
||||
@ -104,9 +109,6 @@ You can adjust the position of the amplitude with the WARLS offset setting.
|
||||
Note that there is currently an issue preventing you from accessing the control web page while the script is running. HTTP requests work.
|
||||
|
||||
|
||||
Uses [WS2812FX](https://github.com/kitesurfer1404/WS2812FX)!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//#define RGBW
|
||||
#define RGBW
|
||||
|
||||
/*
|
||||
WS2812FX.h - Library for WS2812 LED effects.
|
||||
|
@ -62,7 +62,8 @@
|
||||
Use HSB sliders instead of RGB by default: <input type="checkbox" name="COLMD"> <br>
|
||||
<h3>LED setup</h3>
|
||||
LED count (max. 255): <input name="LEDCN" type="number" min="0" max="255" required> <br>
|
||||
<i>The default boot color is saved in preset slot 0.</i><br>
|
||||
<i>The default boot color is always saved in preset slot 0.</i><br>
|
||||
Alternatively, apply preset <input name="BOOTP" type="number" min="0" max="25" required> at boot<br>
|
||||
Default RGB color:
|
||||
<input name="CLDFR" type="number" min="0" max="255" required>
|
||||
<input name="CLDFG" type="number" min="0" max="255" required>
|
||||
|
File diff suppressed because one or more lines are too long
@ -62,6 +62,7 @@ Use HSB sliders instead of RGB by default: <input type="checkbox" name="COLMD">
|
||||
<h3>LED setup</h3>
|
||||
LED count (max. 255): <input name="LEDCN" type="number" min="0" max="255" required> <br>
|
||||
<i>The default boot color is saved in preset slot 0.</i><br>
|
||||
Alternatively, apply preset <input name="BOOTP" type="number" min="0" max="25" required> at boot<br>
|
||||
Default RGB color:
|
||||
<input name="CLDFR" type="number" min="0" max="255" required>
|
||||
<input name="CLDFG" type="number" min="0" max="255" required>
|
||||
|
@ -1,34 +0,0 @@
|
||||
#######################################
|
||||
# Syntax Coloring Map For Time
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
time_t KEYWORD1
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
now KEYWORD2
|
||||
second KEYWORD2
|
||||
minute KEYWORD2
|
||||
hour KEYWORD2
|
||||
day KEYWORD2
|
||||
month KEYWORD2
|
||||
year KEYWORD2
|
||||
isAM KEYWORD2
|
||||
isPM KEYWORD2
|
||||
weekday KEYWORD2
|
||||
setTime KEYWORD2
|
||||
adjustTime KEYWORD2
|
||||
setSyncProvider KEYWORD2
|
||||
setSyncInterval KEYWORD2
|
||||
timeStatus KEYWORD2
|
||||
TimeLib KEYWORD2
|
||||
#######################################
|
||||
# Instances (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
#######################################
|
||||
# Constants (LITERAL1)
|
||||
#######################################
|
@ -1,8 +0,0 @@
|
||||
TimeChangeRule KEYWORD1
|
||||
Timezone KEYWORD1
|
||||
toLocal KEYWORD2
|
||||
toUTC KEYWORD2
|
||||
utcIsDST KEYWORD2
|
||||
locIsDST KEYWORD2
|
||||
readRules KEYWORD2
|
||||
writeRules KEYWORD2
|
@ -20,7 +20,7 @@
|
||||
#include "WS2812FX.h"
|
||||
|
||||
//version in format yymmddb (b = daily build)
|
||||
#define VERSION 1712111
|
||||
#define VERSION 1712121
|
||||
|
||||
//If you have an RGBW strip, uncomment first line in WS2812FX.h!
|
||||
|
||||
@ -48,19 +48,20 @@
|
||||
#endif
|
||||
|
||||
//eeprom Version code, enables default settings instead of 0 init on update
|
||||
#define EEPVER 2
|
||||
#define EEPVER 3
|
||||
//0 -> old version, default
|
||||
//1 -> 0.4p 1711272 and up
|
||||
//2 -> 0.4p 1711302 and up
|
||||
//3 -> 0.4 1712121 and up
|
||||
|
||||
/*
|
||||
* @title WLED project sketch
|
||||
* @version 0.4p
|
||||
* @version 0.4
|
||||
* @author Christian Schwinne
|
||||
*/
|
||||
//Hardware-settings (only changeble via code)
|
||||
#define LEDCOUNT 93 //maximum, exact count set-able via settings
|
||||
#define MAXDIRECT 93 //for direct access like arls, should be >= LEDCOUNT
|
||||
#define LEDCOUNT 255 //maximum, exact count set-able via settings
|
||||
#define MAXDIRECT 255 //for direct access like arls, should be >= LEDCOUNT
|
||||
uint8_t buttonPin = 0; //needs pull-up
|
||||
uint8_t auxPin = 15; //use e.g. for external relay
|
||||
uint8_t auxDefaultState = 0; //0: input 1: high 2: low
|
||||
@ -78,7 +79,7 @@ time_t local;
|
||||
|
||||
//Default CONFIG
|
||||
uint8_t ledcount = 93;
|
||||
String serverDescription = "WLED 0.4p";
|
||||
String serverDescription = "WLED 0.4";
|
||||
String clientssid = "Your_Network_Here";
|
||||
String clientpass = "Dummy_Pass";
|
||||
String cmdns = "led";
|
||||
@ -92,9 +93,10 @@ IPAddress staticgateway(0, 0, 0, 0);
|
||||
IPAddress staticsubnet(255, 255, 255, 0);
|
||||
boolean useHSB = false, useHSBDefault = false;
|
||||
boolean turnOnAtBoot = true;
|
||||
uint8_t bootPreset = 0;
|
||||
byte col_s[]{255, 159, 0};
|
||||
byte col_sec_s[]{0, 0, 0};
|
||||
boolean useRGBW = false;
|
||||
boolean useRGBW = true;
|
||||
byte white_s = 0;
|
||||
byte white_sec_s = 0;
|
||||
byte bri_s = 127;
|
||||
@ -116,7 +118,7 @@ uint8_t effectSpeedDefault = 75;
|
||||
//NTP stuff
|
||||
boolean ntpEnabled = false;
|
||||
IPAddress ntpServerIP;
|
||||
const char* ntpServerName = "time.nist.gov";
|
||||
const char* ntpServerName = "pool.ntp.org";
|
||||
//custom chase
|
||||
uint8_t cc_numPrimary = 2;
|
||||
uint8_t cc_numSecondary = 4;
|
||||
|
@ -120,6 +120,7 @@ void saveSettingsToEEPROM()
|
||||
EEPROM.write(386, cc_fromStart);
|
||||
EEPROM.write(387, cc_fromEnd);
|
||||
EEPROM.write(388, cc_step);
|
||||
EEPROM.write(389, bootPreset);
|
||||
EEPROM.commit();
|
||||
}
|
||||
|
||||
@ -256,7 +257,7 @@ void loadSettingsFromEEPROM(bool first)
|
||||
cc_step = EEPROM.read(388);
|
||||
strip.setCustomChase(cc_index1, cc_index2, cc_start, cc_numPrimary, cc_numSecondary, cc_step, cc_fromStart, cc_fromEnd);
|
||||
}
|
||||
|
||||
bootPreset = EEPROM.read(389);
|
||||
|
||||
//favorite setting memory (25 slots/ each 20byte)
|
||||
//400 - 899 reserved
|
||||
|
@ -104,6 +104,7 @@ String getSettings()
|
||||
resp += ds + "CLDFW" + v + "-1;";
|
||||
}
|
||||
resp += ds + "BOOTN" + c + turnOnAtBoot +";";
|
||||
resp += ds + "BOOTP" + v + bootPreset +";";
|
||||
resp += ds + "FXDEF" + v + effectDefault +";";
|
||||
resp += ds + "SXDEF" + v + effectSpeedDefault +";";
|
||||
resp += ds + "GCBRI" + c + useGammaCorrectionBri +";";
|
||||
@ -161,7 +162,7 @@ String getSettings()
|
||||
resp += "Not active";
|
||||
}
|
||||
resp += "\";";
|
||||
resp += dg + "(\"msg\")[0]" + ih + "\"WLED 0.4p (build " + VERSION + ") OK\";";
|
||||
resp += dg + "(\"msg\")[0]" + ih + "\"WLED 0.4 (build " + VERSION + ") OK\";";
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
@ -164,6 +164,11 @@ void handleSettingsSet()
|
||||
if (i >= 0 && i <= 255) bri_s = i;
|
||||
}
|
||||
turnOnAtBoot = server.hasArg("BOOTN");
|
||||
if (server.hasArg("BOOTP"))
|
||||
{
|
||||
int i = server.arg("BOOTP").toInt();
|
||||
if (i >= 0 && i <= 25) bootPreset = i;
|
||||
}
|
||||
if (server.hasArg("FXDEF"))
|
||||
{
|
||||
int i = server.arg("FXDEF").toInt();
|
||||
|
@ -161,6 +161,7 @@ void wledInit()
|
||||
strip.setSpeed(effectSpeed);
|
||||
strip.setBrightness(255);
|
||||
strip.start();
|
||||
if (bootPreset>0) applyPreset(bootPreset, turnOnAtBoot, true, true);
|
||||
colorUpdated(0);
|
||||
pinMode(buttonPin, INPUT_PULLUP);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user