| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 | 
							- <html><head>
 
- <meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
 
- <link rel='stylesheet' href='style.css'>
 
- <title>WiFiThermostat - WTherm-T5WZ</title>
 
- <script>
 
-   function g(i) { return document.getElementById(i) };
 
-   function sp(i){g(i).type=(g(i).type==='text'?'password':'text');}
 
-   var xhttp, reqTime, reqFin;
 
-   function setCbx(el, da) {
 
-     if(da == '1') {
 
-       el.checked = true;
 
-       el.style.visibility = 'visible';
 
-     }
 
-     else {
 
-       el.checked = false;
 
-       el.style.visibility = 'visible';
 
-     }
 
-   }
 
-   function updCbxVal(el) {
 
-     if (el.checked) el.value = '1';
 
-     else {
 
-       el.checked = true;
 
-     el.value = '0';
 
-       el.style.visibility = 'hidden';
 
-     }
 
-   }
 
-   
 
-   function transmit(f) {
 
-     if (!xhttp) {   
 
-     reqTime = 0;
 
-     reqFin = false;
 
-     xhttp = new XMLHttpRequest();
 
-     xhttp.timeout = 1000;
 
-     xhttp.overrideMimeType('application/json');
 
-     xhttp.open('POST', 'confDataAdd');
 
-     xhttp.send(f ? (new FormData(f)) : '');
 
-     xhttp.onreadystatechange = function () {
 
-       if (xhttp.readyState === XMLHttpRequest.DONE && xhttp.status === 200) {
 
-         var data = JSON.parse(xhttp.responseText);
 
-         g('PIRTop').value = data.PIRTop;
 
-         g('PIROnPld').value = data.PIROnPld;
 
-         g('PIROffPld').value = data.PIROffPld;
 
-         g('outTempTop').value = data.outTempTop;
 
-         g('outHumTop').value = data.outHumTop;
 
-         xhttp = null;
 
-         reqFin = true;
 
-        }
 
-        else {
 
-          if(!reqFin && reqTime > 10) {
 
-            xhttp = null;
 
-            reqFin = true;
 
-          }
 
-        }
 
-      }
 
-    }
 
-     return false;
 
-   }
 
-   //transmit();
 
-   function saveConf() {
 
-     g('frmConf').submit();
 
-   }
 
-   function init() {
 
-     transmit();
 
-   }
 
-   setInterval(function () { ++reqTime; }, 1000);
 
- </script>
 
- </head>
 
- <body onload='init()'>
 
- <div id='main'>
 
- <div id='head'>WiFiThermostat - WTherm-T5WZ
 
- </div><hr>
 
- <div></div>
 
- <b>Configuration - Additional Functions</b>
 
- <div class='config'>
 
- <form id='frmConf' action='setConfAdd' method='POST'>
 
- <br>
 
- <fieldset>
 
- <legend>PIR Sensor</legend>
 
- <p><b>MQTT Publish Topic</b><br><input type='text' name='PIRTop' id='PIRTop'/></p>
 
- <p><b>MQTT ON Payload</b><br><input type='text' name='PIROnPld' id='PIROnPld'/></p>
 
- <p><b>MQTT OFF Payload</b><br><input type='text' name='PIROffPld' id='PIROffPld'/></p>
 
- </fieldset>
 
- <div></div><br>
 
- <fieldset>
 
- <legend>Outside Temp/Hum via MQTT</legend>
 
- <p class='n'>Only used if not empty, can be subscribed to and valid data is sent. </p>
 
- <p><b>O-Temp In-Topic</b><br><input type='text' name='outTempTop' id='outTempTop'/></p>
 
- <p><b>O-Hum In-Topic</b><br><input type='text' name='outHumTop' id='outHumTop'/><br>
 
- </fieldset>
 
- <br>
 
- </form>
 
- <div></div>
 
- <table style='width:100%'>
 
- <td style='width:50%'><button onclick='location="conf";' class='bgrey'>Cancel</button></td>
 
- <td style='width:50%'><button onclick='return saveConf()' class='bred'>Save</button></td>
 
- </tr></table>
 
- </div>
 
- <div style='text-align:right;font-size:0.7em;color:#AAA;'><hr/><a href='https://git.flokra.at/flo/WiFiThermostat' target='_blank' style='color:#AAA;'>WiFiThermostat</a> v0.6.0 by <a href='https://www.flokra.at/' target='_blank' style='color:#AAA;'>FloKra</a></div>
 
- </div></body></html>
 
 
  |