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.

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