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.

2126 lines
126 KiB

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