Minor adjustments

This commit is contained in:
cschwinne 2020-02-09 10:35:32 +01:00
parent 398816dbeb
commit ad4acca17a
6 changed files with 23 additions and 18 deletions

View File

@ -105,6 +105,9 @@
<h3>MQTT</h3> <h3>MQTT</h3>
Enable MQTT: <input type="checkbox" name="MQ"><br> Enable MQTT: <input type="checkbox" name="MQ"><br>
Broker: <input name="MS" maxlength="32"><br> Broker: <input name="MS" maxlength="32"><br>
Port: <input name="MQPORT" type="number" min="1" max="65535"><br>
<b>The MQTT credentials are sent over an unsecured connection.<br>
Never use the MQTT password for another service!</b><br>
Username: <input name="MQTTUSER" maxlength="32"><br> Username: <input name="MQTTUSER" maxlength="32"><br>
Password: <input type="password" input name="MQTTPASS" maxlength="32"><br> Password: <input type="password" input name="MQTTPASS" maxlength="32"><br>
Client ID: <input name="MQTTCID" maxlength="32"><br> Client ID: <input name="MQTTCID" maxlength="32"><br>
@ -113,18 +116,15 @@
<a href="https://github.com/Aircoookie/WLED/wiki/MQTT" target="_blank">MQTT info</a> <a href="https://github.com/Aircoookie/WLED/wiki/MQTT" target="_blank">MQTT info</a>
<h3>Philips Hue</h3> <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> <i>You can find the bridge IP and the light number in the 'About' section of the hue app.</i><br>
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> Poll Hue light <input name="HL" type="number" min="1" max="99"> every <input name="HI" type="number" min="100" max="65000"> 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> Then, receive <input type="checkbox" name="HO"> On/Off, <input type="checkbox" name="HB"> Brightness, and <input type="checkbox" name="HC"> Color<br>
Hue Bridge IP:<br> Hue Bridge IP:<br>
<input name="H0" type="number" min="0" max="255" required> . <input name="H0" type="number" min="0" max="255"> .
<input name="H1" type="number" min="0" max="255" required> . <input name="H1" type="number" min="0" max="255"> .
<input name="H2" type="number" min="0" max="255" required> . <input name="H2" type="number" min="0" max="255"> .
<input name="H3" type="number" min="0" max="255" required><br> <input name="H3" type="number" min="0" max="255"><br>
<b>Press the pushlink button on the bridge, after that save this page!</b><br> <b>Press the pushlink button on the bridge, after that save this page!</b><br>
(when first connecting)<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>-->
<!--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> Hue status: <span class="hms"> Internal ESP Error! </span><hr>
<button type="button" onclick="B()">Back</button><button type="submit">Save</button> <button type="button" onclick="B()">Back</button><button type="submit">Save</button>
</form> </form>

View File

@ -20,7 +20,7 @@ const char PAGE_msg[] PROGMEM = R"=====(<!DOCTYPE html>
const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html> const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html>
<html><head><meta content='width=device-width' name='viewport'><title>WLED Update</title><script>function B(){window.history.back()}</script> <html><head><meta content='width=device-width' name='viewport'><title>WLED Update</title><script>function B(){window.history.back()}</script>
<style>.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}</style></head> <style>.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}</style></head>
<body><h2>WLED Software Update</h2>Installed version: 0.9.0-b1<br>Download the latest binary: <a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br><form method='POST' action='/update' enctype='multipart/form-data'><input type='file' class="bt" name='update' required><br><input type='submit' class="bt" value='Update!'></form><button type="button" class="bt" onclick="B()">Back</button></body></html>)====="; <body><h2>WLED Software Update</h2>Installed version: 0.9.1<br>Download the latest binary: <a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br><form method='POST' action='/update' enctype='multipart/form-data'><input type='file' class="bt" name='update' required><br><input type='submit' class="bt" value='Update!'></form><button type="button" class="bt" onclick="B()">Back</button></body></html>)=====";
//new user welcome page //new user welcome page

View File

