html_confSens_DE.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* clang-format off */
  2. static const char html_confSens_script[] PROGMEM = R"=====(
  3. function transmit(f) {
  4. if (!xhttp) {
  5. reqTime = 0;
  6. reqFin = false;
  7. updCbxVal(g('DHT_enable'));
  8. xhttp = new XMLHttpRequest();
  9. xhttp.timeout = 1000;
  10. xhttp.overrideMimeType('application/json');
  11. xhttp.open('POST', 'confDataSens');
  12. xhttp.send(f ? (new FormData(f)) : '');
  13. xhttp.onreadystatechange = function () {
  14. if (xhttp.readyState === XMLHttpRequest.DONE && xhttp.status === 200) {
  15. var data = JSON.parse(xhttp.responseText);
  16. selectElement(g('assignSens_0'), data.assignSens_0);
  17. selectElement(g('assignSens_1'), data.assignSens_1);
  18. selectElement(g('assignSens_2'), data.assignSens_2);
  19. g('measInt').value = data.measInt;
  20. g('DHT_tempCorr').value = data.DHT_tempCorr;
  21. g('DHT_humCorr').value = data.DHT_humCorr;
  22. setCbx(g('DHT_enable'), data.DHT_enable);
  23. xhttp = null;
  24. reqFin = true;
  25. }
  26. else {
  27. if(!reqFin && reqTime > 10) {
  28. xhttp = null;
  29. reqFin = true;
  30. }
  31. }
  32. }
  33. }
  34. return false;
  35. }
  36. //transmit();
  37. function saveConf() {
  38. updCbxVal(g('DHT_enable'));
  39. g('frmConf').submit();
  40. }
  41. function init() {
  42. transmit();
  43. }
  44. )====="; // html_confSens_script
  45. static const char html_confSens_body_start[] PROGMEM = R"=====(
  46. <b>Konfiguration - Sensoren</b>
  47. <div class='config'>
  48. <form id='frmConf' action='setConfSens' method='POST'>
  49. <br>
  50. <fieldset>
  51. <legend>Intervalle</legend>
  52. <p><b>Messintervall [s]</b><br><input type='number' name='measInt' id='measInt'></p>
  53. </fieldset>
  54. )=====";
  55. #ifdef ENABLE_SENSORS_ONEWIRE
  56. static const char html_confSens_oneWire_start[] PROGMEM = R"=====(
  57. <div></div><br>
  58. <div></div><br>
  59. <fieldset>
  60. <legend>OneWire Temperatursensoren</legend>
  61. <table>
  62. <tr><th>#</th><th>Adresse</th><th>T [°C]</th><th>Zuordnung</th></tr>
  63. )=====";
  64. static const char html_confSens_oneWire_AssignSelector_options[] PROGMEM = R"=====(
  65. <option value="255">-</option>
  66. <option value="0">Vorlauf</option>
  67. <option value="1">R&uuml;cklauf</option>
  68. <option value="2">Au&szlig;en</option>
  69. )=====";
  70. static const char html_confSens_oneWire_end[] PROGMEM = R"=====(
  71. </table>
  72. </fieldset>
  73. <div></div><br>
  74. )=====";
  75. #endif
  76. #ifdef ENABLE_SENSOR_DHT22
  77. static const char html_confSens_dht[] PROGMEM = R"=====(
  78. <div></div><br>
  79. <fieldset>
  80. <legend>DHT Temperatur- u. Luftfeuchtesensor</legend>
  81. <p><b>DHT-Sensor aktivieren</b>&nbsp;<input type='checkbox' name='DHT_enable' id='DHT_enable'></p>
  82. <p><b>Korrekturwert Temperatur [°C] *</b><br><input type='text' name='DHT_tempCorr' id='DHT_tempCorr'></p>
  83. <p><b>Korrekturwert Luftfeuchte [%] *</b><br><input type='text' name='DHT_humCorr' id='DHT_humCorr'></p>
  84. <p class='n'>* wird zum gemessenen Wert addiert. <br>
  85. Kann auch negativ un eine Kommazahl sein. <br>
  86. Zu verwenden, wenn die Messwerte von <br>
  87. einem kalibrierten Sensor abweichen.</p><br>
  88. </fieldset>
  89. )=====";
  90. #endif
  91. static const char html_confSens_body_end[] PROGMEM = R"=====(
  92. <div></div><br>
  93. </form>
  94. <div></div>
  95. <table style='width:100%'>
  96. <td style='width:50%'><button onclick='location="conf";' class='bgrey'>Abbrechen</button></td>
  97. <td style='width:50%'><button onclick='return saveConf()' class='bred'>Speichern</button></td>
  98. </tr></table>
  99. </div>
  100. )====="; // html_confSens_body