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.

1762 lines
105 KiB

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