mirror of
https://github.com/Fishwaldo/WLED.git
synced 2025-07-06 04:58:31 +00:00
Release of WLED 0.3
version bump minor tweaks compressed HTMLs changed SN behavior to control direct notifications removed nightlight notification due to severe uselessness removed unnecessary bool2int function Updated binary
This commit is contained in:
parent
134ec052fc
commit
affb99507e
17 changed files with 432 additions and 457 deletions
5
TODO.txt
5
TODO.txt
|
@ -1,14 +1,10 @@
|
|||
captive portal for ap
|
||||
simple slide transition
|
||||
additional color picker field
|
||||
implement HSB slider option
|
||||
implement ranges
|
||||
implement discrete range color setter
|
||||
implement discrete single color setter
|
||||
svg icons in html
|
||||
add preferred colors to settings -> quickly t. UI, button select,
|
||||
use iframe for settings, seperate tabs for wifi and application confg
|
||||
use iframe for all adv. features?
|
||||
/dumpeeprom and /pusheeprom (ota lock!)
|
||||
(aux trigger pin) partially impl.
|
||||
audioWLED
|
||||
|
@ -50,7 +46,6 @@ BUGS
|
|||
general forced reset (usually around 48h)
|
||||
NTP crash (1-48h)
|
||||
losing connectivity
|
||||
Nightlight function
|
||||
off after forced reset (system query?)
|
||||
udp notifier doesn't work all the time
|
||||
static ip disables mdns
|
||||
|
|
BIN
bin/wled03_wemosd1mini_1705085.bin
Normal file
BIN
bin/wled03_wemosd1mini_1705085.bin
Normal file
Binary file not shown.
Binary file not shown.
|
@ -3,8 +3,8 @@ WLED is a basic, fast and (relatively) (ok, VERY relatively) secure implementati
|
|||
Uses ESP arduino version 2.3.0 (latest as of May 2017).
|
||||
Contents in the /data directory may be uploaded to SPIFFS.
|
||||
|
||||
Features: (V0.3pd)
|
||||
- RGB and brightness sliders
|
||||
Features: (V0.3)
|
||||
- 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!
|
||||
|
@ -15,7 +15,7 @@ Features: (V0.3pd)
|
|||
- Password protected OTA page for added security (OTA lock)
|
||||
- Alexa smart home device server
|
||||
- (unstable) NTP and experimental analog clock function
|
||||
- better client HTML page (not yet implemented)
|
||||
- client HTML controlled
|
||||
- Edit page. Change html and other files via OTA. (needs to be enabled in source)
|
||||
|
||||
Compile settings:
|
||||
|
|
86
wled00/data/index-min.htm
Normal file
86
wled00/data/index-min.htm
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<title>WLED 0.3pd</title>
|
||||
<title>WLED 0.3</title>
|
||||
<script>
|
||||
strA = "";
|
||||
strR = "";
|
||||
|
|
113
wled00/data/settings-min.htm
Normal file
113
wled00/data/settings-min.htm
Normal file
File diff suppressed because one or more lines are too long
|
@ -54,7 +54,6 @@
|
|||
document.S_form.NRBRI.value = this.responseXML.getElementsByTagName('nrbri')[0].innerHTML;
|
||||
document.S_form.NSDIR.checked = (this.responseXML.getElementsByTagName('nsdir')[0].innerHTML)!=0?true:false;
|
||||
document.S_form.NSBTN.checked = (this.responseXML.getElementsByTagName('nsbtn')[0].innerHTML)!=0?true:false;
|
||||
document.S_form.NSFWD.checked = (this.responseXML.getElementsByTagName('nsfwd')[0].innerHTML)!=0?true:false;
|
||||
document.S_form.ALEXA.checked = (this.responseXML.getElementsByTagName('alexa')[0].innerHTML)!=0?true:false;
|
||||
document.S_form.AINVN.value = this.responseXML.getElementsByTagName('ainvn')[0].innerHTML;
|
||||
document.S_form.NSALX.checked = (this.responseXML.getElementsByTagName('nsalx')[0].innerHTML)!=0?true:false;
|
||||
|
@ -149,7 +148,6 @@
|
|||
Receive notifications: <input type="checkbox" name="NRCVE"> <br>
|
||||
Send notifications on direct change: <input type="checkbox" name="NSDIR"> <br>
|
||||
Send notifications on button press: <input type="checkbox" name="NSBTN"> <br>
|
||||
Send nightlight notifications: <input type="checkbox" name="NSFWD"> <br>
|
||||
<h3>Interfaces</h3>
|
||||
Emulate Alexa device: <input type="checkbox" name="ALEXA"> <br>
|
||||
Alexa invocation name: <input name="AINVN" maxlength="32"><br>
|
||||
|
@ -176,7 +174,7 @@
|
|||
|
||||
HTTP traffic is not encrypted. An attacker in the same network could intercept form data!<br>
|
||||
<h3>About</h3>
|
||||
WLED version 0.3pd <br>
|
||||
WLED version 0.3 <br>
|
||||
(c) 2016-2017 Christian Schwinne <br>
|
||||
<i>Licensed under the MIT license</i> <br>
|
||||
<i>Uses libraries:</i> <br>
|
||||
|
|
290
wled00/htmls00.h
290
wled00/htmls00.h
File diff suppressed because one or more lines are too long
304
wled00/htmls01.h
304
wled00/htmls01.h
File diff suppressed because one or more lines are too long
|
@ -22,7 +22,7 @@
|
|||
#include "CallbackFunction.h"
|
||||
|
||||
//version in format yymmddb (b = daily build)
|
||||
#define VERSION 1705082
|
||||
#define VERSION 1705085
|
||||
|
||||
//to toggle usb serial debug (un)comment following line
|
||||
//#define DEBUG
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
/*
|
||||
* @title WLED project sketch
|
||||
* @version 0.3pd
|
||||
* @version 0.3
|
||||
* @author Christian Schwinne
|
||||
*/
|
||||
//Hardware-settings (only changeble via code)
|
||||
|
@ -86,7 +86,7 @@ uint16_t transitionDelay = 1500;
|
|||
boolean ota_lock = true;
|
||||
boolean only_ap = false;
|
||||
boolean buttonEnabled = true;
|
||||
boolean notifyDirect = true, notifyButton = true, notifyNightlight = false, notifyMaster = true;
|
||||
boolean notifyDirect = true, notifyButton = true, notifyDirectDefault = true;
|
||||
boolean receiveNotifications = true, receiveNotificationsDefault = true;
|
||||
uint8_t bri_n = 100;
|
||||
uint8_t nightlightDelayMins = 60;
|
||||
|
@ -223,12 +223,6 @@ void reset()
|
|||
ESP.reset();
|
||||
}
|
||||
|
||||
uint8_t bool2int(boolean value)
|
||||
{
|
||||
if (value) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setup() {
|
||||
wledInit();
|
||||
}
|
||||
|
|
|
@ -40,12 +40,12 @@ void saveSettingsToEEPROM()
|
|||
}
|
||||
EEPROM.write(224, nightlightDelayMins);
|
||||
EEPROM.write(225, nightlightFade);
|
||||
EEPROM.write(226, notifyDirect);
|
||||
EEPROM.write(226, notifyDirectDefault);
|
||||
EEPROM.write(227, apchannel);
|
||||
EEPROM.write(228, aphide);
|
||||
EEPROM.write(229, ledcount);
|
||||
EEPROM.write(230, notifyButton);
|
||||
EEPROM.write(231, notifyNightlight);
|
||||
//231 was notifyNightlight
|
||||
EEPROM.write(232, buttonEnabled);
|
||||
//233 reserved for first boot flag
|
||||
EEPROM.write(234, staticip[0]);
|
||||
|
@ -143,14 +143,15 @@ void loadSettingsFromEEPROM()
|
|||
}
|
||||
nightlightDelayMins = EEPROM.read(224);
|
||||
nightlightFade = EEPROM.read(225);
|
||||
notifyDirect = EEPROM.read(226);
|
||||
notifyDirectDefault = EEPROM.read(226);
|
||||
notifyDirect = notifyDirectDefault;
|
||||
apchannel = EEPROM.read(227);
|
||||
if (apchannel > 13 || apchannel < 1) apchannel = 1;
|
||||
aphide = EEPROM.read(228);
|
||||
if (aphide > 1) aphide = 1;
|
||||
ledcount = EEPROM.read(229);
|
||||
notifyButton = EEPROM.read(230);
|
||||
notifyNightlight = EEPROM.read(231);
|
||||
//231 was notifyNightlight
|
||||
buttonEnabled = EEPROM.read(232);
|
||||
staticip[0] = EEPROM.read(234);
|
||||
staticip[1] = EEPROM.read(235);
|
||||
|
|
|
@ -24,7 +24,7 @@ void XML_response()
|
|||
resp = resp + "</cl>";
|
||||
}
|
||||
resp = resp + "<ns>";
|
||||
resp = resp + notifyMaster;
|
||||
resp = resp + notifyDirect;
|
||||
resp = resp + "</ns><nr>";
|
||||
resp = resp + receiveNotifications;
|
||||
resp = resp + "</nr><nl>";
|
||||
|
@ -35,7 +35,7 @@ void XML_response()
|
|||
resp = resp + effectSpeed;
|
||||
resp = resp + "</sx>";
|
||||
resp = resp + "<md>";
|
||||
resp = resp + bool2int(useHSB);
|
||||
resp = resp + useHSB;
|
||||
resp = resp + "</md><desc>";
|
||||
resp = resp + serverDescription;
|
||||
resp = resp + "</desc>";
|
||||
|
@ -114,7 +114,7 @@ void XML_response_settings()
|
|||
resp = resp + bri_s;
|
||||
resp = resp + "</cldfa>";
|
||||
resp = resp + "<bootn>";
|
||||
resp = resp + bool2int(turnOnAtBoot);
|
||||
resp = resp + turnOnAtBoot;
|
||||
resp = resp + "</bootn>";
|
||||
resp = resp + "<fxdef>";
|
||||
resp = resp + effectDefault;
|
||||
|
@ -123,14 +123,14 @@ void XML_response_settings()
|
|||
resp = resp + effectSpeedDefault;
|
||||
resp = resp + "</sxdef>";
|
||||
resp = resp + "<gcbri>";
|
||||
resp = resp + bool2int(useGammaCorrectionBri);
|
||||
resp = resp + useGammaCorrectionBri;
|
||||
resp = resp + "</gcbri><gcrgb>";
|
||||
resp = resp + bool2int(useGammaCorrectionRGB);
|
||||
resp = resp + useGammaCorrectionRGB;
|
||||
resp = resp + "</gcrgb>";
|
||||
resp = resp + "<btnon>";
|
||||
resp = resp + bool2int(buttonEnabled);
|
||||
resp = resp + buttonEnabled;
|
||||
resp = resp + "</btnon><tfade>";
|
||||
resp = resp + bool2int(fadeTransition);
|
||||
resp = resp + fadeTransition;
|
||||
resp = resp + "</tfade><tdlay>";
|
||||
resp = resp + transitionDelay;
|
||||
resp = resp + "</tdlay>";
|
||||
|
@ -141,31 +141,29 @@ void XML_response_settings()
|
|||
resp = resp + nightlightDelayMins;
|
||||
resp = resp + "</tldur>";
|
||||
resp = resp + "<tlfde>";
|
||||
resp = resp + bool2int(nightlightFade);
|
||||
resp = resp + nightlightFade;
|
||||
resp = resp + "</tlfde>";
|
||||
resp = resp + "<nudpp>";
|
||||
resp = resp + udpPort;
|
||||
resp = resp + "</nudpp>";
|
||||
resp = resp + "<nrcve>";
|
||||
resp = resp + bool2int(receiveNotificationsDefault);
|
||||
resp = resp + receiveNotificationsDefault;
|
||||
resp = resp + "</nrcve><nrbri>";
|
||||
resp = resp + bri_n;
|
||||
resp = resp + "</nrbri><nsdir>";
|
||||
resp = resp + bool2int(notifyDirect);
|
||||
resp = resp + notifyDirectDefault;
|
||||
resp = resp + "</nsdir><nsbtn>";
|
||||
resp = resp + bool2int(notifyButton);
|
||||
resp = resp + "</nsbtn><nsfwd>";
|
||||
resp = resp + bool2int(notifyNightlight);
|
||||
resp = resp + "</nsfwd>";
|
||||
resp = resp + notifyButton;
|
||||
resp = resp + "</nsbtn><nsfwd>0</nsfwd>"; //legacy
|
||||
resp = resp + "<ntpon>";
|
||||
resp = resp + bool2int(ntpEnabled);
|
||||
resp = resp + ntpEnabled;
|
||||
resp = resp + "</ntpon>";
|
||||
resp = resp + "<alexa>";
|
||||
resp = resp + bool2int(alexaEnabled);
|
||||
resp = resp + alexaEnabled;
|
||||
resp = resp + "</alexa><ainvn>";
|
||||
resp = resp + alexaInvocationName;
|
||||
resp = resp + "</ainvn><nsalx>";
|
||||
resp = resp + bool2int(alexaNotify);
|
||||
resp = resp + alexaNotify;
|
||||
resp = resp + "</nsalx>";
|
||||
DEBUG_PRINTLN("pretime");
|
||||
resp = resp + "<times>";
|
||||
|
@ -178,10 +176,10 @@ void XML_response_settings()
|
|||
resp = resp + abs(arlsOffset);
|
||||
resp = resp + "</woffs>";
|
||||
resp = resp + "<woffn>";
|
||||
resp = resp + bool2int(!arlsSign);
|
||||
resp = resp + !arlsSign;
|
||||
resp = resp + "</woffn>";
|
||||
resp = resp + "<noota>";
|
||||
resp = resp + bool2int(ota_lock);
|
||||
resp = resp + ota_lock;
|
||||
resp = resp +"</noota>";
|
||||
resp = resp + "<norap>0</norap>"; //NI
|
||||
resp = resp + "<sip>";
|
||||
|
@ -213,7 +211,7 @@ void XML_response_settings()
|
|||
resp = resp + "Not active";
|
||||
}
|
||||
resp = resp + "</sip>";
|
||||
resp = resp + "<msg>WLED 0.3pd (build ";
|
||||
resp = resp + "<msg>WLED 0.3 (build ";
|
||||
resp = resp + VERSION;
|
||||
resp = resp + ") OK</msg>";
|
||||
resp = resp + "</vs>";
|
||||
|
|
|
@ -179,9 +179,9 @@ void handleSettingsSet()
|
|||
int i = server.arg("NRBRI").toInt();
|
||||
if (i > 0) bri_n = i;
|
||||
}
|
||||
notifyDirect = server.hasArg("NSDIR");
|
||||
notifyDirectDefault = server.hasArg("NSDIR");
|
||||
notifyDirect = notifyDirectDefault;
|
||||
notifyButton = server.hasArg("NSBTN");
|
||||
notifyNightlight = server.hasArg("NSFWD");
|
||||
alexaEnabled = server.hasArg("ALEXA");
|
||||
if (server.hasArg("AINVN")) alexaInvocationName = server.arg("AINVN");
|
||||
alexaNotify = server.hasArg("NSALX");
|
||||
|
@ -289,10 +289,10 @@ boolean handleSet(String req)
|
|||
}
|
||||
if (req.indexOf("SN=") > 0)
|
||||
{
|
||||
notifyMaster = true;
|
||||
notifyDirect = true;
|
||||
if (req.indexOf("SN=0") > 0)
|
||||
{
|
||||
notifyMaster = false;
|
||||
notifyDirect = false;
|
||||
}
|
||||
}
|
||||
if (req.indexOf("RN=") > 0)
|
||||
|
|
|
@ -126,8 +126,4 @@ void handleFileCreate(){
|
|||
|
||||
#else
|
||||
bool handleFileRead(String path){return false;}
|
||||
void handleFileList(){}
|
||||
void handleFileCreate(){}
|
||||
void handleFileDelete(){}
|
||||
void handleFileUpload(){}
|
||||
#endif
|
||||
|
|
|
@ -100,12 +100,14 @@ void wledInit()
|
|||
server.on("/edit", HTTP_GET, [](){
|
||||
if(!handleFileRead("/edit.htm")) server.send(200, "text/html", PAGE_edit);
|
||||
});
|
||||
#ifdef USEFS
|
||||
server.on("/edit", HTTP_PUT, handleFileCreate);
|
||||
server.on("/edit", HTTP_DELETE, handleFileDelete);
|
||||
server.on("/edit", HTTP_POST, [](){ server.send(200, "text/plain", ""); }, handleFileUpload);
|
||||
server.on("/list", HTTP_GET, handleFileList);
|
||||
#endif
|
||||
server.on("/down", HTTP_GET, down);
|
||||
server.on("/cleareeprom", HTTP_GET, clearEEPROM);
|
||||
server.on("/list", HTTP_GET, handleFileList);
|
||||
//init ota page
|
||||
httpUpdater.setup(&server);
|
||||
} else
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
void notify(uint8_t callMode)
|
||||
{
|
||||
if (!udpConnected || !notifyMaster) return;
|
||||
if (!udpConnected) return;
|
||||
switch (callMode)
|
||||
{
|
||||
case 1: if (!notifyDirect) return; break;
|
||||
case 2: if (!notifyButton) return; break;
|
||||
case 3: return;
|
||||
case 4: if (!notifyNightlight) return; break;
|
||||
case 4: if (!notifyDirect) return; break;
|
||||
case 6: if (!notifyDirect) return; break; //fx change
|
||||
default: return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue