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.

1486 lines
88 KiB

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