Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2283 lines
135 KiB

6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
5 years ago
7 years ago
7 years ago
5 years ago
7 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
7 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
5 years ago
7 years ago
8 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
5 years ago
7 years ago
7 years ago
7 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
5 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
5 years ago
8 years ago
7 years ago
8 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
7 years ago
8 years ago
8 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
8 years ago
providers: relays, lights and buttons refactoring (#2414) - gpio module now tracks the known providers (right now, hardware and mcp expander) - refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions - refactored button module to use gpio provider instead of referencing types itself - removed dual & stm code from buttons, migrate both to relay module - added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did) - relays runtime configuration keys - relay command now shows configured relays and current & target statuses - refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead - remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT - allow to bind rf codes to real relays - drop tuya-specific lights provider, remove tuya code from relays and lights modules - integrate tuya via relay listeners and providers, use lights custom provider - implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle) - lights custom provider (global, not per-pin) and state listeners - remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT - lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT - refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing - transition time + step parameter for the lightUpdate - report mask parameter for the lightUpdate - minor fixes across the board resolve #2222
3 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
8 years ago
7 years ago
7 years ago
7 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>ESPurna 0.0.0</title>
  5. <meta charset="utf-8" />
  6. <!-- shortcut::html/favicon.ico -->
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <!-- build:css style.css -->
  9. <link rel="stylesheet" href="vendor/pure-1.0.0.min.css" />
  10. <link rel="stylesheet" href="vendor/pure-grids-responsive-1.0.0.min.css" />
  11. <link rel="stylesheet" href="vendor/side-menu.css" />
  12. <!-- removeIf(!rfm69) -->
  13. <link rel="stylesheet" href="vendor/datatables-1.10.16.css" />
  14. <!-- endRemoveIf(!rfm69) -->
  15. <link rel="stylesheet" href="custom.css" />
  16. <!-- endbuild -->
  17. </head>
  18. <body>
  19. <div id="password" class="webmode">
  20. <div class="content">
  21. <form id="formPassword" class="pure-form" autocomplete="off">
  22. <div class="panel block" id="panel-password">
  23. <div class="header">
  24. <h1>SECURITY</h1>
  25. <h2>Before using this device you have to change the default password for the user <strong>admin</strong>. This password will be used for the <strong>AP mode hotspot</strong>, the <strong>web interface</strong> (where you are now) and the <strong>over-the-air updates</strong>.</h2>
  26. </div>
  27. <div class="page">
  28. <fieldset>
  29. <div class="pure-g">
  30. <label class="pure-u-1 pure-u-lg-1-4" for="adminPass1">New Password</label>
  31. <input class="pure-u-1 pure-u-lg-3-4" name="adminPass1" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" tabindex="1" autocomplete="false" spellcheck="false" required />
  32. <span class="no-select password-reveal"></span>
  33. </div>
  34. <div class="pure-g">
  35. <label class="pure-u-1 pure-u-lg-1-4" for="adminPass2">Repeat password</label>
  36. <input class="pure-u-1 pure-u-lg-3-4" name="adminPass2" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" tabindex="2" autocomplete="false" spellcheck="false" required />
  37. <span class="no-select password-reveal"></span>
  38. </div>
  39. </fieldset>
  40. <div class="pure-g">
  41. <div class="pure-u-1 pure-u-lg-1 hint">
  42. Password must be <strong>8..63 characters</strong> (numbers and letters and any of these special characters: _,.;:~!?@#$%^&amp;*&lt;&gt;\|(){}[]) and have at least <strong>one lowercase</strong> and <strong>one uppercase</strong> or <strong>one number</strong>.</div>
  43. </div>
  44. <div class="pure-g">
  45. <button class="pure-u-11-24 pure-u-lg-1-4 pure-button button-generate-password" type="button" title="Generate password based on password policy">Generate</button>
  46. <div class="pure-u-2-24 pure-u-lg-1-2"></div>
  47. <button class="pure-u-11-24 pure-u-lg-1-4 pure-button button-update-password" type="button" title="Save new password">Save</button>
  48. </div>
  49. </div>
  50. </div>
  51. </form>
  52. </div> <!-- content -->
  53. </div>
  54. <div id="layout" class="webmode">
  55. <a id="menuLink" class="menu-link">
  56. <span></span>
  57. </a>
  58. <div id="menu">
  59. <div class="pure-menu">
  60. <span class="pure-menu-heading" name="hostname">HOSTNAME</span>
  61. <span class="pure-menu-heading small" name="title">ESPurna 0.0.0</span>
  62. <span class="pure-menu-heading small" name="desc"></span>
  63. <ul class="pure-menu-list">
  64. <li class="pure-menu-item">
  65. <a href="#" class="pure-menu-link" data="panel-status">STATUS</a>
  66. </li>
  67. <li class="pure-menu-item menu-item-divided">
  68. <a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
  69. </li>
  70. <!-- removeIf(!curtain) -->
  71. <li class="pure-menu-item module module-curtain">
  72. <a href="#" class="pure-menu-link" data="panel-curtain">CURTAIN</a>
  73. </li>
  74. <!-- endRemoveIf(!curtain) -->
  75. <!-- removeIf(!garland) -->
  76. <li class="pure-menu-item module module-garland">
  77. <a href="#" class="pure-menu-link" data="panel-garland">GARLAND</a>
  78. </li>
  79. <!-- endRemoveIf(!garland) -->
  80. <!-- removeIf(!thermostat) -->
  81. <li class="pure-menu-item module module-thermostat">
  82. <a href="#" class="pure-menu-link" data="panel-thermostat">THERMOSTAT</a>
  83. </li>
  84. <!-- endRemoveIf(!thermostat) -->
  85. <!-- removeIf(!lightfox) -->
  86. <li class="pure-menu-item module module-lightfox">
  87. <a href="#" class="pure-menu-link" data="panel-lightfox">LIGHTFOX RF</a>
  88. </li>
  89. <!-- endRemoveIf(!lightfox) -->
  90. <li class="pure-menu-item module module-dcz">
  91. <a href="#" class="pure-menu-link" data="panel-domoticz">DOMOTICZ</a>
  92. </li>
  93. <li class="pure-menu-item module module-ha">
  94. <a href="#" class="pure-menu-link" data="panel-ha">HASS</a>
  95. </li>
  96. <li class="pure-menu-item module module-idb">
  97. <a href="#" class="pure-menu-link" data="panel-idb">INFLUXDB</a>
  98. </li>
  99. <li class="pure-menu-item module module-led">
  100. <a href="#" class="pure-menu-link" data="panel-led">LED</a>
  101. </li>
  102. <!-- removeIf(!light) -->
  103. <li class="pure-menu-item module module-color">
  104. <a href="#" class="pure-menu-link" data="panel-color">LIGHTS</a>
  105. </li>
  106. <!-- endRemoveIf(!light) -->
  107. <!-- removeIf(!rfm69) -->
  108. <li class="pure-menu-item module module-rfm69">
  109. <a href="#" class="pure-menu-link" data="panel-mapping">MAPPING</a>
  110. </li>
  111. <li class="pure-menu-item module module-rfm69">
  112. <a href="#" class="pure-menu-link" data="panel-messages">MESSAGES</a>
  113. </li>
  114. <!-- endRemoveIf(!rfm69) -->
  115. <li class="pure-menu-item module module-mqtt">
  116. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  117. </li>
  118. <li class="pure-menu-item module module-nofuss">
  119. <a href="#" class="pure-menu-link" data="panel-nofuss">NOFUSS</a>
  120. </li>
  121. <li class="pure-menu-item module module-ntp">
  122. <a href="#" class="pure-menu-link" data="panel-ntp">NTP</a>
  123. </li>
  124. <!-- removeIf(!rfbridge) -->
  125. <li class="pure-menu-item module module-rfb">
  126. <a href="#" class="pure-menu-link" data="panel-rfb">RF</a>
  127. </li>
  128. <!-- endRemoveIf(!rfbridge) -->
  129. <li class="pure-menu-item module module-rpn">
  130. <a href="#" class="pure-menu-link" data="panel-rpn">RULES</a>
  131. </li>
  132. <li class="pure-menu-item module module-sch">
  133. <a href="#" class="pure-menu-link" data="panel-schedule">SCHEDULE</a>
  134. </li>
  135. <!-- removeIf(!sensor) -->
  136. <li class="pure-menu-item module module-sns">
  137. <a href="#" class="pure-menu-link" data="panel-sns">SENSORS</a>
  138. </li>
  139. <!-- endRemoveIf(!sensor) -->
  140. <li class="pure-menu-item module module-relay">
  141. <a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a>
  142. </li>
  143. <li class="pure-menu-item module module-tspk">
  144. <a href="#" class="pure-menu-link" data="panel-thingspeak">THINGSPEAK</a>
  145. </li>
  146. <li class="pure-menu-item">
  147. <a href="#" class="pure-menu-link" data="panel-wifi">WIFI</a>
  148. </li>
  149. <li class="pure-menu-item menu-item-divided">
  150. <a href="#" class="pure-menu-link" data="panel-admin">ADMIN</a>
  151. </li>
  152. <li class="pure-menu-item module module-dbg">
  153. <a href="#" class="pure-menu-link" data="panel-dbg">DEBUG</a>
  154. </li>
  155. </ul>
  156. <div class="main-buttons">
  157. <button class="pure-button button-update">Save</button>
  158. <button class="pure-button button-reconnect">Reconnect</button>
  159. <button class="pure-button button-reboot">Reboot</button>
  160. </div>
  161. <div class="footer">
  162. &copy; 2016-2019<br />
  163. Xose Pérez<br/>
  164. <a href="https://twitter.com/xoseperez" rel="noopener" target="_blank">@xoseperez</a><br/>
  165. <a href="http://tinkerman.cat" rel="noopener" target="_blank">http://tinkerman.cat</a><br/>
  166. <a href="https://github.com/xoseperez/espurna" rel="noopener" target="_blank">ESPurna @ GitHub</a><br/>
  167. GPLv3 license<br/>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="content">
  172. <div class="panel block" id="panel-status">
  173. <div class="header">
  174. <h1>STATUS</h1>
  175. <h2>Current configuration</h2>
  176. </div>
  177. <div class="page">
  178. <form class="pure-form pure-form-aligned">
  179. <fieldset>
  180. <div id="relays"></div>
  181. <!-- removeIf(!light) -->
  182. <div id="color"></div>
  183. <div id="cct"></div>
  184. <!-- endRemoveIf(!light) -->
  185. <!-- removeIf(!light) -->
  186. <div id="channels"></div>
  187. <!-- endRemoveIf(!light) -->
  188. <!-- removeIf(!sensor) -->
  189. <div id="magnitudes"></div>
  190. <!-- endRemoveIf(!sensor) -->
  191. <!-- removeIf(!curtain) -->
  192. <div id="curtains"></div>
  193. <!-- endRemoveIf(!curtain) -->
  194. <!-- removeIf(!rfm69) -->
  195. <div class="pure-g module module-rfm69">
  196. <label class="pure-u-1 pure-u-lg-1-4">Packet count</label>
  197. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1" type="text" name="packetCount" readonly /></div>
  198. </div>
  199. <div class="pure-g module module-rfm69">
  200. <label class="pure-u-1 pure-u-lg-1-4">Node count</label>
  201. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1" type="text" name="nodeCount" readonly /></div>
  202. </div>
  203. <!-- endRemoveIf(!rfm69) -->
  204. <div class="pure-u-1 pure-u-lg-1-2 state">
  205. <div class="pure-u-1-2">Manufacturer</div>
  206. <div class="pure-u-11-24"><span class="right" name="manufacturer"></span></div>
  207. <div class="pure-u-1-2">Device</div>
  208. <div class="pure-u-11-24"><span class="right" name="device"></span></div>
  209. <div class="pure-u-1-2">Chip ID</div>
  210. <div class="pure-u-11-24"><span class="right" name="chipid"></span></div>
  211. <div class="pure-u-1-2">Wifi MAC</div>
  212. <div class="pure-u-11-24"><span class="right" name="mac"></span></div>
  213. <div class="pure-u-1-2">SDK version</div>
  214. <div class="pure-u-11-24"><span class="right" name="sdk"></span></div>
  215. <div class="pure-u-1-2">Core version</div>
  216. <div class="pure-u-11-24"><span class="right" name="core"></span></div>
  217. <div class="pure-u-1-2">Firmware name</div>
  218. <div class="pure-u-11-24"><span class="right" name="app_name"></span></div>
  219. <div class="pure-u-1-2">Firmware version</div>
  220. <div class="pure-u-11-24"><span class="right" name="app_version"></span></div>
  221. <div class="pure-u-1-2">Firmware build date</div>
  222. <div class="pure-u-11-24"><span class="right" name="app_build"></span></div>
  223. <div class="pure-u-1-2">Firmware size</div>
  224. <div class="pure-u-11-24"><span class="right" name="sketch_size" post=" bytes"></span></div>
  225. <div class="pure-u-1-2">Free space</div>
  226. <div class="pure-u-11-24"><span class="right" name="free_size" post=" bytes"></span></div>
  227. </div>
  228. <div class="pure-u-1 pure-u-lg-11-24 state">
  229. <div class="pure-u-1-2">Network</div>
  230. <div class="pure-u-11-24"><span class="right" name="network"></span></div>
  231. <div class="pure-u-1-2">BSSID</div>
  232. <div class="pure-u-11-24"><span class="right" name="bssid"></span></div>
  233. <div class="pure-u-1-2">Channel</div>
  234. <div class="pure-u-11-24"><span class="right" name="channel"></span></div>
  235. <div class="pure-u-1-2">RSSI</div>
  236. <div class="pure-u-11-24"><span class="right" name="rssi"></span></div>
  237. <div class="pure-u-1-2">IP</div>
  238. <div class="pure-u-11-24"><a href=""><span class="right" name="deviceip"></span></a> (<a href=""><span class="right">telnet</span></a>)</div>
  239. <div class="pure-u-1-2">Free heap</div>
  240. <div class="pure-u-11-24"><span class="right" name="heap" post=" bytes"></span></div>
  241. <div class="pure-u-1-2">Load average</div>
  242. <div class="pure-u-11-24"><span class="right" name="loadaverage"></span><span>%</span></div>
  243. <div class="pure-u-1-2">VCC</div>
  244. <div class="pure-u-11-24"><span class="right" name="vcc">? </span><span>mV</span></div>
  245. <div class="pure-u-1-2 module module-mqtt">MQTT Status</div>
  246. <div class="pure-u-11-24 module module-mqtt"><span class="right" name="mqttStatus"></span></div>
  247. <div class="pure-u-1-2 module module-ntp">NTP Status</div>
  248. <div class="pure-u-11-24 module module-ntp"><span class="right" name="ntpStatus"></span></div>
  249. <div class="pure-u-1-2 module module-ntp">Current time</div>
  250. <div class="pure-u-11-24 module module-ntp"><span class="right" name="now"></span></div>
  251. <div class="pure-u-1-2">Uptime</div>
  252. <div class="pure-u-11-24"><span class="right" name="uptime"></span></div>
  253. <div class="pure-u-1-2">Last update</div>
  254. <div class="pure-u-11-24"><span class="right" name="ago">?</span><span> seconds ago</span></div>
  255. </div>
  256. </fieldset>
  257. </form>
  258. </div>
  259. </div>
  260. <form id="form-general" class="pure-form form-settings">
  261. <div class="panel" id="panel-general">
  262. <div class="header">
  263. <h1>GENERAL</h1>
  264. <h2>General configuration values</h2>
  265. </div>
  266. <div class="page">
  267. <fieldset>
  268. <div class="pure-g">
  269. <label class="pure-u-1 pure-u-lg-1-4">Hostname</label>
  270. <input name="hostname" class="pure-u-1 pure-u-lg-1-4" maxlength="32" type="text" action="reboot" tabindex="1" />
  271. <div class="pure-u-0 pure-u-lg-1-2"></div>
  272. <div class="pure-u-0 pure-u-lg-1-4"></div>
  273. <div class="pure-u-1 pure-u-lg-3-4 hint">
  274. This name will identify this device in your network (http://&lt;hostname&gt;.local).<br />
  275. Hostname may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). They can neither start or end with an hyphen.<br />
  276. For this setting to take effect you should restart the wifi interface by clicking the "Reconnect" button.
  277. </div>
  278. </div>
  279. <div class="pure-g">
  280. <label class="pure-u-1 pure-u-lg-1-4">Description</label>
  281. <input name="desc" class="pure-u-1 pure-u-lg-3-4" maxlength="64" type="text" tabindex="2" />
  282. <div class="pure-u-0 pure-u-lg-1-4"></div>
  283. <div class="pure-u-1 pure-u-lg-3-4 hint">
  284. Human-friendly name for your device. Will be reported with the heartbeat.<br />
  285. You can use this to specify the location or some other identification information.
  286. </div>
  287. </div>
  288. <div class="pure-g module module-btn">
  289. <label class="pure-u-1 pure-u-lg-1-4">Click repeat delay</label>
  290. <input name="btnRepDel" class="pure-u-1 pure-u-lg-1-4" type="number" action="reboot" min="0" step="100" max="1000" tabindex="6" />
  291. <div class="pure-u-0 pure-u-lg-1-2"></div>
  292. <div class="pure-u-0 pure-u-lg-1-4"></div>
  293. <div class="pure-u-1 pure-u-lg-3-4 hint">
  294. Delay in milliseconds to detect a double or triple click (from 0 to 1000ms).<br />
  295. The lower this number the faster the device will respond to button clicks but the harder it will be to get the expected event.
  296. Increase this number if you are having trouble triggering the event.
  297. Set this value to 0 to disable repeat detection, device will respond immediately to a single button click. When using default configuration, consider that this will disable the SoftAP button action.<br />
  298. You will have to <strong>reboot the device</strong> to apply this setting.
  299. </div>
  300. </div>
  301. <div class="pure-g module module-alexa">
  302. <label class="pure-u-1 pure-u-lg-1-4">Alexa integration</label>
  303. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="alexaEnabled" /></div>
  304. </div>
  305. <div class="pure-g module module-alexa">
  306. <label class="pure-u-1 pure-u-lg-1-4">Alexa device name</label>
  307. <input name="alexaName" class="pure-u-1 pure-u-lg-1-4" maxlength="31" type="text" action="reboot" tabindex="7" />
  308. <div class="pure-u-0 pure-u-lg-1-2"></div>
  309. <div class="pure-u-0 pure-u-lg-1-4"></div>
  310. <div class="pure-u-1 pure-u-lg-3-4 hint">
  311. This name will be used in Alexa integration.<br />
  312. </div>
  313. </div>
  314. </fieldset>
  315. </div>
  316. </div>
  317. </form>
  318. <form id="form-led" class="pure-form form-settings">
  319. <div class="panel" id="panel-led">
  320. <div class="header">
  321. <h1>LED</h1>
  322. <h2>Notification LED configuration</h2>
  323. </div>
  324. <div class="page">
  325. <details>
  326. <summary><legend class="module module-led">Available modes</legend></summary>
  327. <br/>
  328. <div class="pure-g module module-led">
  329. <div class="pure-u-1 pure-u-lg-3-4 hint">
  330. <li><strong>WiFi status</strong> will blink at 1Hz when trying to connect. If successfully connected it will briefly blink every 5 seconds if in STA mode or every second if in AP mode.</li>
  331. <li><strong>Follow switch</strong> will force the LED to follow the status of a given switch (you must define which switch to follow in the side field).</li>
  332. <li><strong>Inverse switch</strong> will force the LED to not-follow the status of a given switch (you must define which switch to follow in the side field).</li>
  333. <li><strong>Find me</strong> will turn the LED ON when all switches are OFF. This is meant to locate switches at night.</li>
  334. <li><strong>Find me &amp; WiFi</strong> will follow the WiFi status but will stay mostly on when switches are OFF, and mostly OFF when any of them is ON.</li>
  335. <li><strong>Switches status</strong> will turn the LED ON whenever any switch is ON, and OFF otherwise. This is global status notification.</li>
  336. <li><strong>Switches status &amp; WiFi</strong> will follow the WiFi status but will stay mostly off when switches are OFF, and mostly ON when any of them is ON.</li>
  337. <li><strong>Manually managed</strong> will let you manage the LED status via MQTT by sending a message to "&lt;base_topic&gt;/led/0/set" with a payload of 0, 1 or 2 (to toggle it).</li>
  338. <li><strong>Always ON</strong> and <strong>Always OFF</strong> modes are self-explanatory.</li>
  339. </div>
  340. </div>
  341. </details>
  342. <fieldset>
  343. <div id="ledConfig"></div>
  344. </fieldset>
  345. </div>
  346. </div>
  347. </form>
  348. <form id="form-relay" class="pure-form form-settings">
  349. <div class="panel" id="panel-relay">
  350. <div class="header">
  351. <h1>SWITCHES</h1>
  352. <h2>Switch / relay configuration</h2>
  353. </div>
  354. <div class="page">
  355. <fieldset>
  356. <legend class="module module-multirelay">General</legend>
  357. <div class="pure-g module module-multirelay">
  358. <label class="pure-u-1 pure-u-lg-1-4">Switch sync mode</label>
  359. <select name="relaySync" class="pure-u-1 pure-u-lg-3-4" tabindex="3">
  360. <option value="0">No synchronisation</option>
  361. <option value="1">Zero or one switches active</option>
  362. <option value="2">One and just one switch active</option>
  363. <option value="3">All synchronised</option>
  364. <option value="4">Switch #0 controls other switches</option>
  365. </select>
  366. <div class="pure-u-0 pure-u-lg-1-4"></div>
  367. <div class="pure-u-1 pure-u-lg-3-4 hint">Define how the different switches should be synchronized.</div>
  368. </div>
  369. <div class="pure-g module module-multirelay">
  370. <label class="pure-u-1 pure-u-lg-1-4">Interlock delay</label>
  371. <div class="pure-u-1 pure-u-lg-1-4"><input name="relayDelayInterlock" class="pure-u-1" type="number" min="0" /></div>
  372. </div>
  373. <div id="relayConfig"></div>
  374. </fieldset>
  375. </div>
  376. </div>
  377. </form>
  378. <!-- removeIf(!curtain) -->
  379. <form id="form-curtain" class="pure-form form-settings">
  380. <div class="panel" id="panel-curtain">
  381. <div class="header">
  382. <h1>CURTAIN</h1>
  383. <h2>Curtain configuration</h2>
  384. </div>
  385. <div class="page">
  386. <fieldset>
  387. <legend class="module module-curtain">General</legend>
  388. <div class="pure-g module module-curtain">
  389. <label class="pure-u-1 pure-u-lg-1-4">Curtain type</label>
  390. <select class="pure-u-1 pure-u-lg-1-4" name="curtainType" tabindex="3">
  391. <option value="0">Roller</option>
  392. <option value="1">Closing right</option>
  393. <option value="2">Closing left</option>
  394. <option value="3">Two sides</option>
  395. </select>
  396. <div class="pure-u-0 pure-u-lg-1-4"></div>
  397. <div class="pure-u-1 pure-u-lg-3-4 hint">Define your curtain type. It adapts the graphical view in status menu.</div>
  398. </div>
  399. <div class="pure-g module module-curtain">
  400. <label class="pure-u-1 pure-u-lg-1-4">Curtain bootup position</label>
  401. <select class="pure-u-1 pure-u-lg-1-4" name="curtainBoot" tabindex="3">
  402. <option value="0">Do nothing</option>
  403. <option value="1">Closed</option>
  404. <option value="2">Opened</option>
  405. <option value="3">Last set position</option>
  406. </select>
  407. <div class="pure-u-0 pure-u-lg-1-4"></div>
  408. <div class="pure-u-1 pure-u-lg-3-4 hint">Define the initial position of the curtain after a reboot or power loss.</div>
  409. </div>
  410. <div id="curtainConfig"></div>
  411. </fieldset>
  412. </div>
  413. </div>
  414. </form>
  415. <!-- endRemoveIf(!curtain) -->
  416. <!-- removeIf(!light) -->
  417. <form id="form-color" class="pure-form form-settings">
  418. <div class="panel" id="panel-color">
  419. <div class="header">
  420. <h1>LIGHTS</h1>
  421. <h2>Lights configuration</h2>
  422. </div>
  423. <div class="page">
  424. <fieldset>
  425. <div class="pure-g module-relay">
  426. <label class="pure-u-1 pure-u-lg-1-4">Light state switch</label>
  427. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="ltRelay" tabindex="5" /></div>
  428. <div class="pure-u-0 pure-u-lg-1-2"></div>
  429. <div class="pure-u-0 pure-u-lg-1-4"></div>
  430. <div class="pure-u-1 pure-u-lg-3-4 hint">If enabled, add virtual relay switch that controls the ON / OFF state.</div>
  431. </div>
  432. <div class="pure-g">
  433. <label class="pure-u-1 pure-u-lg-1-4">Save values</label>
  434. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="ltSave" tabindex="6" /></div>
  435. <div class="pure-u-0 pure-u-lg-1-2"></div>
  436. <div class="pure-u-0 pure-u-lg-1-4"></div>
  437. <div class="pure-u-1 pure-u-lg-3-4 hint">Save channel &amp; brightness values in settings</div>
  438. </div>
  439. <div class="pure-g">
  440. <label class="pure-u-1 pure-u-lg-1-4">Save delay</label>
  441. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1" type="number" name="ltSaveDelay" min="5000" max="60000" tabindex="7" /></div>
  442. <div class="pure-u-0 pure-u-lg-1-2"></div>
  443. <div class="pure-u-0 pure-u-lg-1-4"></div>
  444. <div class="pure-u-1 pure-u-lg-3-4 hint">When "Save values" is enabled, wait for the delay (ms) before the values are saved</div>
  445. </div>
  446. <div class="pure-g">
  447. <label class="pure-u-1 pure-u-lg-1-4">Use color</label>
  448. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useColor" action="reload" tabindex="8" /></div>
  449. <div class="pure-u-0 pure-u-lg-1-2"></div>
  450. <div class="pure-u-0 pure-u-lg-1-4"></div>
  451. <div class="pure-u-1 pure-u-lg-3-4 hint">Use the first three channels as RGB channels. This will also enable the color picker in the web UI. Will only work if the device has at least 3 dimmable channels.<br />Reload the page to update the web interface.</div>
  452. </div>
  453. <div class="pure-g">
  454. <label class="pure-u-1 pure-u-lg-1-4">Use RGB picker</label>
  455. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useRGB" action="reload" tabindex="11" /></div>
  456. <div class="pure-u-0 pure-u-lg-1-2"></div>
  457. <div class="pure-u-0 pure-u-lg-1-4"></div>
  458. <div class="pure-u-1 pure-u-lg-3-4 hint">Use RGB color picker if enabled (plus brightness), otherwise use HSV (hue-saturation-value) style</div>
  459. </div>
  460. <div class="pure-g">
  461. <label class="pure-u-1 pure-u-lg-1-4">Use white channel</label>
  462. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useWhite" action="reload" tabindex="9" /></div>
  463. <div class="pure-u-0 pure-u-lg-1-2"></div>
  464. <div class="pure-u-0 pure-u-lg-1-4"></div>
  465. <div class="pure-u-1 pure-u-lg-3-4 hint">For 2 channels warm white and cold white lights or color lights to use forth dimmable channel as (cold) white light calculated out of the RGB values.<br />Will only work if the device has at least 4 dimmable channels.<br />Enabling this will render useless the "Channel 4" slider in the status page.<br />Reload the page to update the web interface.</div>
  466. </div>
  467. <div class="pure-g">
  468. <label class="pure-u-1 pure-u-lg-1-4">Use white color temperature</label>
  469. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useCCT" action="reload" tabindex="10" /></div>
  470. <div class="pure-u-0 pure-u-lg-1-2"></div>
  471. <div class="pure-u-0 pure-u-lg-1-4"></div>
  472. <div class="pure-u-1 pure-u-lg-3-4 hint">Use a dimmable channel as warm white light and another dimmable channel as cold white light.<br />On devices with two dimmable channels the first use used for warm white light and the second for cold white light.<br />On color lights the fifth use used for warm white light and the fourth for cold white light.<br />Will only work if the device has exactly 2 dimmable channels or at least 5 dimmable channels and "white channel" above is also ON.<br />Enabling this will render useless the "Channel 5" slider in the status page.<br />Reload the page to update the web interface.</div>
  473. </div>
  474. <div class="pure-g">
  475. <label class="pure-u-1 pure-u-lg-1-4">Use gamma correction</label>
  476. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useGamma" tabindex="11" /></div>
  477. <div class="pure-u-0 pure-u-lg-1-2"></div>
  478. <div class="pure-u-0 pure-u-lg-1-4"></div>
  479. <div class="pure-u-1 pure-u-lg-3-4 hint">Use gamma correction for RGB channels.<br />Will only work if "use colorpicker" above is also ON.</div>
  480. </div>
  481. <div class="pure-g">
  482. <label class="pure-u-1 pure-u-lg-1-4">Use CSS style</label>
  483. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useCSS" tabindex="12" /></div>
  484. <div class="pure-u-0 pure-u-lg-1-2"></div>
  485. <div class="pure-u-0 pure-u-lg-1-4"></div>
  486. <div class="pure-u-1 pure-u-lg-3-4 hint">
  487. <div class="module module-ha">
  488. <strong>WARNING! </strong>Incompatible with Home Assistant MQTT integration
  489. </div>
  490. Use CSS style to report colors to MQTT and REST API. <br />Red will be reported as "#FF0000" if ON, otherwise "255,0,0"
  491. </div>
  492. </div>
  493. <div class="pure-g">
  494. <label class="pure-u-1 pure-u-lg-1-4">Channel transitions</label>
  495. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useTransitions" tabindex="13" /></div>
  496. <div class="pure-u-0 pure-u-lg-1-2"></div>
  497. <div class="pure-u-0 pure-u-lg-1-4"></div>
  498. <div class="pure-u-1 pure-u-lg-3-4 hint">If enabled, channel changes will be smoothed.</div>
  499. </div>
  500. <div class="pure-g">
  501. <label class="pure-u-1 pure-u-lg-1-4">Transition time</label>
  502. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1" type="number" name="ltTime" min="10" max="5000" tabindex="14" action="reload" /></div>
  503. <div class="pure-u-0 pure-u-lg-1-2"></div>
  504. <div class="pure-u-0 pure-u-lg-1-4"></div>
  505. <div class="pure-u-1 pure-u-lg-3-4 hint">Time to transition from one color to another (ms)</div>
  506. </div>
  507. <div class="pure-g">
  508. <label class="pure-u-1 pure-u-lg-1-4">Transition step</label>
  509. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1" type="number" name="ltStep" min="10" max="5000" tabindex="15" action="reload" /></div>
  510. <div class="pure-u-0 pure-u-lg-1-2"></div>
  511. <div class="pure-u-0 pure-u-lg-1-4"></div>
  512. <div class="pure-u-1 pure-u-lg-3-4 hint">(ms, depends on the transition time)</div>
  513. </div>
  514. <div class="pure-g">
  515. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group</label></div>
  516. <div class="pure-u-1 pure-u-lg-3-4"><input name="mqttGroupColor" class="pure-u-1" tabindex="16" action="reconnect" /></div>
  517. <div class="pure-u-0 pure-u-lg-1-4"></div>
  518. <div class="pure-u-1 pure-u-lg-3-4 hint">Sync color between different lights.</div>
  519. </div>
  520. </fieldset>
  521. </div>
  522. </div>
  523. </form>
  524. <!-- endRemoveIf(!light) -->
  525. <form id="form-admin" class="pure-form form-settings">
  526. <div class="panel" id="panel-admin">
  527. <div class="header">
  528. <h1>ADMINISTRATION</h1>
  529. <h2>Device administration and security settings</h2>
  530. </div>
  531. <div class="page">
  532. <fieldset>
  533. <div class="pure-g">
  534. <label class="pure-u-1 pure-u-lg-1-4">Settings</label>
  535. <div class="pure-u-1-3 pure-u-lg-1-4"><button type="button" class="pure-button button-settings-backup pure-u-23-24">Backup</button></div>
  536. <div class="pure-u-1-3 pure-u-lg-1-4"><button type="button" class="pure-button button-settings-restore pure-u-23-24">Restore</button></div>
  537. <div class="pure-u-1-3 pure-u-lg-1-4"><button type="button" class="pure-button button-settings-factory pure-u-1">Factory Reset</button></div>
  538. </div>
  539. <div class="pure-g">
  540. <label class="pure-u-1 pure-u-lg-1-4">Admin password</label>
  541. <input name="adminPass1" class="pure-u-1 pure-u-lg-3-4" placeholder="New password" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" action="reboot" tabindex="11" autocomplete="false" spellcheck="false" />
  542. <span class="no-select password-reveal"></span>
  543. <div class="pure-u-1 pure-u-lg-1-4"></div>
  544. <input name="adminPass2" class="pure-u-1 pure-u-lg-3-4" placeholder="Repeat password" data-settings-real-name="adminPass" minlength="8" maxlength="63" type="password" action="reboot" tabindex="12" autocomplete="false" spellcheck="false" />
  545. <span class="no-select password-reveal"></span>
  546. <div class="pure-u-0 pure-u-lg-1-4"></div>
  547. <div class="pure-u-1 pure-u-lg-3-4 hint">
  548. The administrator password is used to access this web interface (user 'admin'), but also to connect to the device when in AP mode or to flash a new firmware over-the-air (OTA).<br />
  549. It must be <strong>8..63 characters</strong> (numbers and letters and any of these special characters: _,.;:~!?@#$%^&amp;*&lt;&gt;\|(){}[]) and have at least <strong>one lowercase</strong> and <strong>one uppercase</strong> or <strong>one number</strong>.</div>
  550. </div>
  551. <div class="pure-g">
  552. <label class="pure-u-1 pure-u-lg-1-4">HTTP port</label>
  553. <input name="webPort" class="pure-u-1 pure-u-lg-1-4" type="text" action="reboot" tabindex="13" />
  554. <div class="pure-u-0 pure-u-lg-1-2"></div>
  555. <div class="pure-u-0 pure-u-lg-1-4"></div>
  556. <div class="pure-u-1 pure-u-lg-3-4 hint">
  557. This is the port for the web interface and API requests.
  558. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
  559. </div>
  560. </div>
  561. <div class="pure-g">
  562. <label class="pure-u-1 pure-u-lg-1-4">Enable WS Auth</label>
  563. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="wsAuth" /></div>
  564. </div>
  565. <div class="pure-g module module-api">
  566. <label class="pure-u-1 pure-u-lg-1-4">Enable HTTP API</label>
  567. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="apiEnabled" /></div>
  568. </div>
  569. <div class="pure-g module module-api">
  570. <label class="pure-u-1 pure-u-lg-1-4">Restful API</label>
  571. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="apiRestFul" /></div>
  572. <div class="pure-u-0 pure-u-lg-1-2"></div>
  573. <div class="pure-u-0 pure-u-lg-1-4"></div>
  574. <div class="pure-u-1 pure-u-lg-3-4 hint">
  575. If enabled, API requests to change a status (like a relay) must be done using PUT.
  576. If disabled you can issue them as GET requests (easier from a browser).
  577. </div>
  578. </div>
  579. <div class="pure-g module module-api">
  580. <label class="pure-u-1 pure-u-lg-1-4">Real time API</label>
  581. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="apiRealTime" /></div>
  582. <div class="pure-u-0 pure-u-lg-1-2"></div>
  583. <div class="pure-u-0 pure-u-lg-1-4"></div>
  584. <div class="pure-u-1 pure-u-lg-3-4 hint">
  585. By default, some magnitudes are being preprocessed and filtered to avoid spurious values.
  586. If you want to get real-time values (not preprocessed) in the API turn on this setting.
  587. </div>
  588. </div>
  589. <div class="pure-g module module-api">
  590. <label class="pure-u-1 pure-u-lg-1-4">HTTP API Key</label>
  591. <input name="apiKey" class="pure-u-3-4 pure-u-lg-1-2" type="text" tabindex="14" />
  592. <div class="pure-u-1-4 pure-u-lg-1-4"><button type="button" class="pure-button button-apikey pure-u-23-24">Auto</button></div>
  593. <div class="pure-u-0 pure-u-lg-1-4"></div>
  594. <div class="pure-u-1 pure-u-lg-3-4 hint">
  595. This is the key you will have to pass with every HTTP request to the API, either to get or write values.
  596. All API calls must contain the <strong>apikey</strong> parameter with the value above.
  597. To know what APIs are enabled do a call to <strong>/apis</strong>.
  598. </div>
  599. </div>
  600. <div class="pure-g module module-telnet">
  601. <label class="pure-u-1 pure-u-lg-1-4">Enable TELNET</label>
  602. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="telnetSTA" /></div>
  603. <div class="pure-u-0 pure-u-lg-1-2"></div>
  604. <div class="pure-u-0 pure-u-lg-1-4"></div>
  605. <div class="pure-u-1 pure-u-lg-3-4 hint">Turn ON to be able to telnet to your device while connected to your home router.<br />TELNET is always enabled in AP mode.</div>
  606. </div>
  607. <div class="pure-g module module-telnet">
  608. <label class="pure-u-1 pure-u-lg-1-4">TELNET Password</label>
  609. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="telnetAuth" /></div>
  610. <div class="pure-u-0 pure-u-lg-1-2"></div>
  611. <div class="pure-u-0 pure-u-lg-1-4"></div>
  612. <div class="pure-u-1 pure-u-lg-3-4 hint">Request password when starting telnet session</div>
  613. </div>
  614. <div class="pure-g">
  615. <label class="pure-u-1 pure-u-lg-1-4">Heartbeat message</label>
  616. <select class="pure-u-1 pure-u-lg-3-4" name="hbMode" tabindex="15" >
  617. <option value="0">Disabled</option>
  618. <option value="1">On device startup</option>
  619. <option value="2">Repeat after defined interval</option>
  620. <option value="3">Repeat only device status</option>
  621. </select>
  622. <div class="pure-u-0 pure-u-lg-1-4"></div>
  623. <div class="pure-u-1 pure-u-lg-3-4 hint">
  624. Define when heartbeat message will be sent.
  625. </div>
  626. </div>
  627. <div class="pure-g">
  628. <label class="pure-u-1 pure-u-lg-1-4">Heartbeat interval</label>
  629. <input name="hbInterval" class="pure-u-1 pure-u-lg-1-4" type="number" tabindex="16" />
  630. <div class="pure-u-0 pure-u-lg-1-2"></div>
  631. <div class="pure-u-0 pure-u-lg-1-4"></div>
  632. <div class="pure-u-1 pure-u-lg-3-4 hint">
  633. This is the interval in <strong>seconds</strong> how often to send the heartbeat message.
  634. </div>
  635. </div>
  636. <div class="pure-g module module-ota">
  637. <label class="pure-u-1 pure-u-lg-1-4">Upgrade</label>
  638. <input class="pure-u-1-2 pure-u-lg-1-2" name="filename" type="text" readonly />
  639. <div class="pure-u-1-4 pure-u-lg-1-8"><button type="button" class="pure-button button-upgrade-browse pure-u-23-24">Browse</button></div>
  640. <div class="pure-u-1-4 pure-u-lg-1-8"><button type="button" class="pure-button button-upgrade pure-u-23-24">Upgrade</button></div>
  641. <div class="pure-u-0 pure-u-lg-1-4"></div>
  642. <div class="pure-u-1 pure-u-lg-3-4 hint">The device has <span name="free_size"></span> bytes available for OTA updates. If your image is larger than this consider doing a <a href="https://github.com/xoseperez/espurna/wiki/TwoStepUpdates" rel="noopener" target="_blank"><strong>two-step update</strong></a>.</div>
  643. <div class="pure-u-0 pure-u-lg-1-4"></div>
  644. <div class="pure-u-1 pure-u-lg-3-4"><progress id="upgrade-progress"></progress></div>
  645. <input name="upgrade" type="file" tabindex="17" />
  646. </div>
  647. </fieldset>
  648. </div>
  649. </div>
  650. </form>
  651. <form id="form-wifi" class="pure-form form-settings">
  652. <div class="panel" id="panel-wifi">
  653. <div class="header">
  654. <h1>WIFI</h1>
  655. <h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  656. </div>
  657. <div class="page">
  658. <fieldset>
  659. <legend>General</legend>
  660. <div class="pure-g">
  661. <div class="pure-u-1 pure-u-lg-1-4"></div>
  662. <div class="pure-u-1 pure-u-lg-3-4 hint">Device hostname can be configured on the GENERAL tab.</div>
  663. </div>
  664. <div class="pure-g">
  665. <label class="pure-u-1 pure-u-lg-1-4">Scan networks</label>
  666. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="wifiScan" tabindex="1" /></div>
  667. <div class="pure-u-0 pure-u-lg-1-2"></div>
  668. <div class="pure-u-0 pure-u-lg-1-4"></div>
  669. <div class="pure-u-1 pure-u-lg-3-4 hint">
  670. ESPurna will scan for visible WiFi SSIDs and try to connect to networks defined below in order of <strong>signal strength</strong>, even if multiple AP share the same SSID.
  671. When disabled, ESPurna will try to connect to the networks in the same order they are listed below.
  672. Disable this option if you are <strong>connecting to a single access point</strong> (or router) or to a <strong>hidden SSID</strong>.
  673. </div>
  674. <div class="pure-u-0 pure-u-lg-1-4"></div>
  675. <button class="pure-button button-wifi-scan" type="button">Scan now</button>
  676. <div class="pure-u-0 pure-u-lg-1-4 scan loading"></div>
  677. </div>
  678. <div class="pure-g">
  679. <span class="pure-u-1 terminal" id="scanResult" name="scanResult"></span>
  680. </div>
  681. <legend>Networks</legend>
  682. <div id="networks" class="group-settings" data-settings-target="ssid pass" ></div>
  683. <button type="button" class="pure-button button-add-network">Add network</button>
  684. </fieldset>
  685. </div>
  686. </div>
  687. </form>
  688. <form id="form-schedule" class="pure-form form-settings">
  689. <div class="panel" id="panel-schedule">
  690. <div class="header">
  691. <h1>SCHEDULE</h1>
  692. <h2>Turn switches ON and OFF based on the current time.</h2>
  693. </div>
  694. <div class="page">
  695. <fieldset>
  696. <div id="schedules" class="group-settings" data-settings-max="10" data-settings-target="schSwitch schType" ></div>
  697. <button type="button" class="pure-button button-add-switch-schedule module module-relay">Add switch schedule</button>
  698. <!-- removeIf(!light) -->
  699. <button type="button" class="pure-button button-add-light-schedule module module-color">Add channel schedule</button>
  700. <!-- endRemoveIf(!light) -->
  701. <!-- removeIf(!curtain) -->
  702. <button type="button" class="pure-button button-add-curtain-schedule module module-curtain">Add curtain schedule</button>
  703. <!-- endRemoveIf(!curtain) -->
  704. </fieldset>
  705. </div>
  706. </div>
  707. </form>
  708. <!-- removeIf(!rfm69) -->
  709. <form id="form-mapping" class="pure-form form-settings">
  710. <div class="panel" id="panel-mapping">
  711. <div class="header">
  712. <h1>MAPPING</h1>
  713. <h2>
  714. Configure the map between nodeID/key and MQTT topic. Messages from the given nodeID with the given key will be forwarded to the specified topic.
  715. You can also configure a default topic using {nodeid} and {key} as placeholders, if the default topic is empty messages without defined map will be discarded.
  716. </h2>
  717. </div>
  718. <div class="page">
  719. <fieldset>
  720. <legend>Default topic</legend>
  721. <div class="pure-g">
  722. <input name="rfm69Topic" type="text" class="pure-u-23-24" value="" size="8" tabindex="41" placeholder="Default MQTT Topic (use {nodeid} and {key} as placeholders)">
  723. </div>
  724. <legend>Specific topics</legend>
  725. <div id="mapping" class="group-settings" ></div>
  726. <button type="button" class="pure-button button-add-mapping">Add</button>
  727. </fieldset>
  728. </div>
  729. </div>
  730. </form>
  731. <form id="form-messages" class="pure-form">
  732. <div class="panel" id="panel-messages">
  733. <div class="header">
  734. <h1>MESSAGES</h1>
  735. <h2>
  736. Messages being received. Previous messages are not displayed.
  737. You have to keep the page open in order to keep receiving them.
  738. You can filter/unfilter by clicking on the values.
  739. Left click on a value to show only rows that match that value, middle click to show all rows but those matching that value.
  740. Filtered colums have red headers.
  741. </h2>
  742. </div>
  743. <div class="page">
  744. <table id="packets" class="display" cellspacing="0">
  745. <thead>
  746. <tr>
  747. <th>Timestamp</th>
  748. <th>SenderID</th>
  749. <th>PacketID</th>
  750. <th>TargetID</th>
  751. <th>Key</th>
  752. <th>Value</th>
  753. <th>RSSI</th>
  754. <th>Duplicates</th>
  755. <th>Missing</th>
  756. </tr>
  757. </thead>
  758. <tbody>
  759. </tbody>
  760. </table>
  761. <button type="button" class="pure-button button-clear-filters">Clear filters</button>
  762. <button type="button" class="pure-button button-clear-messages">Clear messages</button>
  763. <button type="button" class="pure-button button-clear-counts">Clear counts</button>
  764. </div>
  765. </div>
  766. </form>
  767. <!-- endRemoveIf(!rfm69) -->
  768. <form id="form-mqtt" class="pure-form form-settings">
  769. <div class="panel" id="panel-mqtt">
  770. <div class="header">
  771. <h1>MQTT</h1>
  772. <h2>Configure an <strong>MQTT broker</strong> in your network and you will be able to change the switch status via an MQTT message.</h2>
  773. </div>
  774. <div class="page">
  775. <fieldset>
  776. <div class="pure-g">
  777. <label class="pure-u-1 pure-u-lg-1-4">Enable MQTT</label>
  778. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttEnabled" tabindex="30" /></div>
  779. </div>
  780. <div class="pure-g">
  781. <label class="pure-u-1 pure-u-lg-1-4">MQTT Broker</label>
  782. <input class="pure-u-1 pure-u-lg-1-4" name="mqttServer" type="text" tabindex="21" placeholder="IP or address of your broker" />
  783. </div>
  784. <div class="pure-g">
  785. <label class="pure-u-1 pure-u-lg-1-4">MQTT Port</label>
  786. <input class="pure-u-1 pure-u-lg-1-4" name="mqttPort" type="text" tabindex="22" value="1883" />
  787. </div>
  788. <div class="pure-g">
  789. <label class="pure-u-1 pure-u-lg-1-4">MQTT User</label>
  790. <input class="pure-u-1 pure-u-lg-1-4" name="mqttUser" type="text" tabindex="23" placeholder="Leave blank if no user" autocomplete="off" />
  791. <div class="pure-u-0 pure-u-lg-1-2"></div>
  792. <div class="pure-u-0 pure-u-lg-1-4"></div>
  793. <div class="pure-u-1 pure-u-lg-3-4 hint">
  794. You can use the following placeholders: {hostname}, {mac}
  795. </div>
  796. </div>
  797. <div class="pure-g">
  798. <label class="pure-u-1 pure-u-lg-1-4">MQTT Password</label>
  799. <input class="pure-u-1 pure-u-lg-1-4" name="mqttPassword" type="password" tabindex="24" placeholder="Leave blank if no pass" autocomplete="new-password" spellcheck="false" />
  800. <span class="no-select password-reveal"></span>
  801. </div>
  802. <div class="pure-g">
  803. <label class="pure-u-1 pure-u-lg-1-4">MQTT Client ID</label>
  804. <input class="pure-u-1 pure-u-lg-1-4" name="mqttClientID" type="text" tabindex="25" />
  805. <div class="pure-u-0 pure-u-lg-1-2"></div>
  806. <div class="pure-u-0 pure-u-lg-1-4"></div>
  807. <div class="pure-u-1 pure-u-lg-3-4 hint">
  808. If left empty the firmware will generate a client ID based on the serial number of the chip. You can use the following placeholders: {hostname}, {mac}
  809. </div>
  810. </div>
  811. <div class="pure-g">
  812. <label class="pure-u-1 pure-u-lg-1-4">MQTT QoS</label>
  813. <select class="pure-u-1 pure-u-lg-1-4" name="mqttQoS" tabindex="26">
  814. <option value="0">0: At most once</option>
  815. <option value="1">1: At least once</option>
  816. <option value="2">2: Exactly once</option>
  817. </select>
  818. </div>
  819. <div class="pure-g">
  820. <label class="pure-u-1 pure-u-lg-1-4">MQTT Retain</label>
  821. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttRetain" tabindex="27" /></div>
  822. </div>
  823. <div class="pure-g">
  824. <label class="pure-u-1 pure-u-lg-1-4">MQTT Keep Alive</label>
  825. <input class="pure-u-1 pure-u-lg-1-4" type="number" name="mqttKeep" min="10" max="3600" tabindex="28" />
  826. </div>
  827. <div class="pure-g module module-mqttssl">
  828. <label class="pure-u-1 pure-u-lg-1-4">Use secure connection (SSL)</label>
  829. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttUseSSL" tabindex="29" /></div>
  830. </div>
  831. <div class="pure-g module module-mqttssl">
  832. <label class="pure-u-1 pure-u-lg-1-4">SSL Fingerprint</label>
  833. <input class="pure-u-1 pure-u-lg-3-4" name="mqttFP" type="text" maxlength="59" tabindex="30" />
  834. <div class="pure-u-0 pure-u-lg-1-4"></div>
  835. <div class="pure-u-1 pure-u-lg-3-4 hint">
  836. This is the fingerprint for the SSL certificate of the server.<br />
  837. You can get it using <a href="https://www.grc.com/fingerprints.htm" rel="noopener" target="_blank">https://www.grc.com/fingerprints.htm</a><br />
  838. or using openssl from a linux box by typing:<br />
  839. <pre>$ openssl s_client -connect &lt;host&gt;:&lt;port&gt; &lt; /dev/null 2&gt;/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin</pre>
  840. </div>
  841. </div>
  842. <div class="pure-g">
  843. <label class="pure-u-1 pure-u-lg-1-4">MQTT Root Topic</label>
  844. <input class="pure-u-1 pure-u-lg-3-4" name="mqttTopic" type="text" tabindex="31" />
  845. <div class="pure-u-0 pure-u-lg-1-4"></div>
  846. <div class="pure-u-1 pure-u-lg-3-4 hint">
  847. This is the root topic for this device. The {hostname} and {mac} placeholders will be replaced by the device hostname and MAC address.<br />
  848. - <strong>&lt;root&gt;/relay/#/set</strong> Send a 0 or a 1 as a payload to this topic to switch it on or off. You can also send a 2 to toggle its current state. Replace # with the switch ID (starting from 0). If the board has only one switch it will be 0.<br />
  849. <!-- removeIf(!curtain) -->
  850. - <strong>&lt;root&gt;/curtain/set</strong> Set the curtain opening value (0-100), 0 means closed, 100 opened. "on", "off", "pause" pilots buttons.<br />
  851. <!-- endRemoveIf(!curtain) -->
  852. <!-- removeIf(!light) -->
  853. <span class="module module-color">- <strong>&lt;root&gt;/rgb/set</strong> Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB" (0-255 each).<br /></span>
  854. <span class="module module-color">- <strong>&lt;root&gt;/hsv/set</strong> Set the color using hue (0-360), saturation (0-100) and value (0-100) values, comma separated.<br /></span>
  855. <span class="module module-color">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness (0-255).<br /></span>
  856. <span class="module module-color">- <strong>&lt;root&gt;/channel/#/set</strong> Set the value for a single color channel (0-255). Replace # with the channel ID (starting from 0 and up to 4 for RGBWC lights).<br /></span>
  857. <span class="module module-color">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br /></span>
  858. <!-- endRemoveIf(!light) -->
  859. - <strong>&lt;root&gt;/status</strong> The device will report a 1 to this topic every few minutes. Upon MQTT disconnecting this will be set to 0.<br />
  860. - Other values reported (depending on the build) are: <strong>firmware</strong> and <strong>version</strong>, <strong>hostname</strong>, <strong>IP</strong>, <strong>MAC</strong>, signal strenth (<strong>RSSI</strong>), <strong>uptime</strong> (in seconds), <strong>free heap</strong> and <strong>power supply</strong>.
  861. </div>
  862. </div>
  863. <div class="pure-g">
  864. <label class="pure-u-1 pure-u-lg-1-4">Use JSON payload</label>
  865. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttUseJson" tabindex="32" /></div>
  866. <div class="pure-u-1 pure-u-lg-1-2"></div>
  867. <div class="pure-u-1 pure-u-lg-1-4"></div>
  868. <div class="pure-u-1 pure-u-lg-3-4 hint">
  869. All messages (except the device status) will be included in a JSON payload along with the timestamp and hostname
  870. and sent under the <strong>&lt;root&gt;/data</strong> topic.<br />
  871. Messages will be queued and sent after 100ms, so different messages could be merged into a single payload.<br />
  872. Subscriptions will still be done to single topics.
  873. </div>
  874. </div>
  875. </fieldset>
  876. </div>
  877. </div>
  878. </form>
  879. <form id="form-nofuss" class="pure-form form-settings">
  880. <div class="panel" id="panel-nofuss">
  881. <div class="header">
  882. <h1>NoFUSS</h1>
  883. <h2>Automatically upgrade the firmware (see <a href="https://bitbucket.org/xoseperez/nofuss">xoseperez/nofuss</a> for details)</h2>
  884. </div>
  885. <div class="page">
  886. <fieldset>
  887. <div class="pure-g">
  888. <label class="pure-u-1 pure-u-lg-1-4">Enable</label>
  889. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="nofussEnabled" /></div>
  890. </div>
  891. <div class="pure-g">
  892. <label class="pure-u-1 pure-u-lg-1-4">Server</label>
  893. <input name="nofussServer" class="pure-u-1 pure-u-lg-3-4" type="text" tabindex="15" />
  894. <div class="pure-u-0 pure-u-lg-1-4"></div>
  895. <div class="pure-u-1 pure-u-lg-3-4 hint">Address of the NoFUSS server</div>
  896. </div>
  897. </fieldset>
  898. </div>
  899. </div>
  900. </form>
  901. <form id="form-ntp" class="pure-form form-settings">
  902. <div class="panel" id="panel-ntp">
  903. <div class="header">
  904. <h1>NTP</h1>
  905. <h2>Synchronize the device time with the remote server</h2>
  906. </div>
  907. <div class="page">
  908. <fieldset>
  909. <div class="pure-g">
  910. <label class="pure-u-1 pure-u-lg-1-4">Device Time</label>
  911. <input class="pure-u-1 pure-u-lg-3-4" name="nowString" type="text" readonly />
  912. </div>
  913. <div class="pure-g">
  914. <label class="pure-u-1 pure-u-lg-1-4">Device Local Time</label>
  915. <input class="pure-u-1 pure-u-lg-3-4" name="nowLocalString" type="text" readonly />
  916. </div>
  917. <div class="pure-g">
  918. <label class="pure-u-1 pure-u-lg-1-4">NTP Server</label>
  919. <input class="pure-u-1 pure-u-lg-3-4" name="ntpServer" type="text" tabindex="41" />
  920. </div>
  921. <div class="pure-g module module-ntp">
  922. <label class="pure-u-1 pure-u-lg-1-4">Time Zone</label>
  923. <input class="pure-u-1 pure-u-lg-3-4" name="ntpTZ" type="text" tabindex="42" />
  924. <div class="pure-u-0 pure-u-lg-1-4"></div>
  925. <div class="pure-u-1 pure-u-lg-3-4 hint">POSIX TZ variable, defaults to <code>UTC0</code><br/>For the list of possible options, <a rel="noopener" href="https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h">see esp8266/Arduino's TZ.h (use the value inside of F("..."))</a>. For the complete documentation, <a rel="noopener" href="https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html">see libc tzset(3) manual page</a></div>
  926. </div>
  927. </fieldset>
  928. </div>
  929. </div>
  930. </form>
  931. <!-- removeIf(!garland) -->
  932. <form id="form-garland" class="pure-form form-settings">
  933. <div class="panel" id="panel-garland">
  934. <div class="header">
  935. <h1>GARLAND</h1>
  936. <h2>Garland configuration</h2>
  937. </div>
  938. <div class="page">
  939. <div class="pure-g">
  940. <label class="pure-u-1 pure-u-lg-1-4">Enable Garland</label>
  941. <div class="pure-u-1 pure-u-lg-1-4"><input class="checkbox-garland-enable" type="checkbox" name="garlandEnabled" tabindex="30" /></div>
  942. </div>
  943. <div class="pure-g">
  944. <label class="pure-u-1 pure-u-lg-1-4">Brightness</label>
  945. <input class="pure-u-1 pure-u-lg-3-4 slider slider-garland-brightness" type="range" min="12" max="254" step="22" name="garlandBrightness" />
  946. </div>
  947. <div class="pure-g">
  948. <label class="pure-u-1 pure-u-lg-1-4">Speed</label>
  949. <input class="pure-u-1 pure-u-lg-3-4 slider slider-garland-speed" type="range" min="10" max="70" name="garlandSpeed" />
  950. </div>
  951. <button type="button" class="pure-button button-garland-set-default">Set default</button>
  952. </div>
  953. </div>
  954. </form>
  955. <!-- endRemoveIf(!garland) -->
  956. <!-- removeIf(!thermostat) -->
  957. <form id="form-thermostat" class="pure-form form-settings">
  958. <div class="panel" id="panel-thermostat">
  959. <div class="header">
  960. <h1>THERMOSTAT</h1>
  961. <h2>Thermostat configuration</h2>
  962. </div>
  963. <div class="page">
  964. <div class="pure-g">
  965. <label class="pure-u-1 pure-u-lg-1-4">Enable Thermostat</label>
  966. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="thermostatEnabled" tabindex="30" /></div>
  967. </div>
  968. <div class="pure-g">
  969. <label class="pure-u-1 pure-u-lg-1-4">Thermostat Mode</label>
  970. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="thermostatMode" tabindex="30" /></div>
  971. </div>
  972. <div class="pure-g">
  973. <label class="pure-u-1 pure-u-lg-1-4" for="thermostatOperationMode">Operation mode</label>
  974. <input class="pure-u-1 pure-u-lg-1-4" name="thermostatOperationMode" type="text" readonly />
  975. </div>
  976. <fieldset>
  977. <legend>Temperature range</legend>
  978. <div class="pure-g">
  979. <label class="pure-u-1 pure-u-lg-1-4">Max (<span class="tmpUnit"></span>)</label>
  980. <input class="pure-u-1 pure-u-lg-1-4" id="tempRangeMaxInput" name="tempRangeMax" type="number" min="1" max="100" tabindex="32" data="20" onchange="checkTempRangeMax()" />
  981. </div>
  982. <div class="pure-g">
  983. <label class="pure-u-1 pure-u-lg-1-4">Min (<span class="tmpUnit"></span>)</label>
  984. <input class="pure-u-1 pure-u-lg-1-4" id="tempRangeMinInput" name="tempRangeMin" type="number" min="0" max="99" tabindex="31" data="10" onchange="checkTempRangeMin()" />
  985. </div>
  986. </fieldset>
  987. <fieldset>
  988. <legend>Remote sensor</legend>
  989. <div class="pure-g">
  990. <label class="pure-u-1 pure-u-lg-1-4" for="remoteSensorName">Remote sensor name</label>
  991. <input class="pure-u-1 pure-u-lg-1-4" name="remoteSensorName" type="text" />
  992. </div>
  993. <div class="pure-g">
  994. <label class="pure-u-1 pure-u-lg-1-4" for="remoteTmp">Remote temperature (<span class="tmpUnit"></span>)</label>
  995. <input class="pure-u-1 pure-u-lg-1-4" name="remoteTmp" type="text" readonly />
  996. </div>
  997. <div class="pure-g">
  998. <label class="pure-u-1 pure-u-lg-1-4" for="remoteTempMaxWait">Remote temperature waiting (s)</label>
  999. <input class="pure-u-1 pure-u-lg-1-4" name="remoteTempMaxWait" type="number" min="0" max="1800" tabindex="33" data="120" />
  1000. </div>
  1001. </fieldset>
  1002. <fieldset>
  1003. <legend>Operation mode</legend>
  1004. <div class="pure-g">
  1005. <label class="pure-u-1 pure-u-lg-1-4" for="maxOnTime">Max heating time (m)</label>
  1006. <input class="pure-u-1 pure-u-lg-1-4" name="maxOnTime" type="number" min="0" max="180" tabindex="34" data="30" />
  1007. </div>
  1008. <div class="pure-g">
  1009. <label class="pure-u-1 pure-u-lg-1-4" for="minOffTime">Min rest time (m)</label>
  1010. <input class="pure-u-1 pure-u-lg-1-4" name="minOffTime" type="number" min="0" max="60" tabindex="35" data="10" />
  1011. </div>
  1012. </fieldset>
  1013. <fieldset>
  1014. <legend>Autonomous mode</legend>
  1015. <div class="pure-g">
  1016. <label class="pure-u-1 pure-u-lg-1-4" for="aloneOnTime">Heating time (m)</label>
  1017. <input class="pure-u-1 pure-u-lg-1-4" name="aloneOnTime" type="number" min="0" max="180" tabindex="36" data="5" />
  1018. </div>
  1019. <div class="pure-g">
  1020. <label class="pure-u-1 pure-u-lg-1-4" for="aloneOffTime">Rest time (m)</label>
  1021. <input class="pure-u-1 pure-u-lg-1-4" name="aloneOffTime" type="number" min="0" max="180" tabindex="37" data="55" />
  1022. </div>
  1023. </fieldset>
  1024. <fieldset>
  1025. <legend>Time worked</legend>
  1026. <div class="pure-g">
  1027. <label class="pure-u-1 pure-u-lg-1-4" for="burnToday">Today</label>
  1028. <input class="pure-u-1 pure-u-lg-1-4" type="text" name="burnToday" readonly />
  1029. </div>
  1030. <div class="pure-g">
  1031. <label class="pure-u-1 pure-u-lg-1-4" for="burnYesterday">Yesterday</label>
  1032. <input class="pure-u-1 pure-u-lg-1-4" type="text" name="burnYesterday" readonly />
  1033. </div>
  1034. <div class="pure-g">
  1035. <label class="pure-u-1 pure-u-lg-1-4" for="burnThisMonth">Current month</label>
  1036. <input class="pure-u-1 pure-u-lg-1-4" type="text" name="burnThisMonth" readonly />
  1037. </div>
  1038. <div class="pure-g">
  1039. <label class="pure-u-1 pure-u-lg-1-4" for="burnPrevMonth">Previous month</label>
  1040. <input class="pure-u-1 pure-u-lg-1-4" type="text" name="burnPrevMonth" readonly />
  1041. </div>
  1042. <div class="pure-g">
  1043. <label class="pure-u-1 pure-u-lg-1-4" for="burnTotal">Total</label>
  1044. <input class="pure-u-1 pure-u-lg-1-4" type="text" name="burnTotal" readonly />
  1045. </div>
  1046. <div class="pure-g">
  1047. <button type="button" class="pure-button button-thermostat-reset-counters">Reset counters</button>
  1048. </div>
  1049. </fieldset>
  1050. </div>
  1051. </div>
  1052. </form>
  1053. <!-- endRemoveIf(!thermostat) -->
  1054. <form id="form-domoticz" class="pure-form form-settings">
  1055. <div class="panel" id="panel-domoticz">
  1056. <div class="header">
  1057. <h1>DOMOTICZ</h1>
  1058. <h2>
  1059. Configure the connection to your Domoticz server.
  1060. </h2>
  1061. </div>
  1062. <div class="page">
  1063. <fieldset>
  1064. <legend>General</legend>
  1065. <div class="pure-g">
  1066. <label class="pure-u-1 pure-u-lg-1-4">Enable Domoticz</label>
  1067. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="dczEnabled" tabindex="30" /></div>
  1068. </div>
  1069. <div class="pure-g">
  1070. <label class="pure-u-1 pure-u-lg-1-4">Domoticz IN Topic</label>
  1071. <input class="pure-u-1 pure-u-lg-3-4" name="dczTopicIn" type="text" tabindex="31" />
  1072. </div>
  1073. <div class="pure-g">
  1074. <label class="pure-u-1 pure-u-lg-1-4">Domoticz OUT Topic</label>
  1075. <input class="pure-u-1 pure-u-lg-3-4" name="dczTopicOut" type="text" action="reconnect" tabindex="32" />
  1076. </div>
  1077. <legend>Sensors &amp; actuators</legend>
  1078. <div class="pure-g">
  1079. <div class="pure-u-1 hint">Set IDX to 0 to disable notifications from that component.</div>
  1080. </div>
  1081. <div id="dczRelays" class="group-settings" ></div>
  1082. <!-- removeIf(!sensor) -->
  1083. <div id="dczMagnitudes" class="group-settings" ></div>
  1084. <!-- endRemoveIf(!sensor) -->
  1085. </fieldset>
  1086. </div>
  1087. </div>
  1088. </form>
  1089. <form id="form-ha" class="pure-form form-settings">
  1090. <div class="panel" id="panel-ha">
  1091. <div class="header">
  1092. <h1>HOME ASSISTANT</h1>
  1093. <h2>
  1094. Add this device to your Home Assistant.
  1095. </h2>
  1096. </div>
  1097. <div class="page">
  1098. <fieldset>
  1099. <legend>Discover</legend>
  1100. <div class="pure-g">
  1101. <label class="pure-u-1 pure-u-lg-1-4">Discover</label>
  1102. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="haEnabled" tabindex="14" /></div>
  1103. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1104. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1105. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1106. Home Assistant auto-discovery feature. Enable and save to add the device to your HA console.
  1107. </div>
  1108. </div>
  1109. <div class="pure-g">
  1110. <label class="pure-u-1 pure-u-lg-1-4">Prefix</label>
  1111. <input class="pure-u-1 pure-u-lg-1-4" name="haPrefix" type="text" tabindex="15" />
  1112. </div>
  1113. <legend>Configuration</legend>
  1114. <div class="pure-g">
  1115. <label class="pure-u-1 pure-u-lg-1-4">Configuration</label>
  1116. <div class="pure-u-1-4 pure-u-lg-3-4"><button type="button" class="pure-button button-ha-config pure-u-1-3">Show</button></div>
  1117. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1118. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1119. These are the settings you should copy to your Home Assistant "configuration.yaml" file.
  1120. If any of the sections below (switch, light, sensor) already exists, do not duplicate it,
  1121. simply copy the contents of the section below the ones already present.
  1122. </div>
  1123. </div>
  1124. <div class="pure-g">
  1125. <textarea class="pure-u-1 terminal" id="haConfig" name="haConfig" wrap="off" readonly></textarea>
  1126. </div>
  1127. </fieldset>
  1128. </div>
  1129. </div>
  1130. </form>
  1131. <form id="form-thingspeak" class="pure-form form-settings">
  1132. <div class="panel" id="panel-thingspeak">
  1133. <div class="header">
  1134. <h1>THINGSPEAK</h1>
  1135. <h2>
  1136. Send your sensors data to Thingspeak.
  1137. </h2>
  1138. </div>
  1139. <div class="page">
  1140. <fieldset>
  1141. <legend>General</legend>
  1142. <div class="pure-g">
  1143. <label class="pure-u-1 pure-u-lg-1-4">Enable Thingspeak</label>
  1144. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="tspkEnabled" tabindex="30" /></div>
  1145. </div>
  1146. <div class="pure-g">
  1147. <label class="pure-u-1 pure-u-lg-1-4">Clear cache</label>
  1148. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="tspkClear" tabindex="31" /></div>
  1149. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1150. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1151. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1152. With every POST to thinkspeak.com only enqueued fields are sent.
  1153. If you select to clear the cache after every sending this will result in only those fields that have changed will be posted.
  1154. If you want all fields to be sent with every POST do not clear the cache.
  1155. </div>
  1156. </div>
  1157. <div class="pure-g">
  1158. <label class="pure-u-1 pure-u-lg-1-4">Thingspeak address</label>
  1159. <input class="pure-u-1 pure-u-lg-3-4" name="tspkAddress" type="text" tabindex="32" />
  1160. </div>
  1161. <div class="pure-g">
  1162. <label class="pure-u-1 pure-u-lg-1-4">Thingspeak API Key</label>
  1163. <input class="pure-u-1 pure-u-lg-3-4" name="tspkKey" type="text" tabindex="33" />
  1164. </div>
  1165. <legend>Sensors &amp; actuators</legend>
  1166. <div class="pure-g">
  1167. <div class="pure-u-1 hint">Enter the field number to send each data to, 0 disable notifications from that component.</div>
  1168. </div>
  1169. <div id="tspkRelays" class="group-settings" ></div>
  1170. <!-- removeIf(!sensor) -->
  1171. <div id="tspkMagnitudes" class="group-settings" ></div>
  1172. <!-- endRemoveIf(!sensor) -->
  1173. </fieldset>
  1174. </div>
  1175. </div>
  1176. </form>
  1177. <form id="form-idb" class="pure-form form-settings">
  1178. <div class="panel" id="panel-idb">
  1179. <div class="header">
  1180. <h1>INFLUXDB</h1>
  1181. <h2>
  1182. Configure the connection to your InfluxDB server. Leave the host field empty to disable InfluxDB connection.
  1183. </h2>
  1184. </div>
  1185. <div class="page">
  1186. <fieldset>
  1187. <div class="pure-g">
  1188. <label class="pure-u-1 pure-u-lg-1-4">Enable InfluxDB</label>
  1189. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="idbEnabled" tabindex="40" /></div>
  1190. </div>
  1191. <div class="pure-g">
  1192. <label class="pure-u-1 pure-u-lg-1-4">Host</label>
  1193. <input class="pure-u-1 pure-u-lg-3-4" name="idbHost" type="text" tabindex="41" />
  1194. </div>
  1195. <div class="pure-g">
  1196. <label class="pure-u-1 pure-u-lg-1-4">Port</label>
  1197. <input class="pure-u-1 pure-u-lg-3-4" name="idbPort" type="text" tabindex="42" />
  1198. </div>
  1199. <div class="pure-g">
  1200. <label class="pure-u-1 pure-u-lg-1-4">Database</label>
  1201. <input class="pure-u-1 pure-u-lg-3-4" name="idbDatabase" type="text" tabindex="43" />
  1202. </div>
  1203. <div class="pure-g">
  1204. <label class="pure-u-1 pure-u-lg-1-4">Username</label>
  1205. <input class="pure-u-1 pure-u-lg-3-4" name="idbUsername" type="text" tabindex="44" autocomplete="off" />
  1206. </div>
  1207. <div class="pure-g">
  1208. <label class="pure-u-1 pure-u-lg-1-4">Password</label>
  1209. <input class="pure-u-1 pure-u-lg-3-4" name="idbPassword" type="password" tabindex="45" autocomplete="new-password" spellcheck="false" />
  1210. <span class="no-select password-reveal"></span>
  1211. </div>
  1212. </fieldset>
  1213. </div>
  1214. </div>
  1215. </form>
  1216. <form id="form-rpn" class="pure-form form-settings">
  1217. <div class="panel" id="panel-rpn">
  1218. <div class="header">
  1219. <h1>RULES</h1>
  1220. <h2>
  1221. Here you can configure advanced rules based on RPN expressions. Check the <a href="https://github.com/xoseperez/espurna/wiki/RPN-Rules" rel="noopener" target="_blank">wiki page about the RPN Rules module</a> to know how to use them.
  1222. </h2>
  1223. </div>
  1224. <div class="page">
  1225. <fieldset>
  1226. <legend>Configuration</legend>
  1227. <div class="pure-g">
  1228. <label class="pure-u-1 pure-u-lg-1-4">Sticky variables</label>
  1229. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="rpnSticky" tabindex="100" /></div>
  1230. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1231. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1232. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1233. Sticky variables are persistent, once defined the first time they will be always available until next reboot (they do not persist across reboots).
  1234. Non sticky variables are only available during the next rule execution, just after being defined, and then removed. This applies to status, sensor and MQTT variables equally.
  1235. Mind that calling a non-existing variable from a rule will make it silently fail.
  1236. </div>
  1237. </div>
  1238. <div class="pure-g">
  1239. <label class="pure-u-1 pure-u-lg-1-4" for="rpnDelay">Execution delay (ms)</label>
  1240. <input class="pure-u-1 pure-u-lg-1-4" name="rpnDelay" type="number" min="100" tabindex="101" />
  1241. </div>
  1242. <legend>Rules</legend>
  1243. <div id="rpnRules" class="group-settings" data-settings-target="rpnRule" ></div>
  1244. <button type="button" class="pure-button button-add-rpnrule">Add</button>
  1245. <legend>MQTT</legend>
  1246. <div class="pure-g">
  1247. <div class="pure-u-1-2">MQTT Topic</div>
  1248. <div class="pure-u-1-3">Variable Name</div>
  1249. </div>
  1250. <div id="rpnTopics" class="group-settings" data-settings-target="rpnTopic" ></div>
  1251. <button type="button" class="pure-button button-add-rpntopic">Add</button>
  1252. </fieldset>
  1253. </div>
  1254. </div>
  1255. </form>
  1256. <form id="form-dbg" class="pure-form">
  1257. <div class="panel" id="panel-dbg">
  1258. <div class="header">
  1259. <h1>DEBUG LOG</h1>
  1260. <h2>
  1261. Shows debug messages from the device
  1262. </h2>
  1263. </div>
  1264. <div class="page">
  1265. <fieldset>
  1266. <div class="pure-g module module-cmd">
  1267. <div class="pure-u-1 hint">
  1268. Write a command and click send to execute it on the device. The output will be shown in the debug text area below.
  1269. <!-- removeIf(!curtain) -->
  1270. Type "debug" to display MCU serial exchanges. Any other command is sent to MCU serial as is.
  1271. <!-- endRemoveIf(!curtain) -->
  1272. </div>
  1273. <input name="dbgcmd" class="pure-u-3-4" type="text" tabindex="2" />
  1274. <div class="pure-u-1-4 pure-u-lg-1-4"><button type="button" class="pure-button button-dbgcmd pure-u-23-24">Send</button></div>
  1275. </div>
  1276. <div class="pure-g">
  1277. <textarea class="pure-u-1 terminal" id="weblog" name="weblog" wrap="off" readonly></textarea>
  1278. <div class="pure-u-1-4 pure-u-lg-1-4"><button type="button" class="pure-button button-dbg-clear pure-u-23-24">Clear</button></div>
  1279. </div>
  1280. </fieldset>
  1281. </div>
  1282. </div>
  1283. </form>
  1284. <!-- removeIf(!sensor) -->
  1285. <form id="form-sns" class="pure-form form-settings">
  1286. <div class="panel" id="panel-sns">
  1287. <div class="header">
  1288. <h1>SENSOR CONFIGURATION</h1>
  1289. <h2>
  1290. Configure and calibrate your device sensors.
  1291. </h2>
  1292. </div>
  1293. <div class="page">
  1294. <fieldset>
  1295. <legend>General</legend>
  1296. <div class="pure-g">
  1297. <label class="pure-u-1 pure-u-lg-1-4">Read interval</label>
  1298. <select class="pure-u-1 pure-u-lg-1-4" name="snsRead">
  1299. <option value="1">1 second</option>
  1300. <option value="6">6 seconds</option>
  1301. <option value="10">10 seconds</option>
  1302. <option value="15">15 seconds</option>
  1303. <option value="30">30 seconds</option>
  1304. <option value="60">1 minute</option>
  1305. <option value="300">5 minutes</option>
  1306. <option value="600">10 minutes</option>
  1307. <option value="900">15 minutes</option>
  1308. <option value="1800">30 minutes</option>
  1309. <option value="3600">60 minutes</option>
  1310. </select>
  1311. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1312. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1313. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1314. Select the interval between readings. These will be filtered and averaged for the report.
  1315. Please mind some sensors do not have fast refresh intervals. Check the sensor datasheet to know the minimum read interval.
  1316. The default and recommended value is 6 seconds.
  1317. </div>
  1318. </div>
  1319. <div class="pure-g">
  1320. <label class="pure-u-1 pure-u-lg-1-4">Report every</label>
  1321. <div class="pure-u-1 pure-u-lg-1-4"><input name="snsReport" class="pure-u-1" type="number" min="1" step="1" max="60" /></div>
  1322. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1323. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1324. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1325. Select the number of readings to average and report
  1326. </div>
  1327. </div>
  1328. <div class="pure-g module module-pwr">
  1329. <label class="pure-u-1 pure-u-lg-1-4">Save every</label>
  1330. <div class="pure-u-1 pure-u-lg-1-4"><input name="snsSave" class="pure-u-1" type="number" min="0" step="1" max="200" /></div>
  1331. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1332. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1333. <div class="pure-u-1 pure-u-lg-3-4 hint">
  1334. Save aggregated data to EEPROM after these many reports. At the moment this only applies to total energy readings.
  1335. Please mind: saving data to EEPROM too often will wear out the flash memory quickly.
  1336. Set it to 0 to disable this feature (default value).
  1337. </div>
  1338. </div>
  1339. <div class="pure-g module module-pwr">
  1340. <label class="pure-u-1 pure-u-lg-1-4">Power units</label>
  1341. <select name="pwrUnits" tabindex="16" class="pure-u-1 pure-u-lg-1-4">
  1342. <option value="13">Watts (W)</option>
  1343. <option value="14">Kilowatts (kW)</option>
  1344. </select>
  1345. </div>
  1346. <div class="pure-g module module-pwr">
  1347. <label class="pure-u-1 pure-u-lg-1-4">Energy units</label>
  1348. <select name="eneUnits" tabindex="16" class="pure-u-1 pure-u-lg-1-4">
  1349. <option value="15">Joules (J)</option>
  1350. <option value="16">Kilowatts·hour (kWh)</option>
  1351. </select>
  1352. </div>
  1353. <div class="pure-g module module-tmp">
  1354. <label class="pure-u-1 pure-u-lg-1-4">Temperature units</label>
  1355. <select name="tmpUnits" tabindex="16" class="pure-u-1 pure-u-lg-1-4">
  1356. <option value="2">Celsius (&deg;C)</option>
  1357. <option value="3">Fahrenheit (&deg;F)</option>
  1358. <option value="4">Kelvin (K)</option>
  1359. </select>
  1360. </div>
  1361. <div class="pure-g module module-mics">
  1362. <label class="pure-u-1 pure-u-lg-1-4">Calibrate gas sensor</label>
  1363. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="snsResetCalibration" tabindex="55" /></div>
  1364. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1365. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1366. <div class="pure-u-1 pure-u-lg-3-4 hint">Move this switch to ON and press "Save" to reset gas sensor calibration. Check the sensor datasheet for calibration conditions.</div>
  1367. </div>
  1368. <legend class="module module-hlw module-cse module-emon">Energy monitor</legend>
  1369. <div class="pure-g module module-emon">
  1370. <label class="pure-u-1 pure-u-lg-1-4">Voltage</label>
  1371. <input class="pure-u-1 pure-u-lg-3-4" name="pwrVoltage" type="text" tabindex="51" />
  1372. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1373. <div class="pure-u-1 pure-u-lg-3-4 hint">Mains voltage in your system (in V).</div>
  1374. </div>
  1375. <div class="pure-g module module-hlw module-cse">
  1376. <label class="pure-u-1 pure-u-lg-1-4">Expected Current</label>
  1377. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedC" type="text" tabindex="52" placeholder="0" />
  1378. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1379. <div class="pure-u-1 pure-u-lg-3-4 hint">In Amperes (A). If you are using a pure resistive load like a bulb, this will be the ratio between the two previous values, i.e. power / voltage. You can also use a current clamp around one of the power wires to get this value.</div>
  1380. </div>
  1381. <div class="pure-g module module-hlw module-cse">
  1382. <label class="pure-u-1 pure-u-lg-1-4">Expected Voltage</label>
  1383. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedV" type="text" tabindex="53" placeholder="0" />
  1384. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1385. <div class="pure-u-1 pure-u-lg-3-4 hint">In Volts (V). Enter your the nominal AC voltage for your household or facility, or use multimeter to get this value.</div>
  1386. </div>
  1387. <div class="pure-g module module-hlw module-cse module-emon">
  1388. <label class="pure-u-1 pure-u-lg-1-4">Expected Power</label>
  1389. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedP" type="text" tabindex="54" placeholder="0" />
  1390. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1391. <div class="pure-u-1 pure-u-lg-3-4 hint">In Watts (W). Calibrate your sensor connecting a pure resistive load (like a bulb) and enter here its nominal power or use a multimeter.</div>
  1392. </div>
  1393. <div class="pure-g module module-pm">
  1394. <label class="pure-u-1 pure-u-lg-1-4">Energy Ratio</label>
  1395. <input class="pure-u-1 pure-u-lg-3-4" name="pwrRatioE" type="text" tabindex="55" placeholder="0" />
  1396. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1397. <div class="pure-u-1 pure-u-lg-3-4 hint">Energy ratio in pulses/kWh.</div>
  1398. </div>
  1399. <div class="pure-g module module-hlw module-cse module-emon">
  1400. <label class="pure-u-1 pure-u-lg-1-4">Reset calibration</label>
  1401. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="pwrResetCalibration" tabindex="56" /></div>
  1402. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1403. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1404. <div class="pure-u-1 pure-u-lg-3-4 hint">Move this switch to ON and press "Save" to revert to factory calibration values.</div>
  1405. </div>
  1406. <div class="pure-g module module-hlw module-cse module-emon module-pm">
  1407. <label class="pure-u-1 pure-u-lg-1-4">Reset energy</label>
  1408. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="pwrResetE" tabindex="57" /></div>
  1409. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1410. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1411. <div class="pure-u-1 pure-u-lg-3-4 hint">Move this switch to ON and press "Save" to set energy count to 0.</div>
  1412. </div>
  1413. <div class="pure-g module module-magnitude-corrections">
  1414. <legend>Value corrections</legend>
  1415. <div class="pure-u-1 pure-u-lg-3-4 hint more">
  1416. Correction value is added to the measured value which may be inaccurate due to many factors. The value can be negative.
  1417. </div>
  1418. <div class="pure-form pure-form-aligned" id="magnitude-corrections">
  1419. </div>
  1420. </div>
  1421. </fieldset>
  1422. </div>
  1423. </div>
  1424. </form>
  1425. <!-- endRemoveIf(!sensor) -->
  1426. <!-- removeIf(!rfbridge) -->
  1427. <form id="form-rfb" class="pure-form form-settings">
  1428. <div class="panel" id="panel-rfb">
  1429. <div class="header">
  1430. <h1>RADIO FREQUENCY</h1>
  1431. <h2>
  1432. Sonoff 433 RF Bridge &amp; RF Link Configuration<br /><br />
  1433. This page allows you to configure the RF codes for the Sonoff RFBridge 433 and also for a basic RF receiver.<br /><br />
  1434. To learn a new code click <strong>LEARN</strong> (the Sonoff RFBridge will beep) then press a button on the remote, the new code should show up (and the RFBridge will double beep). If the device double beeps but the code does not update it has not been properly learnt. Keep trying.<br /><br />
  1435. Modify or create new codes manually and then click <strong>SAVE</strong> to store them in the device memory. If your controlled device uses the same code to switch ON and OFF, learn the code with the ON button and copy paste it to the OFF input box, then click SAVE on the last one to store the value.<br /><br />
  1436. Delete any code clicking the <strong>FORGET</strong> button.
  1437. <br /><br />You can also specify any RAW code. For reference see <a rel="noopener" target="_blank" href="https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/Commands">possible commands for Sonoff RF Bridge EFM8BB1</a> (original firmware supports codes from <strong>0xA0</strong> to <strong>0xA5</strong>).
  1438. </h2>
  1439. </div>
  1440. <div class="page">
  1441. <fieldset>
  1442. <legend>RF Codes</legend>
  1443. <div id="rfbNodes"></div>
  1444. <legend>Settings</legend>
  1445. <div class="pure-g">
  1446. <label class="pure-u-1 pure-u-lg-1-4">Repeats</label>
  1447. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24" name="rfbRepeat" type="number" min="1" tabindex="0" /></div>
  1448. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1449. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1450. <div class="pure-u-1 pure-u-lg-3-4 hint">Number of times to repeat transmission</div>
  1451. </div>
  1452. <div class="pure-g module module-rfbdirect">
  1453. <legend>GPIO</legend>
  1454. <div class="pure-u-1 pure-u-lg-1 hint">Pins used by the receiver (RX) and transmitter (TX). Set to <strong>NONE</strong> to disable</div>
  1455. <label class="pure-u-1 pure-u-lg-1-4">RX Pin</label>
  1456. <select class="pure-u-1 pure-u-lg-1-4 gpio-select" name="rfbRX"></select>
  1457. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1458. <label class="pure-u-1 pure-u-lg-1-4">TX Pin</label>
  1459. <select class="pure-u-1 pure-u-lg-1-4 gpio-select" name="rfbTX"></select>
  1460. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1461. </div>
  1462. </fieldset>
  1463. </div>
  1464. </div>
  1465. </form>
  1466. <!-- endRemoveIf(!rfbridge) -->
  1467. <!-- removeIf(!lightfox) -->
  1468. <form id="form-lightfox" class="pure-form form-settings">
  1469. <div class="panel" id="panel-lightfox">
  1470. <div class="header">
  1471. <h1>LIGHTFOX RF</h1>
  1472. <h2>
  1473. LightFox RF configuration<br /><br />
  1474. This page allows you to control LightFox RF receiver options.<br /><br />
  1475. To learn a new code click <strong>LEARN</strong>, wait for 3 seconds then press a button on the remote, one of the relays will toggle. If no device relay toggles the code has not been properly learnt. Keep trying.<br /><br />
  1476. Delete all the codes by clicking the <strong>CLEAR</strong> button and wait for 10 seconds.<br /><br />
  1477. You can also specify which RF button controls which relay using controls below.
  1478. </h2>
  1479. </div>
  1480. <div class="page">
  1481. <div class="pure-g">
  1482. <label class="pure-u-1 pure-u-lg-1-4">RF Actions</label>
  1483. <div class="pure-u-1-2 pure-u-lg-3-8"><button type="button" class="pure-button button-lightfox-learn pure-u-23-24">Learn</button></div>
  1484. <div class="pure-u-1-2 pure-u-lg-3-8"><button type="button" class="pure-button button-lightfox-clear pure-u-1">Clear</button></div>
  1485. </div>
  1486. <fieldset id="lightfoxNodes"></fieldset>
  1487. </div>
  1488. </div>
  1489. </form>
  1490. <!-- endRemoveIf(!lightfox) -->
  1491. </div> <!-- content -->
  1492. </div> <!-- layout -->
  1493. <!-- Templates -->
  1494. <div id="magnitudeCorrectionTemplate" class="template">
  1495. <div class="pure-g">
  1496. <label class="pure-u-1 pure-u-lg-1-4"></label>
  1497. <input name="correction" class="pure-u-1 pure-u-lg-1-4" type="number" step="0.1" data="0"></input>
  1498. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1499. <div class="pure-u-0 pure-u-lg-1-4"></div>
  1500. <div class="pure-u-1 pure-u-lg-3-4 hint"></div>
  1501. </div>
  1502. </div>
  1503. <div id="ledConfigTemplate" class="template">
  1504. <div class="pure-form pure-form-aligned">
  1505. <legend class="pure-u-1 pure-u-lg-1-4">LED #<span class="id"></span></legend>
  1506. <div class="pure-control-group">
  1507. <label>GPIO</label>
  1508. <select class="pure-input-2-3 gpio-select" name="ledGPIO" action="reboot"></select>
  1509. </div>
  1510. <div class="pure-control-group">
  1511. <label>Mode</label>
  1512. <select class="pure-input-2-3" name="ledMode">
  1513. <option value="1">WiFi status</option>
  1514. <option value="2">Follow switch #</option>
  1515. <option value="3">Inverse switch #</option>
  1516. <option value="4">Find me</option>
  1517. <option value="5">Find me &amp; WiFi</option>
  1518. <option value="8">Switches status</option>
  1519. <option value="9">Switches &amp; WiFi</option>
  1520. <option value="0">Manual</option>
  1521. <option value="6">Always ON</option>
  1522. <option value="7">Always OFF</option>
  1523. </select>
  1524. </div>
  1525. <div class="pure-control-group">
  1526. <label>Relay ID</label>
  1527. <input class="pure-input-2-3" name="ledRelay" type="number" min="0" data="0"></input>
  1528. </div>
  1529. </div>
  1530. </div>
  1531. <!-- removeIf(!rfbridge) -->
  1532. <div id="rfbNodeTemplate" class="template">
  1533. <legend>Switch #<span></span></legend>
  1534. <div class="pure-g">
  1535. <div class="pure-u-1 pure-u-lg-1-4"><label>Switch ON</label></div>
  1536. <input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-status="1" data-settings-ignore="true" />
  1537. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
  1538. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
  1539. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
  1540. </div>
  1541. <div class="pure-g">
  1542. <div class="pure-u-1 pure-u-lg-1-4"><label>Switch OFF</label></div>
  1543. <input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-status="0" data-settings-ignore="true" />
  1544. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
  1545. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
  1546. <div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
  1547. </div>
  1548. </div>
  1549. <!-- endRemoveIf(!rfbridge) -->
  1550. <!-- removeIf(!lightfox) -->
  1551. <div id="lightfoxNodeTemplate" class="template">
  1552. <div class="pure-g">
  1553. <label class="pure-u-1 pure-u-lg-1-4">Button #<span></span></label>
  1554. <select class="pure-u-1 pure-u-lg-3-4" name="btnRelay" action="reboot"></select>
  1555. </div>
  1556. </div>
  1557. <!-- endRemoveIf(!lightfox) -->
  1558. <div id="networkTemplate" class="template">
  1559. <div class="pure-g">
  1560. <label class="pure-u-1 pure-u-lg-1-4">Network SSID</label>
  1561. <div class="pure-u-5-6 pure-u-lg-2-3"><input name="ssid" type="text" action="reconnect" class="pure-u-23-24" value="" tabindex="0" placeholder="Network SSID" required autocomplete="false" /></div>
  1562. <div class="pure-u-1-6 pure-u-lg-1-12"><button type="button" class="pure-button button-more-network pure-u-1">...</button></div>
  1563. <label class="pure-u-1 pure-u-lg-1-4 more">Password</label>
  1564. <input class="pure-u-1 pure-u-lg-3-4 more" name="pass" type="password" action="reconnect" value="" tabindex="0" autocomplete="new-password" spellcheck="false" />
  1565. <span class="no-select password-reveal more"></span>
  1566. <label class="pure-u-1 pure-u-lg-1-4 more">Static IP</label>
  1567. <input class="pure-u-1 pure-u-lg-3-4 more" name="ip" type="text" action="reconnect" value="" maxlength="15" tabindex="0" autocomplete="false" />
  1568. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  1569. <div class="pure-u-1 pure-u-lg-3-4 hint more">Leave empty for DHCP negotiation</div>
  1570. <label class="pure-u-1 pure-u-lg-1-4 more">Gateway IP</label>
  1571. <input class="pure-u-1 pure-u-lg-3-4 more" name="gw" type="text" action="reconnect" value="" maxlength="15" tabindex="0" autocomplete="false" />
  1572. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  1573. <div class="pure-u-1 pure-u-lg-3-4 hint more">Set when using a static IP</div>
  1574. <label class="pure-u-1 pure-u-lg-1-4 more">Network Mask</label>
  1575. <input class="pure-u-1 pure-u-lg-3-4 more" name="mask" type="text" action="reconnect" value="" maxlength="15" tabindex="0" autocomplete="false" />
  1576. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  1577. <div class="pure-u-1 pure-u-lg-3-4 hint more">Usually 255.255.255.0 for /24 networks</div>
  1578. <label class="pure-u-1 pure-u-lg-1-4 more">DNS IP</label>
  1579. <input class="pure-u-1 pure-u-lg-3-4 more" name="dns" type="text" action="reconnect" value="" maxlength="15" tabindex="0" autocomplete="false" />
  1580. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  1581. <div class="pure-u-1 pure-u-lg-3-4 hint more">Set the Domain Name Server IP to use when using a static IP</div>
  1582. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  1583. <button class="pure-button button-del-network more" type="button">Delete network</button>
  1584. </div>
  1585. </div>
  1586. <div id="scheduleTemplate" class="template">
  1587. <div class="pure-g">
  1588. <label class="pure-u-1 pure-u-lg-1-4">When time is</label>
  1589. <div class="pure-u-1-4 pure-u-lg-1-5">
  1590. <input class="pure-u-2-3" name="schHour" type="number" min="0" step="1" max="23" value="0" />
  1591. <div class="pure-u-1-4 hint center">&nbsp;h</div>
  1592. </div>
  1593. <div class="pure-u-1-4 pure-u-lg-1-5">
  1594. <input class="pure-u-2-3" name="schMinute" type="number" min="0" step="1" max="59" value="0" />
  1595. <div class="pure-u-1-4 hint center">&nbsp;m</div>
  1596. </div>
  1597. <div class="pure-u-0 pure-u-lg-1-3"></div>
  1598. <label class="pure-u-1 pure-u-lg-1-4">Use UTC time</label>
  1599. <div class="pure-u-1 pure-u-lg-3-4"><input type="checkbox" name="schUTC" /></div>
  1600. <div class="pure-u-0 pure-u-lg-1-2"></div>
  1601. <label class="pure-u-1 pure-u-lg-1-4">And weekday is one of</label>
  1602. <div class="pure-u-2-5 pure-u-lg-1-5">
  1603. <input class="pure-u-23-24 pure-u-lg-23-24" name="schWDs" type="text" maxlength="15" tabindex="0" value="1,2,3,4,5,6,7" />
  1604. </div>
  1605. <div class="pure-u-3-5 pure-u-lg-1-2 hint center">&nbsp;1 for Monday, 2 for Tuesday etc., comma separated</div>
  1606. <div id="schActionDiv" class="pure-u-1">
  1607. </div>
  1608. <label class="pure-u-1 pure-u-lg-1-4">Enabled</label>
  1609. <div class="pure-u-1 pure-u-lg-3-4"><input type="checkbox" name="schEnabled" /></div>
  1610. <div class="pure-u-1 pure-u-lg-1-2"></div>
  1611. <button class="pure-button button-del-schedule" type="button">Delete schedule</button>
  1612. </div>
  1613. </div>
  1614. <div id="switchActionTemplate" class="template">
  1615. <label class="pure-u-1 pure-u-lg-1-4">Action</label>
  1616. <div class="pure-u-1 pure-u-lg-1-5">
  1617. <select class="pure-u-1 pure-u-lg-23-24" name="schAction" haschanged="true">
  1618. <option value="0">Turn OFF</option>
  1619. <option value="1">Turn ON</option>
  1620. <option value="2">Toggle</option>
  1621. </select>
  1622. </div>
  1623. <select class="pure-u-1 pure-u-lg-1-5 isrelay" name="schSwitch" ></select>
  1624. <input type="hidden" name="schType" value="1">
  1625. </div>
  1626. <!-- removeIf(!light) -->
  1627. <div id="lightActionTemplate" class="template">
  1628. <label class="pure-u-1 pure-u-lg-1-4">Brightness</label>
  1629. <div class="pure-u-1 pure-u-lg-1-5">
  1630. <input class="pure-u-2-3" name="schAction" type="number" min="0" step="1" max="255" value="0" />
  1631. </div>
  1632. <select class="pure-u-1 pure-u-lg-1-5 islight" name="schSwitch" ></select>
  1633. <input type="hidden" name="schType" value="2">
  1634. </div>
  1635. <!-- endRemoveIf(!light) -->
  1636. <!-- removeIf(!curtain) -->
  1637. <div id="curtainActionTemplate" class="template">
  1638. <label class="pure-u-1 pure-u-lg-1-4">Curtain position (0 = open to 100 = closed)</label>
  1639. <div class="pure-u-1 pure-u-lg-1-5">
  1640. <input class="pure-u-2-3" name="schAction" type="number" min="0" step="1" max="100" value="0" />
  1641. </div>
  1642. <select class="pure-u-1 pure-u-lg-1-5 iscurtain" name="schSwitch" ></select>
  1643. <input type="hidden" name="schType" value="3">
  1644. </div>
  1645. <!-- endRemoveIf(!curtain) -->
  1646. <div id="relayTemplate" class="template">
  1647. <div class="pure-g">
  1648. <label class="pure-u-1 pure-u-lg-1-4"><span class="relay-name"></span></label>
  1649. <div><input name="relay" type="checkbox" on="ON" off="OFF" /></div>
  1650. </div>
  1651. </div>
  1652. <div id="relayConfigTemplate" class="template">
  1653. <legend><span class="name"></span> (<span class="prov"></span>)</legend>
  1654. <div class="pure-g">
  1655. <div class="pure-u-1 pure-u-lg-1-4"><label>Boot mode</label></div>
  1656. <select class="pure-u-1 pure-u-lg-3-4" name="relayBoot">
  1657. <option value="0">Always OFF</option>
  1658. <option value="1">Always ON</option>
  1659. <option value="2">Same as before</option>
  1660. <option value="3">Toggle before</option>
  1661. <option value="4">Locked OFF</option>
  1662. <option value="5">Locked ON</option>
  1663. </select>
  1664. </div>
  1665. <div class="pure-g">
  1666. <div class="pure-u-1 pure-u-lg-1-4"><label>Pulse mode</label></div>
  1667. <select class="pure-u-1 pure-u-lg-3-4" name="relayPulse">
  1668. <option value="0">Don't pulse</option>
  1669. <option value="1">Normally OFF</option>
  1670. <option value="2">Normally ON</option>
  1671. </select>
  1672. </div>
  1673. <div class="pure-g">
  1674. <div class="pure-u-1 pure-u-lg-1-4"><label>Pulse time (s)</label></div>
  1675. <div class="pure-u-1 pure-u-lg-1-4"><input name="relayTime" class="pure-u-1" type="number" min="0" step="0.1" max="3600" /></div>
  1676. </div>
  1677. <div class="pure-g module module-sch">
  1678. <div class="pure-u-1 pure-u-lg-1-4"><label>Restore last schedule</label></div>
  1679. <div><input name="relayLastSch" data-settings-real-name="relayLastSch" type="checkbox" /></div>
  1680. </div>
  1681. <div class="pure-g module module-mqtt">
  1682. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group</label></div>
  1683. <div class="pure-u-1 pure-u-lg-3-4"><input name="mqttGroup" class="pure-u-1" tabindex="0" data="0" action="reconnect" /></div>
  1684. </div>
  1685. <div class="pure-g module module-mqtt">
  1686. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group sync</label></div>
  1687. <select class="pure-u-1 pure-u-lg-3-4" name="mqttGroupSync">
  1688. <option value="0">Same</option>
  1689. <option value="1">Inverse</option>
  1690. <option value="2">Receive Only</option>
  1691. </select>
  1692. </div>
  1693. <div class="pure-g module module-mqtt">
  1694. <div class="pure-u-1 pure-u-lg-1-4"><label>On MQTT disconnect</label></div>
  1695. <select class="pure-u-1 pure-u-lg-3-4" name="relayOnDisc">
  1696. <option value="0">Don't change</option>
  1697. <option value="1">Turn the switch OFF</option>
  1698. <option value="2">Turn the switch ON</option>
  1699. </select>
  1700. </div>
  1701. </div>
  1702. <div id="dczRelayTemplate" class="template">
  1703. <div class="pure-g">
  1704. <label class="pure-u-1 pure-u-lg-1-4">Switch</label>
  1705. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24 dczRelayIdx" name="dczRelayIdx" type="number" min="0" tabindex="0" data="0" /></div>
  1706. </div>
  1707. </div>
  1708. <!-- removeIf(!sensor) -->
  1709. <div id="dczMagnitudeTemplate" class="template">
  1710. <div class="pure-g">
  1711. <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
  1712. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24 center" name="dczMagnitude" type="number" min="0" tabindex="0" data="0" /></div>
  1713. <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
  1714. </div>
  1715. </div>
  1716. <!-- endRemoveIf(!sensor) -->
  1717. <div id="tspkRelayTemplate" class="template">
  1718. <div class="pure-g">
  1719. <label class="pure-u-1 pure-u-lg-1-4">Switch</label>
  1720. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24" name="tspkRelay" type="number" min="0" max="8" tabindex="0" data="0" /></div>
  1721. </div>
  1722. </div>
  1723. <!-- removeIf(!sensor) -->
  1724. <div id="tspkMagnitudeTemplate" class="template">
  1725. <div class="pure-g">
  1726. <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
  1727. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24 center" name="tspkMagnitude" type="number" min="0" max="8" tabindex="0" data="0" /></div>
  1728. <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
  1729. </div>
  1730. </div>
  1731. <!-- endRemoveIf(!sensor) -->
  1732. <!-- removeIf(!light) -->
  1733. <div id="brightnessTemplate" class="template">
  1734. <div class="pure-g">
  1735. <label class="pure-u-1 pure-u-lg-1-4">Brightness</label>
  1736. <input type="range" min="0" max="255" class="slider pure-u-lg-1-4" id="brightness">
  1737. <span class="slider brightness pure-u-lg-1-4"></span>
  1738. </div>
  1739. </div>
  1740. <div id="channelTemplate" class="template">
  1741. <div class="pure-g">
  1742. <label class="pure-u-1 pure-u-lg-1-4">Channel #</label>
  1743. <input type="range" min="0" max="255" class="slider channels pure-u-lg-1-4" data="99">
  1744. <span class="slider pure-u-lg-1-4"></span>
  1745. </div>
  1746. </div>
  1747. <div id="miredsTemplate" class="template">
  1748. <div class="pure-g">
  1749. <label class="pure-u-1 pure-u-lg-1-4">Mireds (Cold &harr; Warm)</label>
  1750. <input type="range" min="153" max="500" class="slider pure-u-lg-1-4" id="mireds">
  1751. <span class="slider mireds pure-u-lg-1-4"></span>
  1752. </div>
  1753. </div>
  1754. <!-- endRemoveIf(!light) -->
  1755. <!-- removeIf(!curtain) -->
  1756. <div id="curtainTemplate" class="template">
  1757. <div class="pure-g">
  1758. <div class="pure-u-1-1 curtain-div">
  1759. <div class="curtain-roller" id="curtainGetPicture"></div>
  1760. </div>
  1761. </div>
  1762. <div class="pure-g">
  1763. <div class="pure-u-1-3 curtain-div"><button type="button" class="pure-button curtain-button button-curtain-close">CLOSE</button></div>
  1764. <div class="pure-u-1-3 curtain-div"><button type="button" class="pure-button curtain-button button-curtain-pause">PAUSE</button></div>
  1765. <div class="pure-u-1-3 curtain-div"><button type="button" class="pure-button curtain-button button-curtain-open">OPEN</button></div>
  1766. </div>
  1767. <div class="pure-g">
  1768. <input type="range" list="tickmarks" min="0" max="100" class="slider pure-u-1-1 reverse-range" id="curtainSet">
  1769. <datalist id="tickmarks">
  1770. <option value="0"></option>
  1771. <option value="50"></option>
  1772. <option value="100"></option>
  1773. </datalist>
  1774. </div>
  1775. </div>
  1776. <!-- endRemoveIf(!curtain) -->
  1777. <!-- removeIf(!sensor) -->
  1778. <div id="magnitudeTemplate" class="template">
  1779. <div class="pure-g">
  1780. <label class="pure-u-1 pure-u-lg-1-4"></label>
  1781. <div class="pure-u-1 pure-u-lg-1-4">
  1782. <input class="pure-u-1 pure-u-lg-23-24 center" type="text" name="magnitude" data="256" readonly />
  1783. </div>
  1784. <div class="pure-u-1 pure-u-lg-1-2 hint center sns-desc"></div>
  1785. <div class="pure-u-1 pure-u-lg-1 hint sns-info">
  1786. </div>
  1787. </div>
  1788. </div>
  1789. <!-- endRemoveIf(!sensor) -->
  1790. <!-- removeIf(!rfm69) -->
  1791. <div id="nodeTemplate" class="template">
  1792. <div class="pure-g">
  1793. <div class="pure-u-md-1-6 pure-u-1-2"><input name="node" type="text" class="pure-u-11-12" value="" size="8" tabindex="0" placeholder="Node ID" autocomplete="false"></div>
  1794. <div class="pure-u-md-1-6 pure-u-1-2"><input name="key" type="text" class="pure-u-11-12" value="" size="8" tabindex="0" placeholder="Key"></div>
  1795. <div class="pure-u-md-1-2 pure-u-3-4"><input name="topic" type="text" class="pure-md-11-12 pure-u-23-24" value="" size="8" tabindex="0" placeholder="MQTT Topic"></div>
  1796. <div class="pure-u-md-1-6 pure-u-1-4"><button type="button" class="pure-button button-del-parent pure-u-5-6 pure-u-md-5-6">Del</button></div>
  1797. </div>
  1798. </div>
  1799. <!-- endRemoveIf(!rfm69) -->
  1800. <div id="rpnRuleTemplate" class="template">
  1801. <div class="pure-g">
  1802. <div class="pure-u-5-6"><input name="rpnRule" type="text" class="pure-u-23-24" value="" tabindex="0" autocomplete="false" /></div>
  1803. <div class="pure-u-1-6"><button type="button" class="pure-button button-del-parent pure-u-1">Del</button></div>
  1804. </div>
  1805. </div>
  1806. <div id="rpnTopicTemplate" class="template">
  1807. <div class="pure-g">
  1808. <div class="pure-u-1-2"><input name="rpnTopic" type="text" class="pure-u-23-24" value="" tabindex="0" autocomplete="false" /></div>
  1809. <div class="pure-u-1-3"><input name="rpnName" type="text" class="pure-u-23-24" value="" tabindex="0" autocomplete="false" /></div>
  1810. <div class="pure-u-1-6"><button type="button" class="pure-button button-del-parent pure-u-1">Del</button></div>
  1811. </div>
  1812. </div>
  1813. <iframe id="downloader"></iframe>
  1814. <input id="uploader" type="file" />
  1815. </body>
  1816. <!-- build:js script.js -->
  1817. <script src="vendor/jquery-3.4.1.slim.min.js"></script>
  1818. <script src="custom.js"></script>
  1819. <!-- removeIf(!light) -->
  1820. <script src="vendor/iro-5.3.1.min.js"></script>
  1821. <!-- endRemoveIf(!light) -->
  1822. <!-- removeIf(!rfm69) -->
  1823. <script src="vendor/datatables-1.10.16.min.js"></script>
  1824. <!-- endRemoveIf(!rfm69) -->
  1825. <!-- endbuild -->
  1826. </html>