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.

1597 lines
94 KiB

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