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.

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