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.

2217 lines
131 KiB

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