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.

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