confadv 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <html><head>
  2. <meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
  3. <link rel='stylesheet' href='style.css'>
  4. <title>WiFiThermostat - WTherm-T5WZ</title>
  5. <script>
  6. function g(i) { return document.getElementById(i) };
  7. function sp(i){g(i).type=(g(i).type==='text'?'password':'text');}
  8. var xhttp, reqTime, reqFin;
  9. function setCbx(el, da) {
  10. if(da == '1') {
  11. el.checked = true;
  12. el.style.visibility = 'visible';
  13. }
  14. else {
  15. el.checked = false;
  16. el.style.visibility = 'visible';
  17. }
  18. }
  19. function updCbxVal(el) {
  20. if (el.checked) el.value = '1';
  21. else {
  22. el.checked = true;
  23. el.value = '0';
  24. el.style.visibility = 'hidden';
  25. }
  26. }
  27. function transmit(f) {
  28. if (!xhttp) {
  29. reqTime = 0;
  30. reqFin = false;
  31. xhttp = new XMLHttpRequest();
  32. xhttp.timeout = 1000;
  33. xhttp.overrideMimeType('application/json');
  34. xhttp.open('POST', 'confDataAdv');
  35. xhttp.send(f ? (new FormData(f)) : '');
  36. xhttp.onreadystatechange = function () {
  37. if (xhttp.readyState === XMLHttpRequest.DONE && xhttp.status === 200) {
  38. var data = JSON.parse(xhttp.responseText);
  39. g('tempDec').value = data.tempDec;
  40. g('hyst').value = data.hyst;
  41. g('minOffTime').value = data.minOffTime;
  42. g('tempCorr').value = data.tempCorr;
  43. g('humCorr').value = data.humCorr;
  44. g('offMsg').value = data.offMsg;
  45. g('iTempLab').value = data.iTempLab;
  46. g('oTempLab').value = data.oTempLab;
  47. g('modeName1').value = data.modeName1;
  48. g('modeName0').value = data.modeName0;
  49. g('psetName0').value = data.psetName0;
  50. g('psetName1').value = data.psetName1;
  51. g('psetName2').value = data.psetName2;
  52. xhttp = null;
  53. reqFin = true;
  54. }
  55. else {
  56. if(!reqFin && reqTime > 10) {
  57. xhttp = null;
  58. reqFin = true;
  59. }
  60. }
  61. }
  62. }
  63. return false;
  64. }
  65. //transmit();
  66. function saveConf() {
  67. g('frmConf').submit();
  68. }
  69. function init() {
  70. transmit();
  71. }
  72. setInterval(function () { ++reqTime; }, 1000);
  73. </script>
  74. </head>
  75. <body onload='init()'>
  76. <div id='main'>
  77. <div id='head'>WiFiThermostat - WTherm-T5WZ
  78. </div><hr>
  79. <div></div>
  80. <b>Configuration - Thermostat Advanced</b>
  81. <div class='config'>
  82. <form id='frmConf' action='setConfAdv' method='POST'>
  83. <br>
  84. <fieldset>
  85. <legend>Thermostat - Advanced</legend>
  86. <p><b>Hysteresis [°C]</b><br><input type='text' name='hyst' id='hyst'></p><br>
  87. <p><b>Min. Heating Off-Time [s]</b><br><input type='number' name='minOffTime' id='minOffTime'></p>
  88. <p class='n'>Heating stays off for at least [x] seconds before it <br>can start again.</p><br>
  89. <p><b>Measured Temp Correction [°C] *</b><br><input type='text' name='tempCorr' id='tempCorr'></p>
  90. <p><b>Measured Hum Correction [%] *</b><br><input type='text' name='humCorr' id='humCorr'></p>
  91. <p class='n'>* added to the measured values. <br>Can be negative and/or fractions. <br>Use if measurements deviate from a calibrated sensor.</p><br>
  92. <p><b>Set Temp. Decrease Value **</b><br><input type='text' name='tempDec' id='tempDec'></p>
  93. <p class='n'>** the actual set temperatur is decreased by that value.<br>Can be a fraction. Can be used to prevent over-heating <br>when the thermostat is badly placed.<br></p>
  94. </fieldset>
  95. <div></div><br>
  96. <fieldset>
  97. <legend>Names and Labels</legend>
  98. <p class='n'>Used in some MQTT status/commands, <br>and also for the LCD and Web interface.<br></p><br>
  99. <p><b>Off-Message</b><br><input type='text' name='offMsg' id='offMsg'></p>
  100. <p class='n'>Shown on LCD in OFF mode. <br><b>max. 13 chars!</b></p>
  101. <br>
  102. <p>Labels</p>
  103. <p class='n'>Used on LCD to identify the data displayed. <br><b>MUST be 1 char</b> or empty for default</p>
  104. <p><b>Inside</b><br><input type='text' name='iTempLab' id='iTempLab'/></p>
  105. <p><b>Outside</b><br><input type='text' name='oTempLab' id='oTempLab'/></p>
  106. <br>
  107. <p>Mode</p>
  108. <p class='n'>Used in web interface and for Home Assistant <br>MQTT Climate component support. <br>Should be 'heat' and 'off' normally. <br><b>Case sensitive! Lower case recommended.</b><br>Web interface shows all in capitals.</p>
  109. <p><b>On</b><br><input type='text' name='modeName1' id='modeName1'></p>
  110. <p><b>Off</b><br><input type='text' name='modeName0' id='modeName0'></p>
  111. <br>
  112. <p>Preset Names</p>
  113. <p class='n'>Used in web interface and for Home Assistant <br>MQTT Climate component support.<br>
  114. Also shown on LCD at preset change, <br>therefore may not exceed <b>13 chars!</b><br><b>Case sensitive!</b> Type exactly as in HA!</p>
  115. <p><b>Normal *</b><br><input type='text' name='psetName0' id='psetName0'></p>
  116. <p class='n'>* always sends/receives "<i>none</i>" as this is hardcoded in <br>Home Assistant MQTT Climate component</p>
  117. <p><b>Reduction 1 **</b><br><input type='text' name='psetName1' id='psetName1'></p>
  118. <p><b>Reduction 2 **</b><br><input type='text' name='psetName2' id='psetName2'></p>
  119. <p class='n'>** sent/received as defined</p>
  120. </fieldset>
  121. <br>
  122. </form>
  123. <div></div>
  124. <table style='width:100%'>
  125. <td style='width:50%'><button onclick='location="conf";' class='bgrey'>Cancel</button></td>
  126. <td style='width:50%'><button onclick='return saveConf()' class='bred'>Save</button></td>
  127. </tr></table>
  128. </div>
  129. <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>
  130. </div></body></html>