@ -223,7 +223,7 @@ Device Auth token: <input name="BK" maxlength="33"><br>
<h3>MQTT</h3> <h3>MQTT</h3>
Enable MQTT: <input type="checkbox" name="MQ"><br> Enable MQTT: <input type="checkbox" name="MQ"><br>
Broker: <input name="MS" maxlength="32"> Broker: <input name="MS" maxlength="32">
Port: <input name="MQPORT" type="number" min="1" max="65535" required><br> Port: <input name="MQPORT" type="number" min="1" max="65535"><br>
<b>The MQTT credentials are sent over an unsecured connection.<br> <b>The MQTT credentials are sent over an unsecured connection.<br>
Never use the MQTT password for another service!</b><br> Never use the MQTT password for another service!</b><br>
Username: <input name="MQUSER" maxlength="40"><br> Username: <input name="MQUSER" maxlength="40"><br>
@ -370,7 +370,7 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
<button type="button" onclick="U()">Manual OTA Update</button><br> <button type="button" onclick="U()">Manual OTA Update</button><br>
Enable ArduinoOTA: <input type="checkbox" name="AO"><br> Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
<h3>About</h3> <h3>About</h3>
<a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> version 0.9.0-b2<br><br> <a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> version 0.9.1<br><br>
<a href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About" target="_blank">Contributors, dependencies and special thanks</a><br> <a href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About" target="_blank">Contributors, dependencies and special thanks</a><br>
A huge thank you to everyone who helped me create WLED!<br><br> A huge thank you to everyone who helped me create WLED!<br><br>
(c) 2016-2020 Christian Schwinne <br> (c) 2016-2020 Christian Schwinne <br>

View File

@ -3,7 +3,7 @@
*/ */
/* /*
* @title WLED project sketch * @title WLED project sketch
* @version 0.9.0-b2 * @version 0.9.1
* @author Christian Schwinne * @author Christian Schwinne
*/ */
@ -90,9 +90,9 @@
#endif #endif
//version code in format yymmddb (b = daily build) //version code in format yymmddb (b = daily build)
#define VERSION 2001281 #define VERSION 2002021
char versionString[] = "0.9.0-b2"; char versionString[] = "0.9.1";
//AP and OTA default passwords (for maximum change them!) //AP and OTA default passwords (for maximum change them!)
@ -115,9 +115,7 @@ char cmDNS[33] = "x"; //mDNS address (placeholder, will
char apSSID[33] = ""; //AP off by default (unless setup) char apSSID[33] = ""; //AP off by default (unless setup)
byte apChannel = 1; //2.4GHz WiFi AP channel (1-13) byte apChannel = 1; //2.4GHz WiFi AP channel (1-13)
byte apHide = 0; //hidden AP SSID byte apHide = 0; //hidden AP SSID
//byte apWaitTimeSecs = 32; //time to wait for connection before opening AP
byte apBehavior = 0; //0: Open AP when no connection after boot 1: Open when no connection 2: Always open 3: Only when button pressed for 6 sec byte apBehavior = 0; //0: Open AP when no connection after boot 1: Open when no connection 2: Always open 3: Only when button pressed for 6 sec
//bool recoveryAPDisabled = false; //never open AP (not recommended)
IPAddress staticIP(0, 0, 0, 0); //static IP of ESP IPAddress staticIP(0, 0, 0, 0); //static IP of ESP
IPAddress staticGateway(0, 0, 0, 0); //gateway (router) IP IPAddress staticGateway(0, 0, 0, 0); //gateway (router) IP
IPAddress staticSubnet(255, 255, 255, 0); //most common subnet in home networks IPAddress staticSubnet(255, 255, 255, 0); //most common subnet in home networks

View File

@ -152,6 +152,7 @@ void initAP(bool resetAP=false){
void initConnection() void initConnection()
{ {
WiFi.disconnect(); //close old connections WiFi.disconnect(); //close old connections
WiFi.setPhyMode(WIFI_PHY_MODE_11N);
if (staticIP[0] != 0 && staticGateway[0] != 0) if (staticIP[0] != 0 && staticGateway[0] != 0)
{ {

View File

@ -57,7 +57,7 @@ void setAllLeds() {
} }
void setLedsStandard() void setLedsStandard(bool justColors = false)
{ {
for (byte i=0; i<4; i++) for (byte i=0; i<4; i++)
{ {
@ -66,6 +66,7 @@ void setLedsStandard()
colSecOld[i] = colSec[i]; colSecOld[i] = colSec[i];
colSecT[i] = colSec[i]; colSecT[i] = colSec[i];
} }
if (justColors) return;
briOld = bri; briOld = bri;
briT = bri; briT = bri;
setAllLeds(); setAllLeds();
@ -120,7 +121,12 @@ void colorUpdated(int callMode)
colIT[i] = col[i]; colIT[i] = col[i];
colSecIT[i] = colSec[i]; colSecIT[i] = colSec[i];
} }
if (briT == 0 && callMode != 3) resetTimebase(); if (briT == 0)
{
setLedsStandard(true); //do not color transition if starting from off
if (callMode != 3) resetTimebase(); //effect start from beginning
}
briIT = bri; briIT = bri;
if (bri > 0) briLast = bri; if (bri > 0) briLast = bri;