-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.html
1 lines (1 loc) · 10.4 KB
/
page.html
1
"<!DOCTYPE html><html lang=\"en\"><head><meta \ncontent=\"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no\" \nname=\"viewport\"><meta charset=\"utf-8\"><title>Sync Settings</title><script>\nvar locip,d=document,loc=!1,locproto=\"http:\";function gId(e){return d.getElementById(e)}function toggle(e){gId(e).classList.toggle(\"hide\"),gId(\"No\"+e).classList.toggle(\"hide\")}function H(){window.open(\"https://kno.wled.ge/interfaces/udp-notifier/\")}function B(){window.open(getURL(\"/settings\"),\"_self\")}function adj(){6454==d.Sf.DI.value?1==d.Sf.EU.value&&(d.Sf.EU.value=0):5568==d.Sf.DI.value&&(0==d.Sf.DA.value&&(d.Sf.DA.value=1),0==d.Sf.EU.value&&(d.Sf.EU.value=1))}function loadJS(e,t=!0){let o=d.createElement(\"script\");o.setAttribute(\"src\",e),o.setAttribute(\"type\",\"text/javascript\"),o.setAttribute(\"async\",t),d.body.appendChild(o),o.addEventListener(\"load\",()=>{GetV(),SetVal()}),o.addEventListener(\"error\",e=>{console.log(\"Error on loading file\",e),alert(\"Loading of configuration script failed.\\nIncomplete page data!\")})}function FC(){for(j=0;j<8;j++)gId(\"G\"+(j+1)).checked=gId(\"GS\").value>>j&1,gId(\"R\"+(j+1)).checked=gId(\"GR\").value>>j&1}function GC(){var e=0,t=0,o=1;for(j=0;j<8;j++)e+=gId(\"G\"+(j+1)).checked*o,t+=gId(\"R\"+(j+1)).checked*o,o*=2;gId(\"GS\").value=e,gId(\"GR\").value=t}function SP(){var e=d.Sf.DI.value;gId(\"xp\").style.display=e>0?\"none\":\"block\",e>0&&(d.Sf.EP.value=e)}function SetVal(){switch(parseInt(d.Sf.EP.value)){case 5568:d.Sf.DI.value=5568;break;case 6454:d.Sf.DI.value=6454;break;case 4048:d.Sf.DI.value=4048}SP(),FC()}function S(){let e=window.location;if(\"file:\"==e.protocol)loc=!0,(locip=localStorage.getItem(\"locIp\"))||(locip=prompt(\"File Mode. Please enter WLED IP!\"),localStorage.setItem(\"locIp\",locip));else{let t=e.pathname.slice(1,e.pathname.endsWith(\"/\")?-1:void 0).split(\"/\");t.length>2&&(locproto=e.protocol,loc=!0,locip=e.hostname+(e.port?\":\"+e.port:\"\")+\"/\"+t[0])}loadJS(getURL(\"/settings/s.js?p=4\"),!1),loc&&(d.Sf.action=getURL(\"/settings/sync\"))}function getURL(e){return(loc?locproto+\"//\"+locip:\"\")+e}\n</script><style>@import url(\"style.css\");</style></head><body onload=\"S()\"><form\n id=\"form_s\" name=\"Sf\" method=\"post\" onsubmit=\"GC()\"><div class=\"toprow\"><div \nclass=\"helpB\"><button type=\"button\" onclick=\"H()\">?</button></div><button \ntype=\"button\" onclick=\"B()\">Back</button><button type=\"submit\">Save</button><hr>\n</div><h2>Sync setup</h2><h3>WLED Broadcast</h3>UDP Port: <input name=\"UP\" \ntype=\"number\" min=\"1\" max=\"65535\" class=\"d5\" required><br>2nd Port: <input \nname=\"U2\" type=\"number\" min=\"1\" max=\"65535\" class=\"d5\" required><br><h3>\nSync groups</h3><input name=\"GS\" id=\"GS\" type=\"number\" style=\"display:none\"> \n<input name=\"GR\" id=\"GR\" type=\"number\" style=\"display:none\"><table \nstyle=\"margin:0 auto\"><tr><td></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5\n</td><td>6</td><td>7</td><td>8</td></tr><tr><td>Send:</td><td><input \ntype=\"checkbox\" id=\"G1\" name=\"G1\"></td><td><input type=\"checkbox\" id=\"G2\" \nname=\"G2\"></td><td><input type=\"checkbox\" id=\"G3\" name=\"G3\"></td><td><input \ntype=\"checkbox\" id=\"G4\" name=\"G4\"></td><td><input type=\"checkbox\" id=\"G5\" \nname=\"G5\"></td><td><input type=\"checkbox\" id=\"G6\" name=\"G6\"></td><td><input \ntype=\"checkbox\" id=\"G7\" name=\"G7\"></td><td><input type=\"checkbox\" id=\"G8\" \nname=\"G8\"></td></tr><tr><td>Receive:</td><td><input type=\"checkbox\" id=\"R1\" \nname=\"R1\"></td><td><input type=\"checkbox\" id=\"R2\" name=\"R2\"></td><td><input \ntype=\"checkbox\" id=\"R3\" name=\"R3\"></td><td><input type=\"checkbox\" id=\"R4\" \nname=\"R4\"></td><td><input type=\"checkbox\" id=\"R5\" name=\"R5\"></td><td><input \ntype=\"checkbox\" id=\"R6\" name=\"R6\"></td><td><input type=\"checkbox\" id=\"R7\" \nname=\"R7\"></td><td><input type=\"checkbox\" id=\"R8\" name=\"R8\"></td></tr></table>\n<br>Receive:<nowrap><input type=\"checkbox\" name=\"RB\">Brightness,</nowrap>\n<nowrap><input type=\"checkbox\" name=\"RC\">Color,</nowrap><nowrap>and <input \ntype=\"checkbox\" name=\"RX\">Effects</nowrap><br><input type=\"checkbox\" name=\"SO\">\n Segment options, <input type=\"checkbox\" name=\"SG\"> bounds<br>\nSend notifications on direct change: <input type=\"checkbox\" name=\"SD\"><br>\nSend notifications on button press or IR: <input type=\"checkbox\" name=\"SB\"><br>\nSend Alexa notifications: <input type=\"checkbox\" name=\"SA\"><br>\nSend Philips Hue change notifications: <input type=\"checkbox\" name=\"SH\"><br>\nSend Macro notifications: <input type=\"checkbox\" name=\"SM\"><br>\nUDP packet retransmissions: <input name=\"UR\" type=\"number\" min=\"0\" max=\"30\" \nclass=\"d5\" required><br><br><i>Reboot required to apply changes.</i><hr \nclass=\"sml\"><h3>Instance List</h3>Enable instance list: <input type=\"checkbox\" \nname=\"NL\"><br>Make this instance discoverable: <input type=\"checkbox\" name=\"NB\">\n<hr class=\"sml\"><h3>Realtime</h3>Receive UDP realtime: <input type=\"checkbox\" \nname=\"RD\"><br>Use main segment only: <input type=\"checkbox\" name=\"MO\"><br><br>\n<i>Network DMX input</i><br>Type: <select name=\"DI\" onchange=\"SP(),adj()\">\n<option value=\"5568\">E1.31 (sACN)</option><option value=\"6454\">Art-Net</option>\n<option value=\"0\" selected=\"selected\">Custom port</option></select><br><div \nid=\"xp\">Port: <input name=\"EP\" type=\"number\" min=\"1\" max=\"65535\" value=\"5568\" \nclass=\"d5\" required><br></div>Multicast: <input type=\"checkbox\" name=\"EM\"><br>\nStart universe: <input name=\"EU\" type=\"number\" min=\"0\" max=\"63999\" required><br>\n<i>Reboot required.</i> Check out <a href=\"https://github.com/LedFx/LedFx\" \ntarget=\"_blank\">LedFx</a>!<br>Skip out-of-sequence packets: <input \ntype=\"checkbox\" name=\"ES\"><br>DMX start address: <input name=\"DA\" type=\"number\" \nmin=\"1\" max=\"510\" required><br>DMX segment spacing: <input name=\"XX\" \ntype=\"number\" min=\"0\" max=\"150\" required><br>E1.31 port priority: <input \nname=\"PY\" type=\"number\" min=\"0\" max=\"200\" required><br>DMX mode: <select \nname=\"DM\"><option value=\"0\">Disabled</option><option value=\"1\">Single RGB\n</option><option value=\"2\">Single DRGB</option><option value=\"3\">Effect</option>\n<option value=\"7\">Effect + White</option><option value=\"8\">Effect Segment\n</option><option value=\"9\">Effect Segment + White</option><option value=\"4\">\nMulti RGB</option><option value=\"5\">Dimmer + Multi RGB</option><option \nvalue=\"6\">Multi RGBW</option><option value=\"10\">Preset</option></select><br><a \nhref=\"https://kno.wled.ge/interfaces/e1.31-dmx/\" target=\"_blank\">E1.31 info</a>\n<br>Timeout: <input name=\"ET\" type=\"number\" min=\"1\" max=\"65000\" required> ms<br>\nForce max brightness: <input type=\"checkbox\" name=\"FB\"><br>\nDisable realtime gamma correction: <input type=\"checkbox\" name=\"RG\"><br>\nRealtime LED offset: <input name=\"WO\" type=\"number\" min=\"-255\" max=\"255\" \nrequired><hr class=\"sml\"><h3>Alexa Voice Assistant</h3><div id=\"NoAlexa\" \nclass=\"hide\"><i class=\"warn\">This firmware build does not include Alexa support.\n<br></i><br></div><div id=\"Alexa\">Emulate Alexa device: <input type=\"checkbox\" \nname=\"AL\"><br>Alexa invocation name: <input type=\"text\" name=\"AI\" \nmaxlength=\"32\"><br>Also emulate devices to call the first <input name=\"AP\" \ntype=\"number\" class=\"s\" min=\"0\" max=\"9\" required> presets<br><br></div><hr \nclass=\"sml\"><div class=\"warn\">⚠ <b>\nMQTT and Hue sync all connect to external hosts!<br>\nThis may impact the responsiveness of WLED.</b><br></div>\nFor best results, only use one of these services at a time.<br>\n(alternatively, connect a second ESP to them and use the UDP sync)<hr \nclass=\"sml\"><h3>MQTT</h3><div id=\"NoMQTT\" class=\"hide\"><i class=\"warn\">\nThis firmware build does not include MQTT support.<br></i></div><div id=\"MQTT\">\nEnable MQTT: <input type=\"checkbox\" name=\"MQ\"><br>Broker: <input type=\"text\" \nname=\"MS\" maxlength=\"32\"> Port: <input name=\"MQPORT\" type=\"number\" min=\"1\" \nmax=\"65535\" class=\"d5\"><br><b>\nThe MQTT credentials are sent over an unsecured connection.<br>\nNever use the MQTT password for another service!</b><br>Username: <input \ntype=\"text\" name=\"MQUSER\" maxlength=\"40\"><br>Password: <input type=\"password\" \nname=\"MQPASS\" maxlength=\"64\"><br>Client ID: <input type=\"text\" name=\"MQCID\" \nmaxlength=\"40\"><br>Device Topic: <input type=\"text\" name=\"MD\" maxlength=\"32\">\n<br>Group Topic: <input type=\"text\" name=\"MG\" maxlength=\"32\"><br>\nPublish on button press: <input type=\"checkbox\" name=\"BM\"><br>\nRetain brightness & color messages: <input type=\"checkbox\" name=\"RT\"><br><i>\nReboot required to apply changes. </i><a \nhref=\"https://kno.wled.ge/interfaces/mqtt/\" target=\"_blank\">MQTT info</a></div>\n<h3>Philips Hue</h3><div id=\"NoHue\" class=\"hide\"><em class=\"warn\">\nThis firmware build does not include Philips Hue support.<br></em></div><div \nid=\"Hue\"><i>\nYou can find the bridge IP and the light number in the 'About' section of the hue app.\n</i><br>Poll Hue light <input name=\"HL\" type=\"number\" min=\"1\" max=\"99\"> every \n<input name=\"HI\" type=\"number\" min=\"100\" max=\"65000\"> ms: <input \ntype=\"checkbox\" name=\"HP\"><br>Then, receive <input type=\"checkbox\" name=\"HO\">\n On/Off, <input type=\"checkbox\" name=\"HB\"> Brightness, and <input \ntype=\"checkbox\" name=\"HC\"> Color<br>Hue Bridge IP:<br><input name=\"H0\" \ntype=\"number\" class=\"s\" min=\"0\" max=\"255\"> . <input name=\"H1\" type=\"number\" \nclass=\"s\" min=\"0\" max=\"255\"> . <input name=\"H2\" type=\"number\" class=\"s\" min=\"0\" \nmax=\"255\"> . <input name=\"H3\" type=\"number\" class=\"s\" min=\"0\" max=\"255\"><br><b>\nPress the pushlink button on the bridge, after that save this page!</b><br>\n(when first connecting)<br>Hue status: <span class=\"sip\">Disabled in this build\n</span></div><h3>Serial</h3>Baud rate: <select name=\"BD\"><option value=\"1152\">\n115200</option><option value=\"2304\">230400</option><option value=\"4608\">460800\n</option><option value=\"5000\">500000</option><option value=\"5760\">576000\n</option><option value=\"9216\">921600</option><option value=\"10000\">1000000\n</option><option value=\"15000\">1500000</option></select><br><i>\nKeep at 115200 to use Improv. Some boards may not support high rates.</i><hr>\n<button type=\"button\" onclick=\"B()\">Back</button><button type=\"submit\">Save\n</button></form></body></html>"