Refactored settings names to save bandwidth and heap
Fixed update page back button
This commit is contained in:
parent
c93b185f54
commit
8d7a066680
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
245
wled00/htmls01.h
245
wled00/htmls01.h
@ -40,32 +40,32 @@ const char PAGE_settings_wifi1[] PROGMEM = R"=====(
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save & Reboot</button><hr>
|
||||
<h2>WiFi setup</h2>
|
||||
<h3>Connect to existing network</h3>
|
||||
Network name (SSID, empty to not connect): <br><input name="CSSID" maxlength="32"> <br>
|
||||
Network password: <br> <input type="password" name="CPASS" maxlength="63"> <br>
|
||||
Network name (SSID, empty to not connect): <br><input name="CS" maxlength="32"><br>
|
||||
Network password: <br> <input type="password" name="CP" maxlength="63"><br>
|
||||
Static IP (leave at 0.0.0.0 for DHCP):<br>
|
||||
<input name="CSIP0" type="number" min="0" max="255" required> .
|
||||
<input name="CSIP1" type="number" min="0" max="255" required> .
|
||||
<input name="CSIP2" type="number" min="0" max="255" required> .
|
||||
<input name="CSIP3" type="number" min="0" max="255" required> <br>
|
||||
<input name="I0" type="number" min="0" max="255" required> .
|
||||
<input name="I1" type="number" min="0" max="255" required> .
|
||||
<input name="I2" type="number" min="0" max="255" required> .
|
||||
<input name="I3" type="number" min="0" max="255" required><br>
|
||||
Static gateway:<br>
|
||||
<input name="CSGW0" type="number" min="0" max="255" required> .
|
||||
<input name="CSGW1" type="number" min="0" max="255" required> .
|
||||
<input name="CSGW2" type="number" min="0" max="255" required> .
|
||||
<input name="CSGW3" type="number" min="0" max="255" required> <br>
|
||||
<input name="G0" type="number" min="0" max="255" required> .
|
||||
<input name="G1" type="number" min="0" max="255" required> .
|
||||
<input name="G2" type="number" min="0" max="255" required> .
|
||||
<input name="G3" type="number" min="0" max="255" required><br>
|
||||
Static subnet mask:<br>
|
||||
<input name="CSSN0" type="number" min="0" max="255" required> .
|
||||
<input name="CSSN1" type="number" min="0" max="255" required> .
|
||||
<input name="CSSN2" type="number" min="0" max="255" required> .
|
||||
<input name="CSSN3" type="number" min="0" max="255" required> <br>
|
||||
<input name="S0" type="number" min="0" max="255" required> .
|
||||
<input name="S1" type="number" min="0" max="255" required> .
|
||||
<input name="S2" type="number" min="0" max="255" required> .
|
||||
<input name="S3" type="number" min="0" max="255" required><br>
|
||||
mDNS address (leave empty for no mDNS):<br/>
|
||||
http:// <input name="CMDNS" maxlength="32"> .local <br>
|
||||
Try connecting before opening AP for: <input name="APWTM" type="number" min="0" max="255" required> s <br>
|
||||
http:// <input name="CM" maxlength="32"> .local<br>
|
||||
Try connecting before opening AP for: <input name="AT" type="number" min="0" max="255" required> s <br>
|
||||
Client IP: <span class="sip"> Not connected </span><br>
|
||||
<h3>Configure Access Point</h3>
|
||||
AP SSID (leave empty for no AP): <br> <input name="APSSID" maxlength="32"> <br>
|
||||
Hide AP name: <input type="checkbox" name="APHSSID"> <br>
|
||||
AP password (leave empty for open): <br> <input type="password" name="APPASS" maxlength="63"> <br>
|
||||
Access Point WiFi channel: <input name="APCHAN" type="number" min="1" max="13" required> <br>
|
||||
AP SSID (leave empty for no AP):<br> <input name="AS" maxlength="32"><br>
|
||||
Hide AP name: <input type="checkbox" name="AH"><br>
|
||||
AP password (leave empty for open):<br> <input type="password" name="AP" maxlength="63"> <br>
|
||||
Access Point WiFi channel: <input name="AC" type="number" min="1" max="13" required><br>
|
||||
AP IP: <span class="sip"> Not active </span><hr>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save & Reboot</button>
|
||||
</form>
|
||||
@ -85,44 +85,43 @@ const char PAGE_settings_leds1[] PROGMEM = R"=====(
|
||||
<div class="helpB"><button type="button" onclick="H()">?</button></div>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
|
||||
<h2>LED setup</h2>
|
||||
LED count (max. 255): <input name="LEDCN" type="number" min="1" max="255" required> <br>
|
||||
LED count (max. 255): <input name="LC" type="number" min="1" max="255" required><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>
|
||||
Alternatively, apply preset <input name="BP" 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>
|
||||
<input name="CLDFB" type="number" min="0" max="255" required> <br>
|
||||
Default brightness: <input name="CLDFA" type="number" min="0" max="255" required> (0-255) <br>
|
||||
Default white value (only RGBW, -1 to disable): <input name="CLDFW" type="number" min="-1" max="255" required> <br>
|
||||
Default effect ID: <input name="FXDEF" type="number" min="0" max="57" required> <br>
|
||||
Default effect speed: <input name="SXDEF" type="number" min="0" max="255" required> <br>
|
||||
Default effect intensity: <input name="IXDEF" type="number" min="0" max="255" required> <br>
|
||||
<input name="CR" type="number" min="0" max="255" required>
|
||||
<input name="CG" type="number" min="0" max="255" required>
|
||||
<input name="CB" type="number" min="0" max="255" required><br>
|
||||
Default brightness: <input name="CA" type="number" min="0" max="255" required> (0-255)<br>
|
||||
Default white value (only RGBW, -1 to disable): <input name="CW" type="number" min="-1" max="255" required><br>
|
||||
Default effect ID: <input name="FX" type="number" min="0" max="57" required> <br>
|
||||
Default effect speed: <input name="SX" type="number" min="0" max="255" required> <br>
|
||||
Default effect intensity: <input name="IX" type="number" min="0" max="255" required> <br>
|
||||
Default secondary RGB(W):<br>
|
||||
<input name="CSECR" type="number" min="0" max="255" required>
|
||||
<input name="CSECG" type="number" min="0" max="255" required>
|
||||
<input name="CSECB" type="number" min="0" max="255" required>
|
||||
<input name="CSECW" type="number" min="0" max="255" required><br>
|
||||
Ignore and use current color, brightness and effects: <input type="checkbox" name="CBEOR"> <br>
|
||||
Turn on after power up/reset: <input type="checkbox" name="BOOTN"> <br>
|
||||
Use Gamma correction for brightness: <input type="checkbox" name="GCBRI"> <br>
|
||||
Use Gamma correction for color: <input type="checkbox" name="GCRGB"> <br>
|
||||
Brightness factor: <input name="NRBRI" type="number" min="0" max="255" required> %
|
||||
<input name="SR" type="number" min="0" max="255" required>
|
||||
<input name="SG" type="number" min="0" max="255" required>
|
||||
<input name="SB" type="number" min="0" max="255" required>
|
||||
<input name="SW" type="number" min="0" max="255" required><br>
|
||||
Ignore and use current color, brightness and effects: <input type="checkbox" name="IS"><br>
|
||||
Turn on after power up/reset: <input type="checkbox" name="BO"><br>
|
||||
Use Gamma correction for brightness: <input type="checkbox" name="GB"><br>
|
||||
Use Gamma correction for color: <input type="checkbox" name="GC"><br>
|
||||
Brightness factor: <input name="BF" type="number" min="0" max="255" required> %
|
||||
<h3>Transitions</h3>
|
||||
Fade: <input type="checkbox" name="TFADE"><br>
|
||||
Sweep: <input type="checkbox" name="TSWEE"> Invert direction: <input type="checkbox" name="TSDIR"><br>
|
||||
Transition Delay: <input name="TDLAY" maxlength="5" size="2"> ms
|
||||
Fade: <input type="checkbox" name="TF"><br>
|
||||
Sweep: <input type="checkbox" name="TS"> Invert direction: <input type="checkbox" name="TI"><br>
|
||||
Transition Delay: <input name="TD" maxlength="5" size="2"> ms
|
||||
<h3>Timed light</h3>
|
||||
Default Duration: <input name="TLDUR" type="number" min="1" max="255" required> min<br>
|
||||
Default Target brightness: <input name="TLBRI" type="number" min="0" max="255" required><br>
|
||||
Fade down: <input type="checkbox" name="TLFDE"><br>
|
||||
Default Duration: <input name="TL" type="number" min="1" max="255" required> min<br>
|
||||
Default Target brightness: <input name="TB" type="number" min="0" max="255" required><br>
|
||||
Fade down: <input type="checkbox" name="TW"><br>
|
||||
<h3>Advanced</h3>
|
||||
Reverse LED order (rotate 180): <input type="checkbox" name="LEDRV"><br>
|
||||
WARLS offset: <input name="WOFFS" type="number" min="-255" max="255" required><hr>
|
||||
Reverse LED order (rotate 180): <input type="checkbox" name="RV"><br>
|
||||
WARLS offset: <input name="WO" type="number" min="-255" max="255" required><hr>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
)=====";
|
||||
|
||||
const char PAGE_settings_ui0[] PROGMEM = R"=====(
|
||||
@ -139,10 +138,10 @@ const char PAGE_settings_ui1[] PROGMEM = R"=====(
|
||||
<div class="helpB"><button type="button" onclick="H()">?</button></div>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
|
||||
<h2>Web Setup</h2>
|
||||
Server description: <input name="DESC" maxlength="32"><br>
|
||||
Use HSB sliders instead of RGB by default: <input type="checkbox" name="COLMD"><br>
|
||||
Server description: <input name="DS" maxlength="32"><br>
|
||||
Use HSB sliders instead of RGB by default: <input type="checkbox" name="MD"><br>
|
||||
Color Theme:
|
||||
<select name="THEME" onchange="Ct()">
|
||||
<select name="TH" onchange="Ct()">
|
||||
<option value="0" selected>Night</option>
|
||||
<option value="1">Modern</option>
|
||||
<option value="2">Bright</option>
|
||||
@ -162,13 +161,13 @@ Color Theme:
|
||||
</select><br>
|
||||
<div id="cth">
|
||||
Please specify your custom hex colors (e.g. FF0000 for red)<br>
|
||||
Custom accent color: <input maxlength=9 name="CCOL0"><br>
|
||||
Custom background: <input maxlength=9 name="CCOL1"><br>
|
||||
Custom panel color: <input maxlength=9 name="CCOL2"><br>
|
||||
Custom icon color: <input maxlength=9 name="CCOL3"><br>
|
||||
Custom shadow: <input maxlength=9 name="CCOL4"><br>
|
||||
Custom text color: <input maxlength=9 name="CCOL5"><br></div>
|
||||
Use font: <input maxlength=32 name="CFONT"><br>
|
||||
Custom accent color: <input maxlength=9 name="C0"><br>
|
||||
Custom background: <input maxlength=9 name="C1"><br>
|
||||
Custom panel color: <input maxlength=9 name="C2"><br>
|
||||
Custom icon color: <input maxlength=9 name="C3"><br>
|
||||
Custom shadow: <input maxlength=9 name="C4"><br>
|
||||
Custom text color: <input maxlength=9 name="C5"><br></div>
|
||||
Use font: <input maxlength=32 name="CF"><br>
|
||||
Make sure the font you use is installed on your system!<br>
|
||||
<hr><button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
||||
</form>
|
||||
@ -189,34 +188,30 @@ const char PAGE_settings_sync1[] PROGMEM = R"=====(
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
|
||||
<h2>Sync setup</h2>
|
||||
<h3>Button setup</h3>
|
||||
On/Off button enabled: <input type="checkbox" name="BTNON">
|
||||
On/Off button enabled: <input type="checkbox" name="BT">
|
||||
<h3>WLED Broadcast</h3>
|
||||
UDP Port: <input name="NUDPP" maxlength="5" size="4"><br>
|
||||
Receive <input type="checkbox" name="NRCBR">Brightness, <input type="checkbox" name="NRCCL">Color, and <input type="checkbox" name="NRCFX">Effects<br>
|
||||
Send notifications on direct change: <input type="checkbox" name="NSDIR"><br>
|
||||
Send notifications on button press: <input type="checkbox" name="NSBTN"><br>
|
||||
Send Alexa notifications: <input type="checkbox" name="NSALX"><br>
|
||||
Send Philips Hue change notifications: <input type="checkbox" name="NSHUE">
|
||||
Send notifications twice: <input type="checkbox" name="NS2XS">
|
||||
UDP Port: <input name="UP" maxlength="5" size="4"><br>
|
||||
Receive <input type="checkbox" name="RB">Brightness, <input type="checkbox" name="RC">Color, and <input type="checkbox" name="RX">Effects<br>
|
||||
Send notifications on direct change: <input type="checkbox" name="SD"><br>
|
||||
Send notifications on button press: <input type="checkbox" name="SB"><br>
|
||||
Send Alexa notifications: <input type="checkbox" name="SA"><br>
|
||||
Send Philips Hue change notifications: <input type="checkbox" name="SH"><br>
|
||||
Send notifications twice: <input type="checkbox" name="S2">
|
||||
<h3>Alexa Voice Assistant</h3>
|
||||
Emulate Alexa device: <input type="checkbox" name="ALEXA"><br>
|
||||
Alexa invocation name: <input name="AINVN" maxlength="32"><br>
|
||||
Emulate Alexa device: <input type="checkbox" name="AL"><br>
|
||||
Alexa invocation name: <input name="AI" maxlength="32"><br>
|
||||
<h3>Philips Hue</h3>
|
||||
<i>You can find the bridge IP and the light number in the 'About' section of the hue app.</i><br>
|
||||
Hue Bridge IP:<br>
|
||||
<input name="HUIP0" type="number" min="0" max="255" required> .
|
||||
<input name="HUIP1" type="number" min="0" max="255" required> .
|
||||
<input name="HUIP2" type="number" min="0" max="255" required> .
|
||||
<input name="HUIP3" type="number" min="0" max="255" required> <br>
|
||||
<input name="H0" type="number" min="0" max="255" required> .
|
||||
<input name="H1" type="number" min="0" max="255" required> .
|
||||
<input name="H2" type="number" min="0" max="255" required> .
|
||||
<input name="H3" type="number" min="0" max="255" required><br>
|
||||
<b>Press the pushlink button on the bridge, after that save this page!</b><br>
|
||||
(when first connecting)<br>
|
||||
<!--Update Hue group <input name="HUEGR" type="number" min="0" max="99" required> <br>
|
||||
Send <input type="checkbox" name="HUEIO"> On/Off, <input type="checkbox" name="HUEBR"> Brightness, and <input type="checkbox" name="HUECL"> Color<br>-->
|
||||
Poll Hue light <input name="HUELI" type="number" min="1" max="99" required> every <input name="HUEPI" type="number" min="100" max="65000" required> ms: <input type="checkbox" name="HUEPL"><br>
|
||||
Then, receive <input type="checkbox" name="HURIO"> On/Off, <input type="checkbox" name="HURBR"> Brightness, and <input type="checkbox" name="HURCL"> Color<br>
|
||||
<!--After device color update, ignore Hue updates for <input name="HUELI" type="number" min="0" max="255" required> minutes<br>-->
|
||||
Hue status: <span class="hms"> Internal ESP Error! </span>
|
||||
<hr>
|
||||
Poll Hue light <input name="HL" type="number" min="1" max="99" required> every <input name="HI" type="number" min="100" max="65000" required> ms: <input type="checkbox" name="HP"><br>
|
||||
Then, receive <input type="checkbox" name="HO"> On/Off, <input type="checkbox" name="HB"> Brightness, and <input type="checkbox" name="HC"> Color<br>
|
||||
Hue status: <span class="hms"> Internal ESP Error! </span><hr>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
||||
</form>
|
||||
</body>
|
||||
@ -235,10 +230,10 @@ const char PAGE_settings_time1[] PROGMEM = R"=====(
|
||||
<div class="helpB"><button type="button" onclick="H()">?</button></div>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr>
|
||||
<h2>Time setup</h2>
|
||||
Get time from NTP server: <input type="checkbox" name="NTPON"><br>
|
||||
Use 24h format: <input type="checkbox" name="CL24H"><br>
|
||||
Get time from NTP server: <input type="checkbox" name="NT"><br>
|
||||
Use 24h format: <input type="checkbox" name="CF"><br>
|
||||
Time zone:
|
||||
<select name="TZONE">
|
||||
<select name="TZ">
|
||||
<option value="0" selected>GMT(UTC)</option>
|
||||
<option value="1">GMT/BST</option>
|
||||
<option value="2">CET/CEST</option>
|
||||
@ -253,11 +248,11 @@ Time zone:
|
||||
<option value="11">AEST/AEDT</option>
|
||||
<option value="12">NZST/NZDT</option>
|
||||
</select><br>
|
||||
UTC offset: <input name="UTCOS" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
|
||||
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
|
||||
Current local time is <span class="times">unknown</span>.
|
||||
<h3>Clock</h3>
|
||||
Clock Overlay:
|
||||
<select name="OLMDE" onchange="Cs()">
|
||||
<select name="OL" onchange="Cs()">
|
||||
<option value="0" id="cn" selected>None</option>
|
||||
<option value="1">Static color</option>
|
||||
<option value="2" id="ca">Analog Clock</option>
|
||||
@ -265,46 +260,44 @@ Clock Overlay:
|
||||
<option value="4" id="cc">Cronixie Clock</option>
|
||||
</select><br>
|
||||
<div id="coc">
|
||||
First LED: <input name="OLIN1" type="number" min="0" max="255" required> Last LED: <input name="OLIN2" type="number" min="0" max="255" required><br>
|
||||
First LED: <input name="O1" type="number" min="0" max="255" required> Last LED: <input name="O2" type="number" min="0" max="255" required><br>
|
||||
<div id="cac">
|
||||
12h LED: <input name="OLINM" type="number" min="0" max="255" required><br>
|
||||
Show 5min marks: <input type="checkbox" name="OL5MI"><br></div>
|
||||
Seconds (as trail): <input type="checkbox" name="OLSTR"><br>
|
||||
12h LED: <input name="OM" type="number" min="0" max="255" required><br>
|
||||
Show 5min marks: <input type="checkbox" name="O5"><br></div>
|
||||
Seconds (as trail): <input type="checkbox" name="OS"><br>
|
||||
</div>
|
||||
<div id="ccc">
|
||||
Cronixie Display: <input name="CRONX" maxlength="6"><br>
|
||||
Cronixie Backlight: <input type="checkbox" name="CROBL"><br>
|
||||
Cronixie Display: <input name="CX" maxlength="6"><br>
|
||||
Cronixie Backlight: <input type="checkbox" name="CB"><br>
|
||||
</div>
|
||||
Countdown Mode: <input type="checkbox" name="CLCND"><br>
|
||||
Countdown Goal: Year: 20 <input name="CDGYR" type="number" min="0" max="99" required> Month: <input name="CDGMN" type="number" min="1" max="12" required> Day: <input name="CDGDY" type="number" min="1" max="31" required><br>
|
||||
Hour: <input name="CDGHR" type="number" min="0" max="23" required> Minute: <input name="CDGMI" type="number" min="0" max="59" required> Second: <input name="CDGSC" type="number" min="0" max="59" required><br>
|
||||
Countdown Mode: <input type="checkbox" name="CE"><br>
|
||||
Countdown Goal: Year: 20 <input name="CY" type="number" min="0" max="99" required> Month: <input name="CI" type="number" min="1" max="12" required> Day: <input name="CD" type="number" min="1" max="31" required><br>
|
||||
Hour: <input name="CH" type="number" min="0" max="23" required> Minute: <input name="CM" type="number" min="0" max="59" required> Second: <input name="CS" type="number" min="0" max="59" required><br>
|
||||
<h3>Advanced Macros</h3>
|
||||
Define API macros here:<br>
|
||||
1: <input name="MC1" maxlength="64"><br>
|
||||
2: <input name="MC2" maxlength="64"><br>
|
||||
3: <input name="MC3" maxlength="64"><br>
|
||||
4: <input name="MC4" maxlength="64"><br>
|
||||
5: <input name="MC5" maxlength="64"><br>
|
||||
6: <input name="MC6" maxlength="64"><br>
|
||||
7: <input name="MC7" maxlength="64"><br>
|
||||
8: <input name="MC8" maxlength="64"><br>
|
||||
9: <input name="MC9" maxlength="64"><br>
|
||||
10: <input name="MC10" maxlength="64"><br>
|
||||
11: <input name="MC11" maxlength="64"><br>
|
||||
12: <input name="MC12" maxlength="64"><br>
|
||||
13: <input name="MC13" maxlength="64"><br>
|
||||
14: <input name="MC14" maxlength="64"><br>
|
||||
15: <input name="MC15" maxlength="64"><br>
|
||||
16: <input name="MC16" maxlength="64"><br>
|
||||
<br>
|
||||
1: <input name="M1" maxlength="64"><br>
|
||||
2: <input name="M2" maxlength="64"><br>
|
||||
3: <input name="M3" maxlength="64"><br>
|
||||
4: <input name="M4" maxlength="64"><br>
|
||||
5: <input name="M5" maxlength="64"><br>
|
||||
6: <input name="M6" maxlength="64"><br>
|
||||
7: <input name="M7" maxlength="64"><br>
|
||||
8: <input name="M8" maxlength="64"><br>
|
||||
9: <input name="M9" maxlength="64"><br>
|
||||
10: <input name="M10" maxlength="64"><br>
|
||||
11: <input name="M11" maxlength="64"><br>
|
||||
12: <input name="M12" maxlength="64"><br>
|
||||
13: <input name="M13" maxlength="64"><br>
|
||||
14: <input name="M14" maxlength="64"><br>
|
||||
15: <input name="M15" maxlength="64"><br>
|
||||
16: <input name="M16" maxlength="64"><br><br>
|
||||
<i>Use 0 for the default action instead of a macro</i><br>
|
||||
Time controlled macros coming soon!<br>
|
||||
Boot Macro: <input name="MCRBT" type="number" min="0" max="16" required><br>
|
||||
Alexa On/Off Macros: <input name="MCA0I" type="number" min="0" max="16" required> <input name="MCA0O" type="number" min="0" max="16" required><br>
|
||||
Button Macro: <input name="MCB0D" type="number" min="0" max="16" required> Long Press: <input name="MCB0L" type="number" min="0" max="16" required><br>
|
||||
Countdown-Over Macro: <input name="MCNTD" type="number" min="0" max="16" required><br>
|
||||
Timed-Light-Over Macro: <input name="MCNLO" type="number" min="0" max="16" required><br>
|
||||
<hr>
|
||||
Boot Macro: <input name="MB" type="number" min="0" max="16" required><br>
|
||||
Alexa On/Off Macros: <input name="A0" type="number" min="0" max="16" required> <input name="A1" type="number" min="0" max="16" required><br>
|
||||
Button Macro: <input name="MP" type="number" min="0" max="16" required> Long Press: <input name="ML" type="number" min="0" max="16" required><br>
|
||||
Countdown-Over Macro: <input name="MC" type="number" min="0" max="16" required><br>
|
||||
Timed-Light-Over Macro: <input name="MN" type="number" min="0" max="16" required><hr>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
||||
</form>
|
||||
</body>
|
||||
@ -324,22 +317,22 @@ const char PAGE_settings_sec1[] PROGMEM = R"=====(
|
||||
<div class="helpB"><button type="button" onclick="H()">?</button></div>
|
||||
<button type="button" onclick="B()">Back</button><button type="submit">Save & Reboot</button><hr>
|
||||
<h2>Security & Update setup</h2>
|
||||
Enable OTA lock: <input type="checkbox" name="NOOTA"><br>
|
||||
Passphrase: <input type="password" name="OPASS" maxlength="32"><br>
|
||||
Enable OTA lock: <input type="checkbox" name="NO"><br>
|
||||
Passphrase: <input type="password" name="OP" maxlength="32"><br>
|
||||
To enable OTA, for security reasons you need to also enter the correct password!<br>
|
||||
The password may/should be changed when OTA is enabled.<br>
|
||||
<b>Disable OTA when not in use, otherwise an attacker could reflash device software!</b><br>
|
||||
The password should be changed when OTA is enabled.<br>
|
||||
<b>Disable OTA when not in use, otherwise an attacker can reflash device software!</b><br>
|
||||
<i>Settings on this page are only changable if OTA lock is disabled!</i><br>
|
||||
Deny access to WiFi settings if locked: <input type="checkbox" name="OWIFI"><br><br>
|
||||
Disable recovery AP: <input type="checkbox" name="NORAP"><br>
|
||||
In case of a connection error there will be no wireless recovery possible!<br>
|
||||
Deny access to WiFi settings if locked: <input type="checkbox" name="OW"><br><br>
|
||||
Disable recovery AP: <input type="checkbox" name="NA"><br>
|
||||
In case of an error there will be no wireless recovery possible!<br>
|
||||
Completely disables all Access Point functions.<br><br>
|
||||
Factory reset: <input type="checkbox" name="RESET"><br>
|
||||
Factory reset: <input type="checkbox" name="RS"><br>
|
||||
All EEPROM content (settings) will be erased.<br><br>
|
||||
HTTP traffic is not encrypted. An attacker in the same network could intercept form data!
|
||||
HTTP traffic is unencrypted. An attacker in the same network can intercept form data!
|
||||
<h3>Software Update</h3>
|
||||
<button type="button" onclick="U()">Manual OTA Update</button><br>
|
||||
Enable ArduinoOTA: <input type="checkbox" name="AROTA"><br>
|
||||
Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
|
||||
<h3>About</h3>
|
||||
<a href="https://github.com/Aircoookie/WLED">WLED</a> version 0.6.0<br>
|
||||
(c) 2016-2018 Christian Schwinne <br>
|
||||
|
@ -15,7 +15,7 @@ const char* ESP8266HTTPUpdateServer::_serverIndex =
|
||||
R"(<html><head><script>function B(){window.history.back()}</script></head><body><h2>WLED Software Update</h2><br>Get the latest binaries on the <a href="https://github.com/Aircoookie/WLED/tree/master/bin">project GitHub page</a>!<br>
|
||||
<i>Unsure which binary is correct? Go to the <a href="./build">/build subpage</a> for the details of this version.</i><br>
|
||||
<b>Be sure to upload a valid .bin file for your ESP! Otherwise you'll need USB recovery!</b><br>
|
||||
<br><br><button onclick="B()\">Back</button><br><br>
|
||||
<br><br><button onclick='B()'>Back</button><br><br>
|
||||
<form method='POST' action='' enctype='multipart/form-data'>
|
||||
<input type='file' name='update'>
|
||||
<input type='submit' value='Update!'>
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "WS2812FX.h"
|
||||
|
||||
//version in format yymmddb (b = daily build)
|
||||
#define VERSION 1803143
|
||||
#define VERSION 1803144
|
||||
const String versionString = "0.6.0";
|
||||
|
||||
//AP and OTA default passwords (change them!)
|
||||
|
@ -7,7 +7,7 @@ void XML_response()
|
||||
String resp;
|
||||
resp = resp + "<?xml version = \"1.0\" ?>";
|
||||
resp = resp + "<vs>";
|
||||
resp = resp + "<act>";
|
||||
resp = resp + "<ac>";
|
||||
if (nightlightActive && nightlightFade)
|
||||
{
|
||||
resp = resp + briT;
|
||||
@ -15,7 +15,7 @@ void XML_response()
|
||||
{
|
||||
resp = resp + bri;
|
||||
}
|
||||
resp = resp + "</act>";
|
||||
resp = resp + "</ac>";
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
@ -49,9 +49,9 @@ void XML_response()
|
||||
}
|
||||
resp = resp + "</wv><md>";
|
||||
resp = resp + useHSB;
|
||||
resp = resp + "</md><desc>";
|
||||
resp = resp + "</md><ds>";
|
||||
resp = resp + serverDescription;
|
||||
resp = resp + "</desc>";
|
||||
resp = resp + "</ds>";
|
||||
resp = resp + "</vs>";
|
||||
server.send(200, "text/xml", resp);
|
||||
}
|
||||
@ -73,36 +73,36 @@ String getSettings(byte subPage)
|
||||
String si = ".selectedIndex=";
|
||||
|
||||
if (subPage == 1) {
|
||||
resp += ds + "CSSID" + v + "\"" + clientSSID + "\";";
|
||||
resp += ds + "CPASS" + v + "\"";
|
||||
resp += ds + "CS" + v + "\"" + clientSSID + "\";";
|
||||
resp += ds + "CP" + v + "\"";
|
||||
for (int i = 0; i < clientPass.length(); i++)
|
||||
{
|
||||
resp += "*";
|
||||
}
|
||||
resp += "\";";
|
||||
resp += ds + "CSIP0" + v + staticIP[0] +";";
|
||||
resp += ds + "CSIP1" + v + staticIP[1] +";";
|
||||
resp += ds + "CSIP2" + v + staticIP[2] +";";
|
||||
resp += ds + "CSIP3" + v + staticIP[3] +";";
|
||||
resp += ds + "CSGW0" + v + staticGateway[0] +";";
|
||||
resp += ds + "CSGW1" + v + staticGateway[1] +";";
|
||||
resp += ds + "CSGW2" + v + staticGateway[2] +";";
|
||||
resp += ds + "CSGW3" + v + staticGateway[3] +";";
|
||||
resp += ds + "CSSN0" + v + staticSubnet[0] +";";
|
||||
resp += ds + "CSSN1" + v + staticSubnet[1] +";";
|
||||
resp += ds + "CSSN2" + v + staticSubnet[2] +";";
|
||||
resp += ds + "CSSN3" + v + staticSubnet[3] +";";
|
||||
resp += ds + "CMDNS" + v + "\"" + cmDNS + "\";";
|
||||
resp += ds + "APWTM" + v + apWaitTimeSecs +";";
|
||||
resp += ds + "APSSID" + v + "\"" + apSSID + "\";";
|
||||
resp += ds + "APHSSID" + c + apHide + ";";
|
||||
resp += ds + "APPASS" + v + "\"";
|
||||
resp += ds + "I0" + v + staticIP[0] +";";
|
||||
resp += ds + "I1" + v + staticIP[1] +";";
|
||||
resp += ds + "I2" + v + staticIP[2] +";";
|
||||
resp += ds + "I3" + v + staticIP[3] +";";
|
||||
resp += ds + "G0" + v + staticGateway[0] +";";
|
||||
resp += ds + "G1" + v + staticGateway[1] +";";
|
||||
resp += ds + "G2" + v + staticGateway[2] +";";
|
||||
resp += ds + "G3" + v + staticGateway[3] +";";
|
||||
resp += ds + "S0" + v + staticSubnet[0] +";";
|
||||
resp += ds + "S1" + v + staticSubnet[1] +";";
|
||||
resp += ds + "S2" + v + staticSubnet[2] +";";
|
||||
resp += ds + "S3" + v + staticSubnet[3] +";";
|
||||
resp += ds + "CM" + v + "\"" + cmDNS + "\";";
|
||||
resp += ds + "AT" + v + apWaitTimeSecs +";";
|
||||
resp += ds + "AS" + v + "\"" + apSSID + "\";";
|
||||
resp += ds + "AH" + c + apHide + ";";
|
||||
resp += ds + "AP" + v + "\"";
|
||||
for (int i = 0; i < apPass.length(); i++)
|
||||
{
|
||||
resp += "*";
|
||||
}
|
||||
resp += "\";";
|
||||
resp += ds + "APCHAN" + v + apChannel +";";
|
||||
resp += ds + "AC" + v + apChannel +";";
|
||||
resp += dg + "(\"sip\")[0]" + ih + "\"";
|
||||
if (!WiFi.localIP()[0] == 0)
|
||||
{
|
||||
@ -136,117 +136,117 @@ String getSettings(byte subPage)
|
||||
}
|
||||
|
||||
if (subPage == 2) {
|
||||
resp += ds + "LEDCN" + v + ledCount +";";
|
||||
resp += ds + "CLDFR" + v + colS[0] +";";
|
||||
resp += ds + "CLDFG" + v + colS[1] +";";
|
||||
resp += ds + "CLDFB" + v + colS[2] +";";
|
||||
resp += ds + "CLDFA" + v + briS +";";
|
||||
resp += ds + "LC" + v + ledCount +";";
|
||||
resp += ds + "CR" + v + colS[0] +";";
|
||||
resp += ds + "CG" + v + colS[1] +";";
|
||||
resp += ds + "CB" + v + colS[2] +";";
|
||||
resp += ds + "CA" + v + briS +";";
|
||||
if (useRGBW) {
|
||||
resp += ds + "CLDFW" + v + whiteS +";";
|
||||
resp += ds + "CW" + v + whiteS +";";
|
||||
} else {
|
||||
resp += ds + "CLDFW" + v + "-1;";
|
||||
resp += ds + "CW" + v + "-1;";
|
||||
}
|
||||
resp += ds + "CSECR" + v + colSecS[0] +";";
|
||||
resp += ds + "CSECG" + v + colSecS[1] +";";
|
||||
resp += ds + "CSECB" + v + colSecS[2] +";";
|
||||
resp += ds + "CSECW" + v + whiteSecS +";";
|
||||
resp += ds + "BOOTN" + c + turnOnAtBoot +";";
|
||||
resp += ds + "BOOTP" + v + bootPreset +";";
|
||||
resp += ds + "FXDEF" + v + effectDefault +";";
|
||||
resp += ds + "SXDEF" + v + effectSpeedDefault +";";
|
||||
resp += ds + "IXDEF" + v + effectIntensityDefault +";";
|
||||
resp += ds + "GCBRI" + c + useGammaCorrectionBri +";";
|
||||
resp += ds + "GCRGB" + c + useGammaCorrectionRGB +";";
|
||||
resp += ds + "TFADE" + c + fadeTransition +";";
|
||||
resp += ds + "TSWEE" + c + sweepTransition +";";
|
||||
resp += ds + "TSDIR" + c + !sweepDirection +";";
|
||||
resp += ds + "TDLAY" + v + transitionDelay +";";
|
||||
resp += ds + "NRBRI" + v + briMultiplier +";";
|
||||
resp += ds + "TLBRI" + v + nightlightTargetBri +";";
|
||||
resp += ds + "TLDUR" + v + nightlightDelayMins +";";
|
||||
resp += ds + "TLFDE" + c + nightlightFade +";";
|
||||
resp += ds + "LEDRV" + c + reverseMode +";";
|
||||
resp += ds + "WOFFS" + v + arlsOffset +";";
|
||||
resp += ds + "SR" + v + colSecS[0] +";";
|
||||
resp += ds + "SG" + v + colSecS[1] +";";
|
||||
resp += ds + "SB" + v + colSecS[2] +";";
|
||||
resp += ds + "SW" + v + whiteSecS +";";
|
||||
resp += ds + "BO" + c + turnOnAtBoot +";";
|
||||
resp += ds + "BP" + v + bootPreset +";";
|
||||
resp += ds + "FX" + v + effectDefault +";";
|
||||
resp += ds + "SX" + v + effectSpeedDefault +";";
|
||||
resp += ds + "IX" + v + effectIntensityDefault +";";
|
||||
resp += ds + "GB" + c + useGammaCorrectionBri +";";
|
||||
resp += ds + "GC" + c + useGammaCorrectionRGB +";";
|
||||
resp += ds + "TF" + c + fadeTransition +";";
|
||||
resp += ds + "TS" + c + sweepTransition +";";
|
||||
resp += ds + "TI" + c + !sweepDirection +";";
|
||||
resp += ds + "TD" + v + transitionDelay +";";
|
||||
resp += ds + "BF" + v + briMultiplier +";";
|
||||
resp += ds + "TB" + v + nightlightTargetBri +";";
|
||||
resp += ds + "TL" + v + nightlightDelayMins +";";
|
||||
resp += ds + "TW" + c + nightlightFade +";";
|
||||
resp += ds + "RV" + c + reverseMode +";";
|
||||
resp += ds + "WO" + v + arlsOffset +";";
|
||||
}
|
||||
|
||||
if (subPage == 3)
|
||||
{
|
||||
resp += ds + "DESC" + v + "\"" + serverDescription + "\";";
|
||||
resp += ds + "COLMD" + c + useHSBDefault + ";";
|
||||
resp += ds + "THEME" + si + String(currentTheme) + ";";
|
||||
resp += ds + "DS" + v + "\"" + serverDescription + "\";";
|
||||
resp += ds + "MD" + c + useHSBDefault + ";";
|
||||
resp += ds + "TH" + si + String(currentTheme) + ";";
|
||||
for(int i=0;i<6;i++)
|
||||
resp += ds + "CCOL" + i + v + "\"" + cssCol[i] + "\";";
|
||||
resp += ds + "CFONT" + v + "\"" + cssFont + "\";";
|
||||
resp += ds + "C" + i + v + "\"" + cssCol[i] + "\";";
|
||||
resp += ds + "CF" + v + "\"" + cssFont + "\";";
|
||||
}
|
||||
|
||||
if (subPage == 4)
|
||||
{
|
||||
resp += ds + "BTNON" + c + buttonEnabled +";";
|
||||
resp += ds + "NUDPP" + v + udpPort +";";
|
||||
resp += ds + "NRCBR" + c + receiveNotificationBrightness +";";
|
||||
resp += ds + "NRCCL" + c + receiveNotificationColor +";";
|
||||
resp += ds + "NRCFX" + c + receiveNotificationEffects +";";
|
||||
resp += ds + "NSDIR" + c + notifyDirectDefault +";";
|
||||
resp += ds + "NSBTN" + c + notifyButton +";";
|
||||
resp += ds + "NSHUE" + c + notifyHue +";";
|
||||
resp += ds + "NS2XS" + c + notifyTwice +";";
|
||||
resp += ds + "ALEXA" + c + alexaEnabled +";";
|
||||
resp += ds + "AINVN" + v + "\"" + alexaInvocationName + "\";";
|
||||
resp += ds + "NSALX" + c + alexaNotify +";";
|
||||
resp += ds + "HUIP0" + v + hueIP[0] +";";
|
||||
resp += ds + "HUIP1" + v + hueIP[1] +";";
|
||||
resp += ds + "HUIP2" + v + hueIP[2] +";";
|
||||
resp += ds + "HUIP3" + v + hueIP[3] +";";
|
||||
resp += ds + "HUELI" + v + huePollLightId +";";
|
||||
resp += ds + "HUEPI" + v + huePollIntervalMs +";";
|
||||
resp += ds + "HUEPL" + c + huePollingEnabled +";";
|
||||
resp += ds + "HURIO" + c + hueApplyOnOff +";";
|
||||
resp += ds + "HURBR" + c + hueApplyBri +";";
|
||||
resp += ds + "HURCL" + c + hueApplyColor +";";
|
||||
resp += ds + "BT" + c + buttonEnabled +";";
|
||||
resp += ds + "UP" + v + udpPort +";";
|
||||
resp += ds + "RB" + c + receiveNotificationBrightness +";";
|
||||
resp += ds + "RC" + c + receiveNotificationColor +";";
|
||||
resp += ds + "RX" + c + receiveNotificationEffects +";";
|
||||
resp += ds + "SD" + c + notifyDirectDefault +";";
|
||||
resp += ds + "SB" + c + notifyButton +";";
|
||||
resp += ds + "SH" + c + notifyHue +";";
|
||||
resp += ds + "S2" + c + notifyTwice +";";
|
||||
resp += ds + "AL" + c + alexaEnabled +";";
|
||||
resp += ds + "AI" + v + "\"" + alexaInvocationName + "\";";
|
||||
resp += ds + "SA" + c + alexaNotify +";";
|
||||
resp += ds + "H0" + v + hueIP[0] +";";
|
||||
resp += ds + "H1" + v + hueIP[1] +";";
|
||||
resp += ds + "H2" + v + hueIP[2] +";";
|
||||
resp += ds + "H3" + v + hueIP[3] +";";
|
||||
resp += ds + "HL" + v + huePollLightId +";";
|
||||
resp += ds + "HI" + v + huePollIntervalMs +";";
|
||||
resp += ds + "HP" + c + huePollingEnabled +";";
|
||||
resp += ds + "HO" + c + hueApplyOnOff +";";
|
||||
resp += ds + "HB" + c + hueApplyBri +";";
|
||||
resp += ds + "HC" + c + hueApplyColor +";";
|
||||
resp += dg + "(\"hms\")[0]" + ih + "\"" + hueError + "\";";
|
||||
}
|
||||
|
||||
if (subPage == 5)
|
||||
{
|
||||
resp += ds + "NTPON" + c + ntpEnabled +";";
|
||||
resp += ds + "CL24H" + c + !useAMPM +";";
|
||||
resp += ds + "TZONE" + si + String(currentTimezone) + ";";
|
||||
resp += ds + "UTCOS" + v + utcOffsetSecs +";";
|
||||
resp += ds + "NT" + c + ntpEnabled +";";
|
||||
resp += ds + "CF" + c + !useAMPM +";";
|
||||
resp += ds + "TZ" + si + String(currentTimezone) + ";";
|
||||
resp += ds + "UO" + v + utcOffsetSecs +";";
|
||||
resp += dg + "(\"times\")[0]" + ih + "\"" + getTimeString() + "\";";
|
||||
resp += ds + "OLMDE" + si + String(overlayCurrent) + ";";
|
||||
resp += ds + "OLIN1" + v + overlayMin +";";
|
||||
resp += ds + "OLIN2" + v + overlayMax +";";
|
||||
resp += ds + "OLINM" + v + analogClock12pixel +";";
|
||||
resp += ds + "OLSTR" + c + analogClockSecondsTrail +";";
|
||||
resp += ds + "OL5MI" + c + analogClock5MinuteMarks +";";
|
||||
resp += ds + "CRONX" + v + "\"" + cronixieDisplay + "\";";
|
||||
resp += ds + "CROBL" + c + cronixieBacklight +";";
|
||||
resp += ds + "CLCND" + c + countdownMode +";";
|
||||
resp += ds + "CDGYR" + v + countdownYear +";";
|
||||
resp += ds + "CDGMN" + v + countdownMonth +";";
|
||||
resp += ds + "CDGDY" + v + countdownDay +";";
|
||||
resp += ds + "CDGHR" + v + countdownHour +";";
|
||||
resp += ds + "CDGMI" + v + countdownMin +";";
|
||||
resp += ds + "CDGSC" + v + countdownSec +";";
|
||||
resp += ds + "OL" + si + String(overlayCurrent) + ";";
|
||||
resp += ds + "O1" + v + overlayMin +";";
|
||||
resp += ds + "O2" + v + overlayMax +";";
|
||||
resp += ds + "OM" + v + analogClock12pixel +";";
|
||||
resp += ds + "OS" + c + analogClockSecondsTrail +";";
|
||||
resp += ds + "O5" + c + analogClock5MinuteMarks +";";
|
||||
resp += ds + "CX" + v + "\"" + cronixieDisplay + "\";";
|
||||
resp += ds + "CB" + c + cronixieBacklight +";";
|
||||
resp += ds + "CE" + c + countdownMode +";";
|
||||
resp += ds + "CY" + v + countdownYear +";";
|
||||
resp += ds + "CI" + v + countdownMonth +";";
|
||||
resp += ds + "CD" + v + countdownDay +";";
|
||||
resp += ds + "CH" + v + countdownHour +";";
|
||||
resp += ds + "CM" + v + countdownMin +";";
|
||||
resp += ds + "CS" + v + countdownSec +";";
|
||||
for (int i=1;i<17;i++)
|
||||
{
|
||||
resp += ds + "MC" + String(i) + v + "\"" + loadMacro(i) + "\";";
|
||||
resp += ds + "M" + String(i) + v + "\"" + loadMacro(i) + "\";";
|
||||
}
|
||||
resp += ds + "MCRBT" + v + macroBoot +";";
|
||||
resp += ds + "MCA0I" + v + macroAlexaOn +";";
|
||||
resp += ds + "MCA0O" + v + macroAlexaOff +";";
|
||||
resp += ds + "MCB0D" + v + macroButton +";";
|
||||
resp += ds + "MCB0L" + v + macroLongPress +";";
|
||||
resp += ds + "MCNTD" + v + macroCountdown +";";
|
||||
resp += ds + "MCNLO" + v + macroNl +";";
|
||||
resp += ds + "MB" + v + macroBoot +";";
|
||||
resp += ds + "A0" + v + macroAlexaOn +";";
|
||||
resp += ds + "A1" + v + macroAlexaOff +";";
|
||||
resp += ds + "MP" + v + macroButton +";";
|
||||
resp += ds + "ML" + v + macroLongPress +";";
|
||||
resp += ds + "MC" + v + macroCountdown +";";
|
||||
resp += ds + "MN" + v + macroNl +";";
|
||||
}
|
||||
|
||||
if (subPage == 6)
|
||||
{
|
||||
resp += ds + "NOOTA" + c + otaLock +";";
|
||||
resp += ds + "OWIFI" + c + wifiLock +";";
|
||||
resp += ds + "AROTA" + c + aOtaEnabled +";";
|
||||
resp += ds + "NORAP" + c + recoveryAPDisabled +";";
|
||||
resp += ds + "NO" + c + otaLock +";";
|
||||
resp += ds + "OW" + c + wifiLock +";";
|
||||
resp += ds + "AO" + c + aOtaEnabled +";";
|
||||
resp += ds + "NA" + c + recoveryAPDisabled +";";
|
||||
resp += dg + "(\"msg\")[0]" + ih + "\"WLED "+ versionString +" (build " + VERSION + ") OK\";";
|
||||
}
|
||||
resp += "}</script>";
|
||||
|
@ -27,90 +27,90 @@ void handleSettingsSet(byte subPage)
|
||||
//WIFI SETTINGS
|
||||
if (subPage == 1)
|
||||
{
|
||||
if (server.hasArg("CSSID")) clientSSID = server.arg("CSSID");
|
||||
if (server.hasArg("CPASS"))
|
||||
if (server.hasArg("CS")) clientSSID = server.arg("CS");
|
||||
if (server.hasArg("CP"))
|
||||
{
|
||||
if (!server.arg("CPASS").indexOf('*') == 0)
|
||||
if (!server.arg("CP").indexOf('*') == 0)
|
||||
{
|
||||
DEBUG_PRINTLN("Setting pass");
|
||||
clientPass = server.arg("CPASS");
|
||||
clientPass = server.arg("CP");
|
||||
}
|
||||
}
|
||||
if (server.hasArg("CMDNS")) cmDNS = server.arg("CMDNS");
|
||||
if (server.hasArg("APWTM"))
|
||||
if (server.hasArg("CM")) cmDNS = server.arg("CM");
|
||||
if (server.hasArg("AT"))
|
||||
{
|
||||
int i = server.arg("APWTM").toInt();
|
||||
int i = server.arg("AT").toInt();
|
||||
if (i >= 0 && i <= 255) apWaitTimeSecs = i;
|
||||
}
|
||||
if (server.hasArg("APSSID")) apSSID = server.arg("APSSID");
|
||||
apHide = server.hasArg("APHSSID");
|
||||
if (server.hasArg("APPASS"))
|
||||
if (server.hasArg("AS")) apSSID = server.arg("AS");
|
||||
apHide = server.hasArg("AH");
|
||||
if (server.hasArg("AP"))
|
||||
{
|
||||
if (!server.arg("APPASS").indexOf('*') == 0) apPass = server.arg("APPASS");
|
||||
if (!server.arg("AP").indexOf('*') == 0) apPass = server.arg("AP");
|
||||
}
|
||||
if (server.hasArg("APCHAN"))
|
||||
if (server.hasArg("AC"))
|
||||
{
|
||||
int chan = server.arg("APCHAN").toInt();
|
||||
int chan = server.arg("AC").toInt();
|
||||
if (chan > 0 && chan < 14) apChannel = chan;
|
||||
}
|
||||
if (server.hasArg("CSIP0"))
|
||||
if (server.hasArg("I0"))
|
||||
{
|
||||
int i = server.arg("CSIP0").toInt();
|
||||
int i = server.arg("I0").toInt();
|
||||
if (i >= 0 && i <= 255) staticIP[0] = i;
|
||||
}
|
||||
if (server.hasArg("CSIP1"))
|
||||
if (server.hasArg("I1"))
|
||||
{
|
||||
int i = server.arg("CSIP1").toInt();
|
||||
int i = server.arg("I1").toInt();
|
||||
if (i >= 0 && i <= 255) staticIP[1] = i;
|
||||
}
|
||||
if (server.hasArg("CSIP2"))
|
||||
if (server.hasArg("I2"))
|
||||
{
|
||||
int i = server.arg("CSIP2").toInt();
|
||||
int i = server.arg("I2").toInt();
|
||||
if (i >= 0 && i <= 255) staticIP[2] = i;
|
||||
}
|
||||
if (server.hasArg("CSIP3"))
|
||||
if (server.hasArg("I3"))
|
||||
{
|
||||
int i = server.arg("CSIP3").toInt();
|
||||
int i = server.arg("I3").toInt();
|
||||
if (i >= 0 && i <= 255) staticIP[3] = i;
|
||||
}
|
||||
if (server.hasArg("CSGW0"))
|
||||
if (server.hasArg("G0"))
|
||||
{
|
||||
int i = server.arg("CSGW0").toInt();
|
||||
int i = server.arg("G0").toInt();
|
||||
if (i >= 0 && i <= 255) staticGateway[0] = i;
|
||||
}
|
||||
if (server.hasArg("CSGW1"))
|
||||
if (server.hasArg("G1"))
|
||||
{
|
||||
int i = server.arg("CSGW1").toInt();
|
||||
int i = server.arg("G1").toInt();
|
||||
if (i >= 0 && i <= 255) staticGateway[1] = i;
|
||||
}
|
||||
if (server.hasArg("CSGW2"))
|
||||
if (server.hasArg("G2"))
|
||||
{
|
||||
int i = server.arg("CSGW2").toInt();
|
||||
int i = server.arg("G2").toInt();
|
||||
if (i >= 0 && i <= 255) staticGateway[2] = i;
|
||||
}
|
||||
if (server.hasArg("CSGW3"))
|
||||
if (server.hasArg("G3"))
|
||||
{
|
||||
int i = server.arg("CSGW3").toInt();
|
||||
int i = server.arg("G3").toInt();
|
||||
if (i >= 0 && i <= 255) staticGateway[3] = i;
|
||||
}
|
||||
if (server.hasArg("CSSN0"))
|
||||
if (server.hasArg("S0"))
|
||||
{
|
||||
int i = server.arg("CSSN0").toInt();
|
||||
int i = server.arg("S0").toInt();
|
||||
if (i >= 0 && i <= 255) staticSubnet[0] = i;
|
||||
}
|
||||
if (server.hasArg("CSSN1"))
|
||||
if (server.hasArg("S1"))
|
||||
{
|
||||
int i = server.arg("CSSN1").toInt();
|
||||
int i = server.arg("S1").toInt();
|
||||
if (i >= 0 && i <= 255) staticSubnet[1] = i;
|
||||
}
|
||||
if (server.hasArg("CSSN2"))
|
||||
if (server.hasArg("S2"))
|
||||
{
|
||||
int i = server.arg("CSSN2").toInt();
|
||||
int i = server.arg("S2").toInt();
|
||||
if (i >= 0 && i <= 255) staticSubnet[2] = i;
|
||||
}
|
||||
if (server.hasArg("CSSN3"))
|
||||
if (server.hasArg("S3"))
|
||||
{
|
||||
int i = server.arg("CSSN3").toInt();
|
||||
int i = server.arg("S3").toInt();
|
||||
if (i >= 0 && i <= 255) staticSubnet[3] = i;
|
||||
}
|
||||
}
|
||||
@ -118,13 +118,13 @@ void handleSettingsSet(byte subPage)
|
||||
//LED SETTINGS
|
||||
if (subPage == 2)
|
||||
{
|
||||
if (server.hasArg("LEDCN"))
|
||||
if (server.hasArg("LC"))
|
||||
{
|
||||
int i = server.arg("LEDCN").toInt();
|
||||
int i = server.arg("LC").toInt();
|
||||
if (i >= 0 && i <= LEDCOUNT) ledCount = i;
|
||||
strip.setLedCount(ledCount);
|
||||
}
|
||||
if (server.hasArg("CBEOR")) //ignore settings and save current brightness, colors and fx as default
|
||||
if (server.hasArg("IS")) //ignore settings and save current brightness, colors and fx as default
|
||||
{
|
||||
colS[0] = col[0];
|
||||
colS[1] = col[1];
|
||||
@ -134,44 +134,44 @@ void handleSettingsSet(byte subPage)
|
||||
effectDefault = effectCurrent;
|
||||
effectSpeedDefault = effectSpeed;
|
||||
} else {
|
||||
if (server.hasArg("CLDFR"))
|
||||
if (server.hasArg("CR"))
|
||||
{
|
||||
int i = server.arg("CLDFR").toInt();
|
||||
int i = server.arg("CR").toInt();
|
||||
if (i >= 0 && i <= 255) colS[0] = i;
|
||||
}
|
||||
if (server.hasArg("CLDFG"))
|
||||
if (server.hasArg("CG"))
|
||||
{
|
||||
int i = server.arg("CLDFG").toInt();
|
||||
int i = server.arg("CG").toInt();
|
||||
if (i >= 0 && i <= 255) colS[1] = i;
|
||||
}
|
||||
if (server.hasArg("CLDFB"))
|
||||
if (server.hasArg("CB"))
|
||||
{
|
||||
int i = server.arg("CLDFB").toInt();
|
||||
int i = server.arg("CB").toInt();
|
||||
if (i >= 0 && i <= 255) colS[2] = i;
|
||||
}
|
||||
if (server.hasArg("CSECR"))
|
||||
if (server.hasArg("SR"))
|
||||
{
|
||||
int i = server.arg("CSECR").toInt();
|
||||
int i = server.arg("SR").toInt();
|
||||
if (i >= 0 && i <= 255) colSecS[0] = i;
|
||||
}
|
||||
if (server.hasArg("CSECG"))
|
||||
if (server.hasArg("SG"))
|
||||
{
|
||||
int i = server.arg("CSECG").toInt();
|
||||
int i = server.arg("SG").toInt();
|
||||
if (i >= 0 && i <= 255) colSecS[1] = i;
|
||||
}
|
||||
if (server.hasArg("CSECB"))
|
||||
if (server.hasArg("SB"))
|
||||
{
|
||||
int i = server.arg("CSECB").toInt();
|
||||
int i = server.arg("SB").toInt();
|
||||
if (i >= 0 && i <= 255) colSecS[2] = i;
|
||||
}
|
||||
if (server.hasArg("CSECW"))
|
||||
if (server.hasArg("SW"))
|
||||
{
|
||||
int i = server.arg("CSECW").toInt();
|
||||
int i = server.arg("SW").toInt();
|
||||
if (i >= 0 && i <= 255) whiteSecS = i;
|
||||
}
|
||||
if (server.hasArg("CLDFW"))
|
||||
if (server.hasArg("CW"))
|
||||
{
|
||||
int i = server.arg("CLDFW").toInt();
|
||||
int i = server.arg("CW").toInt();
|
||||
if (i >= 0 && i <= 255)
|
||||
{
|
||||
useRGBW = true;
|
||||
@ -181,65 +181,65 @@ void handleSettingsSet(byte subPage)
|
||||
whiteS = 0;
|
||||
}
|
||||
}
|
||||
if (server.hasArg("CLDFA"))
|
||||
if (server.hasArg("CA"))
|
||||
{
|
||||
int i = server.arg("CLDFA").toInt();
|
||||
int i = server.arg("CA").toInt();
|
||||
if (i >= 0 && i <= 255) briS = i;
|
||||
}
|
||||
if (server.hasArg("FXDEF"))
|
||||
if (server.hasArg("FX"))
|
||||
{
|
||||
int i = server.arg("FXDEF").toInt();
|
||||
int i = server.arg("FX").toInt();
|
||||
if (i >= 0 && i <= 255) effectDefault = i;
|
||||
}
|
||||
if (server.hasArg("SXDEF"))
|
||||
if (server.hasArg("SX"))
|
||||
{
|
||||
int i = server.arg("SXDEF").toInt();
|
||||
int i = server.arg("SX").toInt();
|
||||
if (i >= 0 && i <= 255) effectSpeedDefault = i;
|
||||
}
|
||||
if (server.hasArg("IXDEF"))
|
||||
if (server.hasArg("IX"))
|
||||
{
|
||||
int i = server.arg("IXDEF").toInt();
|
||||
int i = server.arg("IX").toInt();
|
||||
if (i >= 0 && i <= 255) effectIntensityDefault = i;
|
||||
}
|
||||
}
|
||||
turnOnAtBoot = server.hasArg("BOOTN");
|
||||
if (server.hasArg("BOOTP"))
|
||||
turnOnAtBoot = server.hasArg("BO");
|
||||
if (server.hasArg("BP"))
|
||||
{
|
||||
int i = server.arg("BOOTP").toInt();
|
||||
int i = server.arg("BP").toInt();
|
||||
if (i >= 0 && i <= 25) bootPreset = i;
|
||||
}
|
||||
useGammaCorrectionBri = server.hasArg("GCBRI");
|
||||
useGammaCorrectionRGB = server.hasArg("GCRGB");
|
||||
fadeTransition = server.hasArg("TFADE");
|
||||
sweepTransition = server.hasArg("TSWEE");
|
||||
sweepDirection = !server.hasArg("TSDIR");
|
||||
if (server.hasArg("TDLAY"))
|
||||
useGammaCorrectionBri = server.hasArg("GB");
|
||||
useGammaCorrectionRGB = server.hasArg("GC");
|
||||
fadeTransition = server.hasArg("TF");
|
||||
sweepTransition = server.hasArg("TS");
|
||||
sweepDirection = !server.hasArg("TI");
|
||||
if (server.hasArg("TD"))
|
||||
{
|
||||
int i = server.arg("TDLAY").toInt();
|
||||
int i = server.arg("TD").toInt();
|
||||
if (i > 0){
|
||||
transitionDelay = i;
|
||||
}
|
||||
}
|
||||
if (server.hasArg("TLBRI"))
|
||||
if (server.hasArg("TB"))
|
||||
{
|
||||
nightlightTargetBri = server.arg("TLBRI").toInt();
|
||||
nightlightTargetBri = server.arg("TB").toInt();
|
||||
}
|
||||
if (server.hasArg("TLDUR"))
|
||||
if (server.hasArg("TL"))
|
||||
{
|
||||
int i = server.arg("TLDUR").toInt();
|
||||
int i = server.arg("TL").toInt();
|
||||
if (i > 0) nightlightDelayMins = i;
|
||||
}
|
||||
nightlightFade = server.hasArg("TLFDE");
|
||||
reverseMode = server.hasArg("LEDRV");
|
||||
nightlightFade = server.hasArg("TW");
|
||||
reverseMode = server.hasArg("RV");
|
||||
strip.setReverseMode(reverseMode);
|
||||
if (server.hasArg("WOFFS"))
|
||||
if (server.hasArg("WO"))
|
||||
{
|
||||
int i = server.arg("WOFFS").toInt();
|
||||
int i = server.arg("WO").toInt();
|
||||
if (i >= -255 && i <= 255) arlsOffset = i;
|
||||
}
|
||||
if (server.hasArg("NRBRI"))
|
||||
if (server.hasArg("BF"))
|
||||
{
|
||||
int i = server.arg("NRBRI").toInt();
|
||||
int i = server.arg("BF").toInt();
|
||||
if (i > 0) briMultiplier = i;
|
||||
}
|
||||
}
|
||||
@ -247,57 +247,57 @@ void handleSettingsSet(byte subPage)
|
||||
//UI
|
||||
if (subPage == 3)
|
||||
{
|
||||
if (server.hasArg("DESC")) serverDescription = server.arg("DESC");
|
||||
useHSBDefault = server.hasArg("COLMD");
|
||||
if (server.hasArg("DS")) serverDescription = server.arg("DS");
|
||||
useHSBDefault = server.hasArg("MD");
|
||||
useHSB = useHSBDefault;
|
||||
if (server.hasArg("THEME")) currentTheme = server.arg("THEME").toInt();
|
||||
if (server.hasArg("TH")) currentTheme = server.arg("TH").toInt();
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
if (server.hasArg("CCOL"+String(i))) cssCol[i] = server.arg("CCOL"+String(i));
|
||||
if (server.hasArg("C"+String(i))) cssCol[i] = server.arg("C"+String(i));
|
||||
}
|
||||
if (server.hasArg("CFONT")) cssFont = server.arg("CFONT");
|
||||
if (server.hasArg("CF")) cssFont = server.arg("CF");
|
||||
buildCssColorString();
|
||||
}
|
||||
|
||||
//SYNC
|
||||
if (subPage == 4)
|
||||
{
|
||||
buttonEnabled = server.hasArg("BTNON");
|
||||
if (server.hasArg("NUDPP"))
|
||||
buttonEnabled = server.hasArg("BT");
|
||||
if (server.hasArg("UP"))
|
||||
{
|
||||
udpPort = server.arg("NUDPP").toInt();
|
||||
udpPort = server.arg("UP").toInt();
|
||||
}
|
||||
receiveNotificationBrightness = server.hasArg("NRCBR");
|
||||
receiveNotificationColor = server.hasArg("NRCCL");
|
||||
receiveNotificationEffects = server.hasArg("NRCFX");
|
||||
receiveNotificationBrightness = server.hasArg("RB");
|
||||
receiveNotificationColor = server.hasArg("RC");
|
||||
receiveNotificationEffects = server.hasArg("RX");
|
||||
receiveNotifications = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects);
|
||||
notifyDirectDefault = server.hasArg("NSDIR");
|
||||
notifyDirectDefault = server.hasArg("SD");
|
||||
notifyDirect = notifyDirectDefault;
|
||||
notifyButton = server.hasArg("NSBTN");
|
||||
notifyTwice = server.hasArg("NS2XS");
|
||||
alexaEnabled = server.hasArg("ALEXA");
|
||||
if (server.hasArg("AINVN")) alexaInvocationName = server.arg("AINVN");
|
||||
alexaNotify = server.hasArg("NSALX");
|
||||
notifyHue = server.hasArg("NSHUE");
|
||||
notifyButton = server.hasArg("SB");
|
||||
notifyTwice = server.hasArg("S2");
|
||||
alexaEnabled = server.hasArg("AL");
|
||||
if (server.hasArg("AI")) alexaInvocationName = server.arg("AI");
|
||||
alexaNotify = server.hasArg("SA");
|
||||
notifyHue = server.hasArg("SH");
|
||||
for (int i=0;i<4;i++){
|
||||
String a = "HUIP"+String(i);
|
||||
String a = "H"+String(i);
|
||||
if (server.hasArg(a))
|
||||
hueIP[i] = server.arg(a).toInt();
|
||||
}
|
||||
if (server.hasArg("HUELI"))
|
||||
if (server.hasArg("HL"))
|
||||
{
|
||||
int i = server.arg("HUELI").toInt();
|
||||
int i = server.arg("HL").toInt();
|
||||
if (i > 0) huePollLightId = i;
|
||||
}
|
||||
if (server.hasArg("HUEPI"))
|
||||
if (server.hasArg("HI"))
|
||||
{
|
||||
int i = server.arg("HUEPI").toInt();
|
||||
int i = server.arg("HI").toInt();
|
||||
if (i > 50) huePollIntervalMs = i;
|
||||
}
|
||||
hueApplyOnOff = server.hasArg("HURIO");
|
||||
hueApplyBri = server.hasArg("HURBR");
|
||||
hueApplyColor = server.hasArg("HURCL");
|
||||
if (server.hasArg("HUEPL"))
|
||||
hueApplyOnOff = server.hasArg("HO");
|
||||
hueApplyBri = server.hasArg("HB");
|
||||
hueApplyColor = server.hasArg("HC");
|
||||
if (server.hasArg("HP"))
|
||||
{
|
||||
if (!huePollingEnabled) hueAttempt = true;
|
||||
if (!setupHue()) hueAttempt = true;
|
||||
@ -311,56 +311,56 @@ void handleSettingsSet(byte subPage)
|
||||
//TIME
|
||||
if (subPage == 5)
|
||||
{
|
||||
ntpEnabled = server.hasArg("NTPON");
|
||||
useAMPM = !server.hasArg("CL24H");
|
||||
if (server.hasArg("TZONE")) currentTimezone = server.arg("TZONE").toInt();
|
||||
if (server.hasArg("UTCOS")) utcOffsetSecs = server.arg("UTCOS").toInt();
|
||||
ntpEnabled = server.hasArg("NT");
|
||||
useAMPM = !server.hasArg("CF");
|
||||
if (server.hasArg("TZ")) currentTimezone = server.arg("TZ").toInt();
|
||||
if (server.hasArg("UO")) utcOffsetSecs = server.arg("UO").toInt();
|
||||
if (ntpEnabled && WiFi.status() == WL_CONNECTED && !ntpConnected) ntpConnected = ntpUdp.begin(ntpLocalPort); //start if not already connected
|
||||
|
||||
if (server.hasArg("OLMDE")){
|
||||
overlayDefault = server.arg("OLMDE").toInt();
|
||||
if (server.hasArg("OL")){
|
||||
overlayDefault = server.arg("OL").toInt();
|
||||
overlayCurrent = overlayDefault;
|
||||
strip.unlockAll();
|
||||
}
|
||||
if (server.hasArg("OLIN1")) overlayMin = server.arg("OLIN1").toInt();
|
||||
if (server.hasArg("OLIN2")) overlayMax = server.arg("OLIN2").toInt();
|
||||
if (server.hasArg("OLINM")) analogClock12pixel = server.arg("OLINM").toInt();
|
||||
analogClock5MinuteMarks = server.hasArg("OL5MI");
|
||||
analogClockSecondsTrail = server.hasArg("OLSTR");
|
||||
if (server.hasArg("O1")) overlayMin = server.arg("O1").toInt();
|
||||
if (server.hasArg("O2")) overlayMax = server.arg("O2").toInt();
|
||||
if (server.hasArg("OM")) analogClock12pixel = server.arg("OM").toInt();
|
||||
analogClock5MinuteMarks = server.hasArg("O5");
|
||||
analogClockSecondsTrail = server.hasArg("OS");
|
||||
|
||||
if (server.hasArg("CRONX")) cronixieDisplay = server.arg("CRONX");
|
||||
if (server.hasArg("CX")) cronixieDisplay = server.arg("CX");
|
||||
bool cbOld = cronixieBacklight;
|
||||
cronixieBacklight = server.hasArg("CROBL");
|
||||
cronixieBacklight = server.hasArg("CB");
|
||||
if (cbOld != cronixieBacklight && overlayCurrent == 4)
|
||||
{
|
||||
strip.setCronixieBacklight(cronixieBacklight); overlayRefreshedTime = 0;
|
||||
}
|
||||
countdownMode = server.hasArg("CLCND");
|
||||
if (server.hasArg("CDGYR")) countdownYear = server.arg("CDGYR").toInt();
|
||||
if (server.hasArg("CDGMN")) countdownMonth = server.arg("CDGMN").toInt();
|
||||
if (server.hasArg("CDGDY")) countdownDay = server.arg("CDGDY").toInt();
|
||||
if (server.hasArg("CDGHR")) countdownHour = server.arg("CDGHR").toInt();
|
||||
if (server.hasArg("CDGMI")) countdownMin = server.arg("CDGMI").toInt();
|
||||
if (server.hasArg("CDGSC")) countdownSec = server.arg("CDGSC").toInt();
|
||||
countdownMode = server.hasArg("CE");
|
||||
if (server.hasArg("CY")) countdownYear = server.arg("CY").toInt();
|
||||
if (server.hasArg("CI")) countdownMonth = server.arg("CI").toInt();
|
||||
if (server.hasArg("CD")) countdownDay = server.arg("CD").toInt();
|
||||
if (server.hasArg("CH")) countdownHour = server.arg("CH").toInt();
|
||||
if (server.hasArg("CM")) countdownMin = server.arg("CM").toInt();
|
||||
if (server.hasArg("CS")) countdownSec = server.arg("CS").toInt();
|
||||
|
||||
for (int i=1;i<17;i++)
|
||||
{
|
||||
String a = "MC"+String(i);
|
||||
String a = "M"+String(i);
|
||||
if (server.hasArg(a)) saveMacro(i,server.arg(a),false);
|
||||
}
|
||||
if (server.hasArg("MCRBT")) macroBoot = server.arg("MCRBT").toInt();
|
||||
if (server.hasArg("MCA0I")) macroAlexaOn = server.arg("MCA0I").toInt();
|
||||
if (server.hasArg("MCA0O")) macroAlexaOff = server.arg("MCA0O").toInt();
|
||||
if (server.hasArg("MCB0D")) macroButton = server.arg("MCB0D").toInt();
|
||||
if (server.hasArg("MCB0L")) macroLongPress = server.arg("MCB0L").toInt();
|
||||
if (server.hasArg("MCNTD")) macroCountdown = server.arg("MCNTD").toInt();
|
||||
if (server.hasArg("MCNLO")) macroNl = server.arg("MCNLO").toInt();
|
||||
if (server.hasArg("MB")) macroBoot = server.arg("MB").toInt();
|
||||
if (server.hasArg("A0")) macroAlexaOn = server.arg("A0").toInt();
|
||||
if (server.hasArg("A1")) macroAlexaOff = server.arg("A1").toInt();
|
||||
if (server.hasArg("MP")) macroButton = server.arg("MP").toInt();
|
||||
if (server.hasArg("ML")) macroLongPress = server.arg("ML").toInt();
|
||||
if (server.hasArg("MC")) macroCountdown = server.arg("MC").toInt();
|
||||
if (server.hasArg("MN")) macroNl = server.arg("MN").toInt();
|
||||
}
|
||||
|
||||
//SECURITY
|
||||
if (subPage == 6)
|
||||
{
|
||||
if (server.hasArg("RESET"))
|
||||
if (server.hasArg("RS"))
|
||||
{
|
||||
clearEEPROM();
|
||||
serveMessage(200, "All Settings erased.", "Connect to WLED-AP to setup again...",255);
|
||||
@ -368,24 +368,24 @@ void handleSettingsSet(byte subPage)
|
||||
}
|
||||
|
||||
bool pwdCorrect = !otaLock; //always allow access if ota not locked
|
||||
if (server.hasArg("OPASS"))
|
||||
if (server.hasArg("OP"))
|
||||
{
|
||||
if (otaLock && otaPass.equals(server.arg("OPASS")))
|
||||
if (otaLock && otaPass.equals(server.arg("OP")))
|
||||
{
|
||||
pwdCorrect = true;
|
||||
}
|
||||
if (!otaLock && server.arg("OPASS").length() > 0)
|
||||
if (!otaLock && server.arg("OP").length() > 0)
|
||||
{
|
||||
otaPass = server.arg("OPASS");
|
||||
otaPass = server.arg("OP");
|
||||
}
|
||||
}
|
||||
|
||||
if (pwdCorrect) //allow changes if correct pwd or no ota active
|
||||
{
|
||||
otaLock = server.hasArg("NOOTA");
|
||||
wifiLock = server.hasArg("OWIFI");
|
||||
recoveryAPDisabled = server.hasArg("NORAP");
|
||||
aOtaEnabled = server.hasArg("AROTA");
|
||||
otaLock = server.hasArg("NO");
|
||||
wifiLock = server.hasArg("OW");
|
||||
recoveryAPDisabled = server.hasArg("NA");
|
||||
aOtaEnabled = server.hasArg("AO");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user