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.

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