| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | <!DOCTYPE html> | 
					
						
							| 
									
										
										
										
											2020-12-23 20:43:30 +00:00
										 |  |  | <html lang="en"> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | <head> | 
					
						
							|  |  |  | 	<meta name="viewport" content="width=500"> | 
					
						
							| 
									
										
										
										
											2021-12-08 13:38:21 +00:00
										 |  |  | 	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/> | 
					
						
							| 
									
										
										
										
											2020-05-17 19:39:57 +00:00
										 |  |  | 	<meta charset="utf-8"> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 	<title>Time Settings</title> | 
					
						
							|  |  |  | 	<script> | 
					
						
							|  |  |  |     var d=document; | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	function H() | 
					
						
							|  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		window.open("https://kno.wled.ge/features/settings/#time-settings"); | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	function B() | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		window.open("/settings","_self"); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	function S() | 
					
						
							|  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		BTa();GetV();updLoc();Cs();FC(); | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	function gId(s) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		return d.getElementById(s); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 	function expand(o,i) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		o.classList.toggle("exp");  | 
					
						
							|  |  |  | 		var t = gId("WD"+i); | 
					
						
							|  |  |  | 		t.style.display = t.style.display!=="none" ? "none" : ""; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	function Cs() | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		gId("cac").style.display="none"; | 
					
						
							|  |  |  | 		gId("coc").style.display="block"; | 
					
						
							|  |  |  | 		gId("ccc").style.display="none"; | 
					
						
							|  |  |  | 		if (gId("ca").selected) | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 			gId("cac").style.display="block"; | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 		if (gId("cc").selected) | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 			gId("coc").style.display="none"; | 
					
						
							|  |  |  | 			gId("ccc").style.display="block"; | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 		if (gId("cn").selected) | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 			gId("coc").style.display="none"; | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 	function BTa() | 
					
						
							|  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 		var ih="<tr><th>En.</th><th>Hour</th><th>Minute</th><th>Preset</th><th></th></tr>"; | 
					
						
							|  |  |  | 		for (i=0;i<8;i++) { | 
					
						
							|  |  |  | 			ih+=`<tr><td><input name="W${i}" id="W${i}" type="hidden"><input id="W${i}0" type="checkbox"></td> | 
					
						
							|  |  |  | <td><input name="H${i}" class="xs" type="number" min="0" max="24"></td> | 
					
						
							|  |  |  | <td><input name="N${i}" class="xs" type="number" min="0" max="59"></td> | 
					
						
							|  |  |  | <td><input name="T${i}" class="s" type="number" min="0" max="250"></td> | 
					
						
							|  |  |  | <td><button type="button" class="sml" onclick="expand(this,${i})">></button></td></tr>`; | 
					
						
							|  |  |  | 			ih+=`<tr><td colspan=5><div id="WD${i}" style="display:none;">`; | 
					
						
							|  |  |  | 			ih+=`<input name="X${i}" id="TMX${i}" type="checkbox" onchange="tglDOW(${i},this.checked)"><label for="TMX${i}">Use DOW</label>`; | 
					
						
							|  |  |  | 			ih+=`<table id="TT${i}" style="width:100%;"><tr><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr><tr>` | 
					
						
							|  |  |  | 			for (j=1;j<8;j++) ih+=`<td><input id="W${i}${j}" type="checkbox"></td>`; | 
					
						
							|  |  |  | 			ih+=`</tr></table><div id="TD${i}">Date: | 
					
						
							|  |  |  | <select id="TMM${i}" name="M${i}" onchange="chkMon(this,${i})"> | 
					
						
							|  |  |  | <option value="0">Every month</option> | 
					
						
							|  |  |  | <option value="13">Odd month</option> | 
					
						
							|  |  |  | <option value="14">Even month</option> | 
					
						
							|  |  |  | <option value="1">Jan</option> | 
					
						
							|  |  |  | <option value="2">Feb</option> | 
					
						
							|  |  |  | <option value="3">Mar</option> | 
					
						
							|  |  |  | <option value="4">Apr</option> | 
					
						
							|  |  |  | <option value="5">May</option> | 
					
						
							|  |  |  | <option value="6">Jun</option> | 
					
						
							|  |  |  | <option value="7">Jul</option> | 
					
						
							|  |  |  | <option value="8">Aug</option> | 
					
						
							|  |  |  | <option value="9">Sep</option> | 
					
						
							|  |  |  | <option value="10">Oct</option> | 
					
						
							|  |  |  | <option value="11">Nov</option> | 
					
						
							|  |  |  | <option value="12">Dec</option> | 
					
						
							|  |  |  | </select><select id="TMD${i}" name="D${i}">`; | 
					
						
							|  |  |  | 			for (j=1;j<32;j++) ih+=`<option value="${j}">${j}</option>`; | 
					
						
							|  |  |  | 			ih+="</select></div><hr></div></td></tr>"; | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 		ih+=`<tr><td><input name="W8" id="W8" type="hidden"><input id="W80" type="checkbox"></td> | 
					
						
							|  |  |  | <td>Sunrise<input name="H8" value="255" type="hidden"></td> | 
					
						
							|  |  |  | <td><input name="N8" class="xs" type="number" min="-59" max="59"></td> | 
					
						
							|  |  |  | <td><input name="T8" class="s" type="number" min="0" max="250"></td> | 
					
						
							|  |  |  | <td><button type="button" class="sml" onclick="expand(this,8)">></button></td></tr><tr><td colspan=5>`; | 
					
						
							|  |  |  | 		ih+=`<div id="WD8"style="display:none;"><table style="width:100%;"><tr><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr><tr>`; | 
					
						
							|  |  |  | 		for (j=1;j<8;j++) ih+=`<td><input id="W8${j}" type="checkbox"></td>`; | 
					
						
							|  |  |  | 		ih+="</tr></table><hr></div></td></tr>"; | 
					
						
							|  |  |  | 		ih+=`<tr><td><input name="W9" id="W9" type="hidden"><input id="W90" type="checkbox"></td> | 
					
						
							|  |  |  | <td>Sunrise<input name="H9" value="255" type="hidden"></td> | 
					
						
							|  |  |  | <td><input name="N9" class="xs" type="number" min="-59" max="59"></td> | 
					
						
							|  |  |  | <td><input name="T9" class="s" type="number" min="0" max="250"></td> | 
					
						
							|  |  |  | <td><button type="button" class="sml" onclick="expand(this,9)">></button></td></tr><tr><td colspan=5>`; | 
					
						
							|  |  |  | 		ih+=`<div id="WD9" style="display:none;"><table style="width:100%;"><tr><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr><tr>`; | 
					
						
							|  |  |  | 		for (j=1;j<8;j++) ih+=`<td><input id="W9${j}" type="checkbox"></td>`; | 
					
						
							|  |  |  | 		ih+="</tr></table><hr></div></td></tr>"; | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		gId("TMT").innerHTML=ih; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 	function tglDOW(i,b) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		gId("TT"+i).style.display = b ? "table" : "none"; | 
					
						
							|  |  |  | 		gId("TD"+i).style.display = !b ? "block" : "none"; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	function chkMon(o,i) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		const m31 = [1,3,5,7,8,10,12,0,13,14]; | 
					
						
							|  |  |  | 		if (!m31.includes(parseInt(o.value)) && parseInt(gId("TMD"+i).value)>30) gId("TMD"+i).value="30"; | 
					
						
							|  |  |  | 		if (parseInt(o.value)===2 && parseInt(gId("TMD"+i).value)>28) gId("TMD"+i).value="28"; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 	function FC() | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		for(j=0;j<8;j++) | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			for(i=0;i<10;i++) gId("W"+i+j).checked=gId("W"+i).value>>j&1; | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 			tglDOW(j,gId('TMX'+j).checked); | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	function Wd() | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		a = [0,0,0,0,0,0,0,0,0,0]; | 
					
						
							|  |  |  | 		for (i=0; i<10; i++) { | 
					
						
							|  |  |  | 			m=1; | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 			for(j=0;j<8;j++) { a[i]+=gId(("W"+i)+j).checked*m; m*=2;} | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 			gId("W"+i).value=a[i]; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if (d.Sf.LTR.value==="S") { d.Sf.LT.value = -1*parseFloat(d.Sf.LT.value); } | 
					
						
							|  |  |  | 		if (d.Sf.LNR.value==="W") { d.Sf.LN.value = -1*parseFloat(d.Sf.LN.value); } | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 	function addRow(i,p,l,d) { | 
					
						
							| 
									
										
										
										
											2021-05-20 17:54:07 +00:00
										 |  |  | 		var t = gId("macros");	// table | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		var rCnt = t.rows.length;   // get the number of rows. | 
					
						
							|  |  |  | 		var tr = t.insertRow(rCnt); // table row. | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		var b = String.fromCharCode((i<10?48:55)+i); | 
					
						
							| 
									
										
										
										
											2021-05-20 17:54:07 +00:00
										 |  |  | 		var td = document.createElement('td');          // TABLE DEFINITION. | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 		td = tr.insertCell(0); | 
					
						
							|  |  |  | 		td.innerHTML = `Button ${i}:`; | 
					
						
							|  |  |  | 		td = tr.insertCell(1); | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		td.innerHTML = `<input name="MP${b}" type="number" class="s" min="0" max="250" value="${p}" required>`; | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 		td = tr.insertCell(2); | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		td.innerHTML = `<input name="ML${b}" type="number" class="s" min="0" max="250" value="${l}" required>`; | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 		td = tr.insertCell(3); | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		td.innerHTML = `<input name="MD${b}" type="number" class="s" min="0" max="250" value="${d}" required>`; | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 	function updLoc(i) { | 
					
						
							|  |  |  | 		if (parseFloat(d.Sf.LT.value)<0) { d.Sf.LTR.value = "S"; d.Sf.LT.value = -1*parseFloat(d.Sf.LT.value); } else d.Sf.LTR.value = "N"; | 
					
						
							|  |  |  | 		if (parseFloat(d.Sf.LN.value)<0) { d.Sf.LNR.value = "W"; d.Sf.LN.value = -1*parseFloat(d.Sf.LN.value); } else d.Sf.LNR.value = "E"; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-03-06 23:04:46 +00:00
										 |  |  | 	function GetV() | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		//values injected by server while sending HTML | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 	</script> | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 	<!--script src="http://192.168.70.61/settings/settings.js?p=5"></script--> | 
					
						
							| 
									
										
										
										
											2021-12-06 19:53:09 +00:00
										 |  |  | 	<style>@import url("style.css");</style> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | </head> | 
					
						
							|  |  |  | <body onload="S()"> | 
					
						
							|  |  |  | 	<form id="form_s" name="Sf" method="post" onsubmit="Wd()"> | 
					
						
							| 
									
										
										
										
											2021-03-05 08:50:59 +00:00
										 |  |  | 		<div class="toprow"> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		<div class="helpB"><button type="button" onclick="H()">?</button></div> | 
					
						
							|  |  |  | 		<button type="button" onclick="B()">Back</button><button type="submit">Save</button><hr> | 
					
						
							| 
									
										
										
										
											2021-03-05 08:50:59 +00:00
										 |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		<h2>Time setup</h2> | 
					
						
							|  |  |  | 		Get time from NTP server: <input type="checkbox" name="NT"><br> | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  |     	<input type="text" name="NS" maxlength="32"><br> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		Use 24h format: <input type="checkbox" name="CF"><br> | 
					
						
							|  |  |  | 		Time zone:  | 
					
						
							|  |  |  | 		<select name="TZ"> | 
					
						
							|  |  |  | 			<option value="0" selected>GMT(UTC)</option> | 
					
						
							|  |  |  | 			<option value="1">GMT/BST</option> | 
					
						
							|  |  |  | 			<option value="2">CET/CEST</option> | 
					
						
							|  |  |  | 			<option value="3">EET/EEST</option> | 
					
						
							|  |  |  | 			<option value="4">US-EST/EDT</option> | 
					
						
							|  |  |  | 			<option value="5">US-CST/CDT</option> | 
					
						
							|  |  |  | 			<option value="6">US-MST/MDT</option> | 
					
						
							|  |  |  | 			<option value="7">US-AZ</option> | 
					
						
							|  |  |  | 			<option value="8">US-PST/PDT</option> | 
					
						
							|  |  |  | 			<option value="9">CST(AWST)</option> | 
					
						
							|  |  |  | 			<option value="10">JST(KST)</option> | 
					
						
							|  |  |  | 			<option value="11">AEST/AEDT</option> | 
					
						
							|  |  |  | 			<option value="12">NZST/NZDT</option> | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 			<option value="13">North Korea</option> | 
					
						
							|  |  |  | 			<option value="14">IST (India)</option> | 
					
						
							|  |  |  | 			<option value="15">CA-Saskatchewan</option> | 
					
						
							|  |  |  | 			<option value="16">ACST</option> | 
					
						
							|  |  |  | 			<option value="17">ACST/ACDT</option> | 
					
						
							|  |  |  | 			<option value="18">HST (Hawaii)</option> | 
					
						
							| 
									
										
										
										
											2021-09-26 15:12:13 +00:00
										 |  |  | 			<option value="19">NOVT (Novosibirsk)</option> | 
					
						
							| 
									
										
										
										
											2021-10-11 03:09:48 +00:00
										 |  |  | 			<option value="20">AKST/AKDT (Anchorage)</option> | 
					
						
							| 
									
										
										
										
											2021-11-03 03:26:11 +00:00
										 |  |  | 			<option value="21">MX-CST/CDT</option> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		</select><br> | 
					
						
							|  |  |  | 		UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br> | 
					
						
							| 
									
										
										
										
											2021-03-05 22:05:09 +00:00
										 |  |  | 		Current local time is <span class="times">unknown</span>.<br> | 
					
						
							| 
									
										
										
										
											2021-12-23 19:37:22 +00:00
										 |  |  | 		Latitude: <select name="LTR"><option value="N">N</option><option value="S">S</option></select><input name="LT" type="number" class="xl" min="0" max="66.6" step="0.01"><br> | 
					
						
							|  |  |  | 		Longitude: <select name="LNR"><option value="E">E</option><option value="W">W</option></select><input name="LN" type="number" class="xl" min="0" max="180" step="0.01"> | 
					
						
							| 
									
										
										
										
											2021-03-08 18:40:06 +00:00
										 |  |  | 		<div id="sun" class="times"></div> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		<h3>Clock</h3> | 
					
						
							|  |  |  | 		Clock Overlay: | 
					
						
							|  |  |  | 		<select name="OL" onchange="Cs()"> | 
					
						
							|  |  |  | 			<option value="0" id="cn" selected>None</option> | 
					
						
							|  |  |  | 			<option value="1" id="ca">Analog Clock</option> | 
					
						
							|  |  |  | 			<option value="2">Single Digit Clock</option> | 
					
						
							|  |  |  | 			<option value="3" id="cc">Cronixie Clock</option> | 
					
						
							|  |  |  | 		</select><br> | 
					
						
							|  |  |  | 		<div id="coc"> | 
					
						
							|  |  |  | 		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="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="CX" maxlength="6"><br> | 
					
						
							|  |  |  | 		Cronixie Backlight: <input type="checkbox" name="CB"><br> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 		Countdown Mode: <input type="checkbox" name="CE"><br> | 
					
						
							|  |  |  | 		Countdown Goal:<br> | 
					
						
							| 
									
										
										
										
											2021-12-18 16:13:15 +00:00
										 |  |  | 		Date: <nowrap>20<input name="CY" class="xs" type="number" min="0" max="99" required>-<input name="CI" class="xs" type="number" min="1" max="12" required>-<input name="CD" class="xs" type="number" min="1" max="31" required></nowrap><br> | 
					
						
							|  |  |  | 		Time: <nowrap><input name="CH" class="xs" type="number" min="0" max="23" required>:<input name="CM" class="xs" type="number" min="0" max="59" required>:<input name="CS" class="xs" type="number" min="0" max="59" required></nowrap><br> | 
					
						
							| 
									
										
										
										
											2020-11-07 22:54:56 +00:00
										 |  |  | 		<h3>Macro presets</h3> | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  |     	<b>Macros have moved!</b><br> | 
					
						
							|  |  |  |     	<i>Presets now also can be used as macros to save both JSON and HTTP API commands.<br> | 
					
						
							|  |  |  |     	Just enter the preset id below!</i> | 
					
						
							| 
									
										
										
										
											2020-11-07 22:54:56 +00:00
										 |  |  | 		<i>Use 0 for the default action instead of a preset</i><br> | 
					
						
							| 
									
										
										
										
											2021-10-11 15:55:26 +00:00
										 |  |  | 		Alexa On/Off Preset: <input name="A0" class="m" type="number" min="0" max="250" required> <input name="A1" class="m" type="number" min="0" max="250" required><br> | 
					
						
							|  |  |  | 		Countdown-Over Preset: <input name="MC" class="m" type="number" min="0" max="250" required><br> | 
					
						
							|  |  |  | 		Timed-Light-Over Presets: <input name="MN" class="m" type="number" min="0" max="250" required><br> | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 		<h3>Button actions</h3> | 
					
						
							|  |  |  | 		<table style="margin: 0 auto;" id="macros"> | 
					
						
							|  |  |  | 			<thead> | 
					
						
							|  |  |  | 				<tr> | 
					
						
							| 
									
										
										
										
											2021-05-20 04:45:02 +00:00
										 |  |  | 					<td>push<br>switch</td> | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 					<td>short<br>on->off</td> | 
					
						
							|  |  |  | 					<td>long<br>off->on</td> | 
					
						
							| 
									
										
										
										
											2021-05-20 04:45:02 +00:00
										 |  |  | 					<td>double<br>N/A</td> | 
					
						
							| 
									
										
										
										
											2021-05-21 10:08:47 +00:00
										 |  |  | 				</tr> | 
					
						
							| 
									
										
										
										
											2021-05-19 16:39:16 +00:00
										 |  |  | 			</thead> | 
					
						
							|  |  |  | 			<tbody> | 
					
						
							|  |  |  | 			</tbody> | 
					
						
							|  |  |  | 		</table> | 
					
						
							| 
									
										
										
										
											2021-12-08 21:05:51 +00:00
										 |  |  | 		<a href="https://kno.wled.ge/features/macros/#analog-button" target="_blank">Analog Button setup</a> | 
					
						
							| 
									
										
										
										
											2020-11-07 22:54:56 +00:00
										 |  |  | 		<h3>Time-controlled presets</h3> | 
					
						
							| 
									
										
										
										
											2021-12-25 17:46:43 +00:00
										 |  |  | 		<div style="display: inline-block"> | 
					
						
							|  |  |  | 		<table id="TMT" style="min-width:330px;"></table> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 		<hr> | 
					
						
							| 
									
										
										
										
											2019-11-27 21:28:13 +00:00
										 |  |  | 		<button type="button" onclick="B()">Back</button><button type="submit">Save</button> | 
					
						
							|  |  |  | 	</form> | 
					
						
							|  |  |  | </body> | 
					
						
							|  |  |  | </html> |