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.

1219 lines
71 KiB

6 years ago
6 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
8 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
6 years ago
6 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
7 years ago
6 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
7 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>ESPurna 0.0.0</title>
  5. <meta charset="utf-8" />
  6. <!-- shortcut::html/favicon.ico -->
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <!-- build:css style.css -->
  9. <link rel="stylesheet" href="pure-1.0.0.min.css" />
  10. <link rel="stylesheet" href="pure-grids-responsive-1.0.0.min.css" />
  11. <link rel="stylesheet" href="side-menu.css" />
  12. <link rel="stylesheet" href="checkboxes.css" />
  13. <link rel="stylesheet" href="custom.css" />
  14. <link rel="stylesheet" href="jquery.wheelcolorpicker-3.0.3.css" />
  15. <!-- endbuild -->
  16. </head>
  17. <body>
  18. <div id="password" class="webmode">
  19. <div class="content">
  20. <form id="formPassword" class="pure-form" action="/" method="post">
  21. <div class="panel block">
  22. <div class="header">
  23. <h1>SECURITY</h1>
  24. <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>
  25. </div>
  26. <div class="page">
  27. <fieldset>
  28. <div class="pure-g">
  29. <label class="pure-u-1 pure-u-lg-1-4">Admin password</label>
  30. <input name="adminPass" class="pure-u-1 pure-u-lg-3-4" type="password" tabindex="1" autocomplete="false" />
  31. <div class="pure-u-0 pure-u-lg-1-4"></div>
  32. <div class="pure-u-1 pure-u-lg-3-4 hint">
  33. 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 />
  34. 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>
  35. </div>
  36. <div class="pure-g">
  37. <label class="pure-u-1 pure-u-lg-1-4">Repeat password</label>
  38. <input name="adminPass" class="pure-u-1 pure-u-lg-3-4" type="password" tabindex="2" autocomplete="false" />
  39. </div>
  40. <button class="pure-button button-update-password">Update</button>
  41. </fieldset>
  42. </div>
  43. </div>
  44. </form>
  45. </div> <!-- content -->
  46. </div>
  47. <div id="layout" class="webmode">
  48. <a href="#menu" id="menuLink" class="menu-link">
  49. <span></span>
  50. </a>
  51. <div id="menu">
  52. <div class="pure-menu">
  53. <span class="pure-menu-heading">ESPurna 0.0.0</span>
  54. <ul class="pure-menu-list">
  55. <li class="pure-menu-item">
  56. <a href="#" class="pure-menu-link" data="panel-status">STATUS</a>
  57. </li>
  58. <li class="pure-menu-item">
  59. <a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
  60. </li>
  61. <li class="pure-menu-item">
  62. <a href="#" class="pure-menu-link" data="panel-wifi">WIFI</a>
  63. </li>
  64. <li class="pure-menu-item module module-mqtt">
  65. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  66. </li>
  67. <li class="pure-menu-item module module-ntp">
  68. <a href="#" class="pure-menu-link" data="panel-ntp">NTP</a>
  69. </li>
  70. <li class="pure-menu-item module module-relay">
  71. <a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a>
  72. </li>
  73. <li class="pure-menu-item module module-relay">
  74. <a href="#" class="pure-menu-link" data="panel-schedule">SCHEDULE</a>
  75. </li>
  76. <li class="pure-menu-item module module-color">
  77. <a href="#" class="pure-menu-link" data="panel-color">LIGHTS</a>
  78. </li>
  79. <li class="pure-menu-item module module-sensors">
  80. <a href="#" class="pure-menu-link" data="panel-sensors">SENSORS</a>
  81. </li>
  82. <li class="pure-menu-item module module-dcz">
  83. <a href="#" class="pure-menu-link" data="panel-domoticz">DOMOTICZ</a>
  84. </li>
  85. <li class="pure-menu-item module module-idb">
  86. <a href="#" class="pure-menu-link" data="panel-idb">INFLUXDB</a>
  87. </li>
  88. <li class="pure-menu-item module module-tspk">
  89. <a href="#" class="pure-menu-link" data="panel-thingspeak">THINGSPEAK</a>
  90. </li>
  91. <li class="pure-menu-item module module-rfb">
  92. <a href="#" class="pure-menu-link" data="panel-rfb">RFBRIDGE</a>
  93. </li>
  94. <li class="pure-menu-item">
  95. <a href="#" class="pure-menu-link" data="panel-admin">ADMIN</a>
  96. </li>
  97. </ul>
  98. <div class="main-buttons">
  99. <button class="pure-button button-update">Save</button>
  100. <button class="pure-button button-reconnect">Reconnect</button>
  101. <button class="pure-button button-reboot">Reboot</button>
  102. </div>
  103. <div class="footer">
  104. &copy; 2016-2018<br />
  105. Xose Pérez<br/>
  106. <a href="http://tinkerman.cat" target="_blank">http://tinkerman.cat</a><br/>
  107. <a href="https://bitbucket.org/xoseperez/espurna" target="_blank">ESPurna @ Bitbucket</a><br/>
  108. GPLv3 license<br/>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="content">
  113. <div class="panel block" id="panel-status">
  114. <div class="header">
  115. <h1>STATUS</h1>
  116. <h2>Current configuration</h2>
  117. </div>
  118. <div class="page">
  119. <form class="pure-form pure-form-aligned">
  120. <fieldset>
  121. <div id="relays"></div>
  122. <div id="colors"></div>
  123. <div id="channels"></div>
  124. <div id="magnitudes"></div>
  125. <div class="pure-u-1 state">
  126. <div class="pure-u-1-2 pure-u-lg-1-4">Manufacturer</div>
  127. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="manufacturer"></span></div>
  128. <div class="pure-u-1-2 pure-u-lg-1-4">Device</div>
  129. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="device"></span></div>
  130. <div class="pure-u-1-2 pure-u-lg-1-4">Chip ID</div>
  131. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="chipid"></span></div>
  132. <div class="pure-u-1-2 pure-u-lg-1-4">MAC</div>
  133. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="mac"></span></div>
  134. <div class="pure-u-1-2 pure-u-lg-1-4">Network</div>
  135. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="network"></span></div>
  136. <div class="pure-u-1-2 pure-u-lg-1-4">BSSID</div>
  137. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="bssid"></span></div>
  138. <div class="pure-u-1-2 pure-u-lg-1-4">Channel</div>
  139. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="channel"></span></div>
  140. <div class="pure-u-1-2 pure-u-lg-1-4">RSSI</div>
  141. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="rssi"></span> (<span name="distance" post="m"></span>)</div>
  142. <div class="pure-u-1-2 pure-u-lg-1-4">IP</div>
  143. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="deviceip"></span></div>
  144. <div class="pure-u-1-2 pure-u-lg-1-4">Firmware name</div>
  145. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="app_name"></span></div>
  146. <div class="pure-u-1-2 pure-u-lg-1-4">Firmware version</div>
  147. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="app_version"></span></div>
  148. <div class="pure-u-1-2 pure-u-lg-1-4">Firmware build</div>
  149. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="app_build"></span></div>
  150. <div class="pure-u-1-2 pure-u-lg-1-4">Current time</div>
  151. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="time"></span></div>
  152. <div class="pure-u-1-2 pure-u-lg-1-4">Uptime</div>
  153. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="uptime"></span></div>
  154. <div class="pure-u-1-2 pure-u-lg-1-4">Free heap</div>
  155. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="heap" post=" bytes"></span></div>
  156. <div class="pure-u-1-2 pure-u-lg-1-4">Firmware size</div>
  157. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="sketch_size" post=" bytes"></span></div>
  158. <div class="pure-u-1-2 pure-u-lg-1-4">Free space</div>
  159. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="free_size" post=" bytes"></span></div>
  160. <div class="pure-u-1-2 pure-u-lg-1-4">MQTT Status</div>
  161. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="mqttStatus">NOT AVAILABLE</span></div>
  162. <div class="pure-u-1-2 pure-u-lg-1-4">NTP Status</div>
  163. <div class="pure-u-11-24 pure-u-lg-17-24"><span class="right" name="ntpStatus">NOT AVAILABLE</span></div>
  164. </div>
  165. </fieldset>
  166. </form>
  167. </div>
  168. </div>
  169. <form id="formSave" class="pure-form" action="/" method="post" enctype="multipart/form-data">
  170. <div class="panel" id="panel-general">
  171. <div class="header">
  172. <h1>GENERAL</h1>
  173. <h2>General configuration values</h2>
  174. </div>
  175. <div class="page">
  176. <fieldset>
  177. <div class="pure-g">
  178. <label class="pure-u-1 pure-u-lg-1-4">Hostname</label>
  179. <input name="hostname" class="pure-u-1 pure-u-lg-1-4" type="text" action="reboot" tabindex="1" />
  180. <div class="pure-u-0 pure-u-lg-1-2"></div>
  181. <div class="pure-u-0 pure-u-lg-1-4"></div>
  182. <div class="pure-u-1 pure-u-lg-3-4 hint">
  183. This name will identify this device in your network (http://&lt;hostname&gt;.local). For this setting to take effect you should restart the wifi interface clicking the "Reconnect" button.
  184. </div>
  185. </div>
  186. <div class="pure-g">
  187. <label class="pure-u-1 pure-u-lg-1-4">Double click delay</label>
  188. <input name="btnDelay" class="pure-u-1 pure-u-lg-1-4" type="number" action="reboot" min="0" step="100" max="1000" tabindex="6" />
  189. <div class="pure-u-0 pure-u-lg-1-2"></div>
  190. <div class="pure-u-0 pure-u-lg-1-4"></div>
  191. <div class="pure-u-1 pure-u-lg-3-4 hint">
  192. Delay in milliseconds to detect a double click (from 0 to 1000ms).<br />
  193. The lower this number the faster the device will respond to button clicks but the harder it will be to get a double click.
  194. Increase this number if you are having trouble to double click the button.
  195. 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 />
  196. You will have to <strong>reboot the device</strong> after updating for this setting to apply.
  197. </div>
  198. </div>
  199. <div class="pure-g module module-led">
  200. <label class="pure-u-1 pure-u-lg-1-4">LED mode</label>
  201. <select name="ledMode0" class="pure-u-1 pure-u-lg-1-4" tabindex="7">
  202. <option value="1">WiFi status</option>
  203. <option value="0">MQTT managed</option>
  204. <option value="4">Find me</option>
  205. <option value="5">Mixed</option>
  206. <option value="6">Always ON</option>
  207. <option value="7">Always OFF</option>
  208. </select>
  209. <div class="pure-u-0 pure-u-lg-1-2"></div>
  210. <div class="pure-u-0 pure-u-lg-1-4"></div>
  211. <div class="pure-u-1 pure-u-lg-3-4 hint">
  212. This setting defines the behaviour of the main LED in the board.<br />
  213. When in "WiFi status" it will blink at 1Hz when trying to connecting. If successfully connected if will briefly lit every 5 seconds if in STA mode or every second if in AP mode.<br />
  214. 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 />
  215. When in "Find me" mode the LED will be ON when all relays are OFF. This is meant to locate switches at night.<br />
  216. When in "Mixed" mode 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 />
  217. "Always ON" and "Always OFF" modes are self-explanatory.
  218. </div>
  219. </div>
  220. <div class="pure-g module module-alexa">
  221. <div class="pure-u-1 pure-u-lg-1-4"><label>Alexa integration</label></div>
  222. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="alexaEnabled" tabindex="13" /></div>
  223. </div>
  224. <div class="pure-g module module-ha">
  225. <div class="pure-u-1 pure-u-lg-1-4"><label>Home Assistant</label></div>
  226. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="haEnabled" tabindex="14" /></div>
  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. Home Assistant auto-discovery feature. Enable and save to add the device to your HA console.
  231. When using a colour light you might want to disable CSS style so Home Assistant can parse the color.
  232. </div>
  233. </div>
  234. <div class="pure-g module module-ha">
  235. <label class="pure-u-1 pure-u-lg-1-4">Home Assistant Prefix</label>
  236. <input class="pure-u-1 pure-u-lg-1-4" name="haPrefix" type="text" tabindex="15" />
  237. </div>
  238. </fieldset>
  239. </div>
  240. </div>
  241. <div class="panel" id="panel-relay">
  242. <div class="header">
  243. <h1>SWITCHES</h1>
  244. <h2>Switch / relay configuration</h2>
  245. </div>
  246. <div class="page">
  247. <fieldset>
  248. <legend class="module module-multirelay">General</legend>
  249. <div class="pure-g module module-multirelay">
  250. <label class="pure-u-1 pure-u-lg-1-4">Switch sync mode</label>
  251. <select name="relaySync" class="pure-u-1 pure-u-lg-3-4" tabindex="3">
  252. <option value="0">No synchonisation</option>
  253. <option value="1">Zero or one switches active</option>
  254. <option value="2">One and just one switch active</option>
  255. <option value="3">All synchonised</option>
  256. </select>
  257. <div class="pure-u-0 pure-u-lg-1-4"></div>
  258. <div class="pure-u-1 pure-u-lg-3-4 hint">Define how the different switches should be synchronized.</div>
  259. </div>
  260. <div id="relayConfig"></div>
  261. </fieldset>
  262. </div>
  263. </div>
  264. <div class="panel" id="panel-color">
  265. <div class="header">
  266. <h1>LIGHTS</h1>
  267. <h2>Lights configuration</h2>
  268. </div>
  269. <div class="page">
  270. <fieldset>
  271. <div class="pure-g">
  272. <div class="pure-u-1 pure-u-lg-1-4"><label>Use colorpicker</label></div>
  273. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useColor" action="reload" tabindex="8" /></div>
  274. <div class="pure-u-0 pure-u-lg-1-2"></div>
  275. <div class="pure-u-0 pure-u-lg-1-4"></div>
  276. <div class="pure-u-1 pure-u-lg-3-4 hint">Use color picker for the first 3 channels as RGB.<br />Will only work if the device has at least 3 dimmable channels.<br />Reload the page to update the web interface.</div>
  277. </div>
  278. <div class="pure-g">
  279. <div class="pure-u-1 pure-u-lg-1-4"><label>Use RGB picker</label></div>
  280. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useRGB" action="reload" tabindex="11" /></div>
  281. <div class="pure-u-0 pure-u-lg-1-2"></div>
  282. <div class="pure-u-0 pure-u-lg-1-4"></div>
  283. <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>
  284. </div>
  285. <div class="pure-g">
  286. <div class="pure-u-1 pure-u-lg-1-4"><label>Use white channel</label></div>
  287. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useWhite" action="reload" tabindex="9" /></div>
  288. <div class="pure-u-0 pure-u-lg-1-2"></div>
  289. <div class="pure-u-0 pure-u-lg-1-4"></div>
  290. <div class="pure-u-1 pure-u-lg-3-4 hint">Use forth dimmable channel as white when first 3 have the same RGB value.<br />Will only work if the device has at least 4 dimmable channels.<br />Reload the page to update the web interface.</div>
  291. </div>
  292. <div class="pure-g">
  293. <div class="pure-u-1 pure-u-lg-1-4"><label>Use gamma correction</label></div>
  294. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useGamma" tabindex="10" /></div>
  295. <div class="pure-u-0 pure-u-lg-1-2"></div>
  296. <div class="pure-u-0 pure-u-lg-1-4"></div>
  297. <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>
  298. </div>
  299. <div class="pure-g">
  300. <div class="pure-u-1 pure-u-lg-1-4"><label>Use CSS style</label></div>
  301. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useCSS" tabindex="11" /></div>
  302. <div class="pure-u-0 pure-u-lg-1-2"></div>
  303. <div class="pure-u-0 pure-u-lg-1-4"></div>
  304. <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>
  305. </div>
  306. <div class="pure-g">
  307. <div class="pure-u-1 pure-u-lg-1-4"><label>Color transitions</label></div>
  308. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="useTransitions" tabindex="12" /></div>
  309. <div class="pure-u-0 pure-u-lg-1-2"></div>
  310. <div class="pure-u-0 pure-u-lg-1-4"></div>
  311. <div class="pure-u-1 pure-u-lg-3-4 hint">If enabled color changes will be smoothed.</div>
  312. </div>
  313. <div class="pure-g">
  314. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group</label></div>
  315. <div class="pure-u-1 pure-u-lg-3-4"><input name="mqttGroupColor" class="pure-u-1" tabindex="13" action="reconnect" /></div>
  316. <div class="pure-u-0 pure-u-lg-1-4"></div>
  317. <div class="pure-u-1 pure-u-lg-3-4 hint">Sync color between different lights.</div>
  318. </div>
  319. </fieldset>
  320. </div>
  321. </div>
  322. <div class="panel" id="panel-admin">
  323. <div class="header">
  324. <h1>ADMINISTRATION</h1>
  325. <h2>Device administration and security settings</h2>
  326. </div>
  327. <div class="page">
  328. <fieldset>
  329. <div class="pure-g">
  330. <label class="pure-u-1 pure-u-lg-1-4">Admin password</label>
  331. <input name="adminPass" class="pure-u-1 pure-u-lg-3-4" type="password" action="reboot" tabindex="11" autocomplete="false" />
  332. <div class="pure-u-0 pure-u-lg-1-4"></div>
  333. <div class="pure-u-1 pure-u-lg-3-4 hint">
  334. 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 />
  335. 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>
  336. </div>
  337. <div class="pure-g">
  338. <label class="pure-u-1 pure-u-lg-1-4">Repeat password</label>
  339. <input name="adminPass" class="pure-u-1 pure-u-lg-3-4" type="password" action="reboot" tabindex="12" autocomplete="false" />
  340. </div>
  341. <div class="pure-g">
  342. <label class="pure-u-1 pure-u-lg-1-4">HTTP port</label>
  343. <input name="webPort" class="pure-u-1 pure-u-lg-1-4" type="text" action="reboot" tabindex="13" />
  344. <div class="pure-u-0 pure-u-lg-1-2"></div>
  345. <div class="pure-u-0 pure-u-lg-1-4"></div>
  346. <div class="pure-u-1 pure-u-lg-3-4 hint">
  347. This is the port for the web interface and API requests.
  348. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
  349. </div>
  350. </div>
  351. <div class="pure-g">
  352. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable HTTP API</label></div>
  353. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="apiEnabled" /></div>
  354. </div>
  355. <div class="pure-g">
  356. <div class="pure-u-1 pure-u-lg-1-4"><label>Real time API</label></div>
  357. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="apiRealTime" /></div>
  358. <div class="pure-u-0 pure-u-lg-1-2"></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">
  361. By default, some magnitudes are being preprocessed and filtered to avoid spurious values.
  362. If you want to get real-time values (not preprocessed) in the API turn on this setting.
  363. </div>
  364. </div>
  365. <div class="pure-g">
  366. <label class="pure-u-1 pure-u-lg-1-4">HTTP API Key</label>
  367. <input name="apiKey" class="pure-u-3-4 pure-u-lg-1-2" type="text" tabindex="14" />
  368. <div class=" pure-u-1-4 pure-u-lg-1-4"><button class="pure-button button-apikey pure-u-23-24">Auto</button></div>
  369. <div class="pure-u-0 pure-u-lg-1-4"></div>
  370. <div class="pure-u-1 pure-u-lg-3-4 hint">
  371. This is the key you will have to pass with every HTTP request to the API, either to get or write values.
  372. All API calls must contain the <strong>apikey</strong> parameter with the value above.
  373. To know what APIs are enabled do a call to <strong>/apis</strong>.
  374. </div>
  375. </div>
  376. <div class="pure-g module module-telnet">
  377. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable TELNET</label></div>
  378. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="telnetSTA" /></div>
  379. <div class="pure-u-0 pure-u-lg-1-2"></div>
  380. <div class="pure-u-0 pure-u-lg-1-4"></div>
  381. <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>
  382. </div>
  383. <div class="pure-g module module-nofuss">
  384. <div class="pure-u-1 pure-u-lg-1-4"><label>Automatic remote updates (NoFUSS)</label></div>
  385. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="nofussEnabled" /></div>
  386. </div>
  387. <div class="pure-g module module-nofuss">
  388. <label class="pure-u-1 pure-u-lg-1-4">NoFUSS server</label>
  389. <input name="nofussServer" class="pure-u-1 pure-u-lg-3-4" type="text" tabindex="15" />
  390. <div class="pure-u-0 pure-u-lg-1-4"></div>
  391. <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>
  392. </div>
  393. <div class="pure-g">
  394. <label class="pure-u-1 pure-u-lg-1-4">Settings</label>
  395. <div class="pure-u-1-2 pure-u-lg-1-8"><button class="pure-button button-settings-backup pure-u-23-24">Backup</button></div>
  396. <div class="pure-u-1-2 pure-u-lg-1-8"><button class="pure-button button-settings-restore pure-u-23-24">Restore</button></div>
  397. </div>
  398. <div class="pure-g">
  399. <label class="pure-u-1 pure-u-lg-1-4">Upgrade</label>
  400. <input class="pure-u-1-2 pure-u-lg-1-2" name="filename" type="text" readonly />
  401. <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>
  402. <div class=" pure-u-1-4 pure-u-lg-1-8"><button class="pure-button button-upgrade pure-u-23-24">Upgrade</button></div>
  403. <div class="pure-u-0 pure-u-lg-1-4"></div>
  404. <div class="pure-u-1 pure-u-lg-3-4"><progress id="upgrade-progress"></progress></div>
  405. <input name="upgrade" type="file" tabindex="16" />
  406. </div>
  407. </fieldset>
  408. </div>
  409. </div>
  410. <div class="panel" id="panel-wifi">
  411. <div class="header">
  412. <h1>WIFI</h1>
  413. <h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  414. </div>
  415. <div class="page">
  416. <fieldset>
  417. <div id="networks"></div>
  418. <button type="button" class="pure-button button-add-network">Add network</button>
  419. </fieldset>
  420. </div>
  421. </div>
  422. <div class="panel" id="panel-schedule">
  423. <div class="header">
  424. <h1>SCHEDULE</h1>
  425. <h2>Turn switches ON and OFF based on the current time.</h2>
  426. </div>
  427. <div class="page">
  428. <fieldset>
  429. <div id="schedules"></div>
  430. <button type="button" class="pure-button button-add-schedule">Add schedule</button>
  431. </fieldset>
  432. </div>
  433. </div>
  434. <div class="panel" id="panel-mqtt">
  435. <div class="header">
  436. <h1>MQTT</h1>
  437. <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>
  438. </div>
  439. <div class="page">
  440. <fieldset>
  441. <div class="pure-g">
  442. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable MQTT</label></div>
  443. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttEnabled" tabindex="30" /></div>
  444. </div>
  445. <div class="pure-g">
  446. <label class="pure-u-1 pure-u-lg-1-4">MQTT Broker</label>
  447. <input class="pure-u-1 pure-u-lg-1-4" name="mqttServer" type="text" size="20" tabindex="21" placeholder="IP or address of your broker" />
  448. </div>
  449. <div class="pure-g">
  450. <label class="pure-u-1 pure-u-lg-1-4">MQTT Port</label>
  451. <input class="pure-u-1 pure-u-lg-1-4" name="mqttPort" type="text" size="6" tabindex="22" value="1883" />
  452. </div>
  453. <div class="pure-g">
  454. <label class="pure-u-1 pure-u-lg-1-4">MQTT User</label>
  455. <input class="pure-u-1 pure-u-lg-1-4" name="mqttUser" type="text" size="20" tabindex="23" placeholder="Leave blank if no user" autocomplete="false" />
  456. </div>
  457. <div class="pure-g">
  458. <label class="pure-u-1 pure-u-lg-1-4">MQTT Password</label>
  459. <input class="pure-u-1 pure-u-lg-1-4" name="mqttPassword" type="password" size="20" tabindex="24" placeholder="Leave blank if no pass" autocomplete="false" />
  460. </div>
  461. <div class="pure-g">
  462. <label class="pure-u-1 pure-u-lg-1-4">MQTT Client ID</label>
  463. <input class="pure-u-1 pure-u-lg-1-4" name="mqttClientID" type="text" size="20" tabindex="25" />
  464. <div class="pure-u-0 pure-u-lg-1-2"></div>
  465. <div class="pure-u-0 pure-u-lg-1-4"></div>
  466. <div class="pure-u-1 pure-u-lg-3-4 hint">
  467. If left empty the firmware will generate a client ID based on the serial number of the chip.
  468. </div>
  469. </div>
  470. <div class="pure-g">
  471. <label class="pure-u-1 pure-u-lg-1-4">MQTT QoS</label>
  472. <select class="pure-u-1 pure-u-lg-1-4" name="mqttQoS" tabindex="26">
  473. <option value="0">0: At most once</option>
  474. <option value="1">1: At least once</option>
  475. <option value="2">2: Exactly once</option>
  476. </select>
  477. </div>
  478. <div class="pure-g">
  479. <label class="pure-u-1 pure-u-lg-1-4">MQTT Retain</label>
  480. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttRetain" tabindex="27" /></div>
  481. </div>
  482. <div class="pure-g">
  483. <label class="pure-u-1 pure-u-lg-1-4">MQTT Keep Alive</label>
  484. <input class="pure-u-1 pure-u-lg-1-4" type="number" name="mqttKeep" min="10" max="3600" tabindex="28" />
  485. </div>
  486. <div class="pure-g module module-mqttssl">
  487. <label class="pure-u-1 pure-u-lg-1-4">Use secure connection (SSL)</label>
  488. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="mqttUseSSL" tabindex="29" /></div>
  489. </div>
  490. <div class="pure-g module module-mqttssl">
  491. <label class="pure-u-1 pure-u-lg-1-4">SSL Fingerprint</label>
  492. <input class="pure-u-1 pure-u-lg-3-4" name="mqttFP" type="text" size="59" tabindex="30" />
  493. <div class="pure-u-0 pure-u-lg-1-4"></div>
  494. <div class="pure-u-1 pure-u-lg-3-4 hint">
  495. This is the fingerprint for the SSL certificate of the server.<br />
  496. You can get it using <a href="https://www.grc.com/fingerprints.htm" target="_blank">https://www.grc.com/fingerprints.htm</a><br />
  497. or using openssl from a linux box by typing:<br />
  498. <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>
  499. </div>
  500. </div>
  501. <div class="pure-g">
  502. <label class="pure-u-1 pure-u-lg-1-4">MQTT Root Topic</label>
  503. <input class="pure-u-1 pure-u-lg-3-4" name="mqttTopic" type="text" size="20" tabindex="31" />
  504. <div class="pure-u-0 pure-u-lg-1-4"></div>
  505. <div class="pure-u-1 pure-u-lg-3-4 hint">
  506. This is the root topic for this device. A trailing slash will be added if not preset. The {identifier} placeholder will be replaced by the device hostname.<br />
  507. - <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 />
  508. <span class="module module-color">- <strong>&lt;root&gt;/color/set</strong> Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB".<br /></span>
  509. <span class="module module-color">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness using a value from 0 to 255.<br /></span>
  510. <span class="module module-color">- <strong>&lt;root&gt;/channel/#/set</strong> Set the value for a single color channel (from 0 to 255). Replace # with the channel ID (starting from 0 and up to 4 for RGBWC lights).<br /></span>
  511. <span class="module module-color">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br /></span>
  512. - <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 />
  513. - 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>.
  514. </div>
  515. </div>
  516. <div class="pure-g">
  517. <div class="pure-u-1 pure-u-lg-1-4"><label>Use JSON payload</label></div>
  518. <div class="pure-u-1 pure-u-lg-3-4"><input type="checkbox" name="mqttUseJson" tabindex="32" /></div>
  519. <div class="pure-u-1 pure-u-lg-1-4"></div>
  520. <div class="pure-u-1 pure-u-lg-3-4 hint">
  521. All messages (except the device status) will be included in a JSON payload along with the timestamp and hostname
  522. and sent under the <strong>&lt;root&gt;/data</strong> topic.<br />
  523. Messages will be queued and sent after 100ms, so different messages could be merged into a single payload.<br />
  524. Subscribtions will still be done to single topics.
  525. </div>
  526. </div>
  527. </fieldset>
  528. </div>
  529. </div>
  530. <div class="panel" id="panel-ntp">
  531. <div class="header">
  532. <h1>NTP</h1>
  533. <h2>Configure your NTP (Network Time Protocol) servers and local configuration to keep your device time up to the second for your location.</h2>
  534. </div>
  535. <div class="page">
  536. <fieldset>
  537. <div class="pure-g">
  538. <label class="pure-u-1 pure-u-lg-1-4">NTP Server #0</label>
  539. <input class="pure-u-1 pure-u-lg-3-4" name="ntpServer1" type="text" size="20" tabindex="41" />
  540. </div>
  541. <div class="pure-g">
  542. <label class="pure-u-1 pure-u-lg-1-4">NTP Server #1</label>
  543. <input class="pure-u-1 pure-u-lg-3-4" name="ntpServer2" type="text" size="20" tabindex="42" />
  544. </div>
  545. <div class="pure-g">
  546. <label class="pure-u-1 pure-u-lg-1-4">NTP Server #2</label>
  547. <input class="pure-u-1 pure-u-lg-3-4" name="ntpServer3" type="text" size="20" tabindex="43" />
  548. </div>
  549. <div class="pure-g">
  550. <label class="pure-u-1 pure-u-lg-1-4">Time offset</label>
  551. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-1 pure-u-lg-23-24" name="ntpOffset" type="number" min="-11" max="14" tabindex="44" data="0" /></div>
  552. <div class="pure-u-0 pure-u-lg-1-2"></div>
  553. <div class="pure-u-0 pure-u-lg-1-4"></div>
  554. <div class="pure-u-1 pure-u-lg-1-2 hint">Set to 0 for UTC time</div>
  555. </div>
  556. <div class="pure-g">
  557. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable DST</label></div>
  558. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="ntpDST" /></div>
  559. </div>
  560. </fieldset>
  561. </div>
  562. </div>
  563. <div class="panel" id="panel-domoticz">
  564. <div class="header">
  565. <h1>DOMOTICZ</h1>
  566. <h2>
  567. Configure the connection to your Domoticz server.
  568. </h2>
  569. </div>
  570. <div class="page">
  571. <fieldset>
  572. <legend>General</legend>
  573. <div class="pure-g">
  574. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable Domoticz</label></div>
  575. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="dczEnabled" tabindex="30" /></div>
  576. </div>
  577. <div class="pure-g">
  578. <label class="pure-u-1 pure-u-lg-1-4">Domoticz IN Topic</label>
  579. <input class="pure-u-1 pure-u-lg-3-4" name="dczTopicIn" type="text" tabindex="31" />
  580. </div>
  581. <div class="pure-g">
  582. <label class="pure-u-1 pure-u-lg-1-4">Domoticz OUT Topic</label>
  583. <input class="pure-u-1 pure-u-lg-3-4" name="dczTopicOut" type="text" action="reconnect" tabindex="32" />
  584. </div>
  585. <legend>Sensors &amp; actuators</legend>
  586. <div class="pure-g">
  587. <div class="pure-u-1 hint">Set IDX to 0 to disable notifications from that component.</div>
  588. </div>
  589. <div id="dczRelays"></div>
  590. <div id="dczMagnitudes"></div>
  591. </fieldset>
  592. </div>
  593. </div>
  594. <div class="panel" id="panel-thingspeak">
  595. <div class="header">
  596. <h1>THINGSPEAK</h1>
  597. <h2>
  598. Send your sensors data to Thinkgspeak.
  599. </h2>
  600. </div>
  601. <div class="page">
  602. <fieldset>
  603. <legend>General</legend>
  604. <div class="pure-g">
  605. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable Thingspeak</label></div>
  606. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="tspkEnabled" tabindex="30" /></div>
  607. </div>
  608. <div class="pure-g">
  609. <label class="pure-u-1 pure-u-lg-1-4">Thingspeak API Key</label>
  610. <input class="pure-u-1 pure-u-lg-3-4" name="tspkKey" type="text" tabindex="31" />
  611. </div>
  612. <legend>Sensors &amp; actuators</legend>
  613. <div class="pure-g">
  614. <div class="pure-u-1 hint">Enter the field number to send each data to, 0 disable notifications from that component.</div>
  615. </div>
  616. <div id="tspkRelays"></div>
  617. <div id="tspkMagnitudes"></div>
  618. </fieldset>
  619. </div>
  620. </div>
  621. <div class="panel" id="panel-idb">
  622. <div class="header">
  623. <h1>INFLUXDB</h1>
  624. <h2>
  625. Configure the connection to your InfluxDB server. Leave the host field empty to disable InfluxDB connection.
  626. </h2>
  627. </div>
  628. <div class="page">
  629. <fieldset>
  630. <div class="pure-g">
  631. <div class="pure-u-1 pure-u-lg-1-4"><label>Enable InfluxDB</label></div>
  632. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="idbEnabled" tabindex="40" /></div>
  633. </div>
  634. <div class="pure-g">
  635. <label class="pure-u-1 pure-u-lg-1-4">Host</label>
  636. <input class="pure-u-1 pure-u-lg-3-4" name="idbHost" type="text" tabindex="41" />
  637. </div>
  638. <div class="pure-g">
  639. <label class="pure-u-1 pure-u-lg-1-4">Port</label>
  640. <input class="pure-u-1 pure-u-lg-3-4" name="idbPort" type="text" tabindex="42" />
  641. </div>
  642. <div class="pure-g">
  643. <label class="pure-u-1 pure-u-lg-1-4">Database</label>
  644. <input class="pure-u-1 pure-u-lg-3-4" name="idbDatabase" type="text" tabindex="43" />
  645. </div>
  646. <div class="pure-g">
  647. <label class="pure-u-1 pure-u-lg-1-4">Username</label>
  648. <input class="pure-u-1 pure-u-lg-3-4" name="idbUsername" type="text" tabindex="44" autocomplete="false" />
  649. </div>
  650. <div class="pure-g">
  651. <label class="pure-u-1 pure-u-lg-1-4">Password</label>
  652. <input class="pure-u-1 pure-u-lg-3-4" name="idbPassword" type="password" tabindex="45" autocomplete="false" />
  653. </div>
  654. </fieldset>
  655. </div>
  656. </div>
  657. <div class="panel" id="panel-sensors">
  658. <div class="header">
  659. <h1>SENSOR CONFIGURATION</h1>
  660. <h2>
  661. Configure and calibrate your device sensors.
  662. </h2>
  663. </div>
  664. <div class="page">
  665. <fieldset>
  666. <legend>General</legend>
  667. <div class="pure-g">
  668. <label class="pure-u-1 pure-u-lg-1-4">Read interval</label>
  669. <select class="pure-u-1 pure-u-lg-1-4" name="snsRead">
  670. <option value="6">6 seconds</option>
  671. <option value="10">10 seconds</option>
  672. <option value="15">15 seconds</option>
  673. <option value="30">30 seconds</option>
  674. <option value="60">1 minute</option>
  675. <option value="300">5 minutes</option>
  676. </select>
  677. <div class="pure-u-0 pure-u-lg-1-2"></div>
  678. <div class="pure-u-0 pure-u-lg-1-4"></div>
  679. <div class="pure-u-1 pure-u-lg-3-4 hint">
  680. Select the interval between readings. These will be filtered and averaged for the report. The default and recommended value is 6 seconds.
  681. </div>
  682. </div>
  683. <div class="pure-g">
  684. <label class="pure-u-1 pure-u-lg-1-4">Report every</label>
  685. <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>
  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. Select the number of readings to average and report
  690. </div>
  691. </div>
  692. <div class="pure-g module module-temperature">
  693. <label class="pure-u-1 pure-u-lg-1-4">Temperature units</label>
  694. <select name="tmpUnits" tabindex="16" class="pure-u-1 pure-u-lg-1-4">
  695. <option value="0">Celsius (&deg;C)</option>
  696. <option value="1">Fahrenheit (&deg;F)</option>
  697. </select>
  698. </div>
  699. <div class="pure-g module module-temperature">
  700. <label class="pure-u-1 pure-u-lg-1-4">Temperature correction</label>
  701. <input name="tmpCorrection" class="pure-u-1 pure-u-lg-1-4" type="number" action="reboot" min="-100" step="0.1" max="100" tabindex="18" />
  702. <div class="pure-u-0 pure-u-lg-1-2"></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. Temperature correction value is added to the measured value which may be inaccurate due to many factors. The value can be negative.
  706. </div>
  707. </div>
  708. <legend class="module module-hlw module-emon">Energy monitor</legend>
  709. <div class="pure-g module module-emon">
  710. <label class="pure-u-1 pure-u-lg-1-4">Voltage</label>
  711. <input class="pure-u-1 pure-u-lg-3-4" name="pwrVoltage" type="text" size="8" tabindex="51" />
  712. <div class="pure-u-0 pure-u-lg-1-4"></div>
  713. <div class="pure-u-1 pure-u-lg-3-4 hint">Mains voltage in your system (in V).</div>
  714. </div>
  715. <div class="pure-g module module-hlw">
  716. <label class="pure-u-1 pure-u-lg-1-4">Expected Current</label>
  717. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedC" type="text" size="8" tabindex="52" placeholder="0" />
  718. <div class="pure-u-0 pure-u-lg-1-4"></div>
  719. <div class="pure-u-1 pure-u-lg-3-4 hint">In Ampers (A). If you are using a pure resistive load like a bulb this will the ratio between the two previous values, i.e. power / voltage. You can also use a current clamp around one fo the power wires to get this value.</div>
  720. </div>
  721. <div class="pure-g module module-hlw">
  722. <label class="pure-u-1 pure-u-lg-1-4">Expected Voltage</label>
  723. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedV" type="text" size="8" tabindex="53" placeholder="0" />
  724. <div class="pure-u-0 pure-u-lg-1-4"></div>
  725. <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>
  726. </div>
  727. <div class="pure-g module module-hlw module-emon">
  728. <label class="pure-u-1 pure-u-lg-1-4">Expected Power</label>
  729. <input class="pure-u-1 pure-u-lg-3-4 pwrExpected" name="pwrExpectedP" type="text" size="8" tabindex="54" placeholder="0" />
  730. <div class="pure-u-0 pure-u-lg-1-4"></div>
  731. <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>
  732. </div>
  733. <div class="pure-g module module-hlw module-emon">
  734. <div class="pure-u-1 pure-u-lg-1-4"><label>Reset calibration</label></div>
  735. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" name="pwrResetCalibration" tabindex="55" /></div>
  736. <div class="pure-u-0 pure-u-lg-1-2"></div>
  737. <div class="pure-u-0 pure-u-lg-1-4"></div>
  738. <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>
  739. </div>
  740. </fieldset>
  741. </div>
  742. </div>
  743. <div class="panel" id="panel-rfb">
  744. <div class="header">
  745. <h1>RFBRIDGE</h1>
  746. <h2>
  747. Sonoff 433 RF Bridge Configuration<br /><br />
  748. To learn a new code click <strong>LEARN</strong>, the Sonoff RFBridge will beep, then press a button on the remote, the RFBridge will then double beep and the new code should show up. If the device double beeps but the code does not update it has not been properly learnt. Keep trying.<br /><br />
  749. Modify or create new codes manually (all codes must be 18 characters long) 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 />
  750. Delete any code clicking the <strong>FORGET</strong> button.
  751. </h2>
  752. </div>
  753. <div class="page">
  754. <fieldset>
  755. <div id="rfbNodes"></div>
  756. </fieldset>
  757. </div>
  758. </div>
  759. </form>
  760. </div> <!-- content -->
  761. </div> <!-- layout -->
  762. <!-- Templates -->
  763. <div id="rfbNodeTemplate" class="template">
  764. <legend>Switch #<span></span></legend>
  765. <div class="pure-g">
  766. <div class="pure-u-1 pure-u-lg-1-4"><label>Switch ON</label></div>
  767. <input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="18" name="rfbcode" data-id="1" data-status="1" />
  768. <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>
  769. <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>
  770. <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>
  771. </div>
  772. <div class="pure-g">
  773. <div class="pure-u-1 pure-u-lg-1-4"><label>Switch OFF</label></div>
  774. <input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="18" name="rfbcode" data-id="1" data-status="0" />
  775. <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>
  776. <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>
  777. <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>
  778. </div>
  779. </div>
  780. <div id="networkTemplate" class="template">
  781. <div class="pure-g">
  782. <label class="pure-u-1 pure-u-lg-1-4">Network SSID</label>
  783. <div class="pure-u-5-6 pure-u-lg-2-3"><input name="ssid" type="text" action="reconnect" class="pure-u-23-24" value="" size="8" tabindex="0" placeholder="Network SSID" required autocomplete="false" /></div>
  784. <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>
  785. <label class="pure-u-1 pure-u-lg-1-4 more">Password</label>
  786. <input class="pure-u-1 pure-u-lg-3-4 more" name="pass" type="password" action="reconnect" value="" tabindex="0" autocomplete="false" />
  787. <label class="pure-u-1 pure-u-lg-1-4 more">Static IP</label>
  788. <input class="pure-u-1 pure-u-lg-3-4 more" name="ip" type="text" action="reconnect" value="" size="15" tabindex="0" autocomplete="false" />
  789. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  790. <div class="pure-u-1 pure-u-lg-3-4 hint more">Leave empty for DNS negotiation</div>
  791. <label class="pure-u-1 pure-u-lg-1-4 more">Gateway IP</label>
  792. <input class="pure-u-1 pure-u-lg-3-4 more" name="gw" type="text" action="reconnect" value="" size="15" tabindex="0" autocomplete="false" />
  793. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  794. <div class="pure-u-1 pure-u-lg-3-4 hint more">Set when using a static IP</div>
  795. <label class="pure-u-1 pure-u-lg-1-4 more">Network Mask</label>
  796. <input class="pure-u-1 pure-u-lg-3-4 more" name="mask" type="text" action="reconnect" value="255.255.255.0" size="15" tabindex="0" autocomplete="false" />
  797. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  798. <div class="pure-u-1 pure-u-lg-3-4 hint more">Usually 255.255.255.0 for /24 networks</div>
  799. <label class="pure-u-1 pure-u-lg-1-4 more">DNS IP</label>
  800. <input class="pure-u-1 pure-u-lg-3-4 more" name="dns" type="text" action="reconnect" value="8.8.8.8" size="15" tabindex="0" autocomplete="false" />
  801. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  802. <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>
  803. <div class="pure-u-0 pure-u-lg-1-4 more"></div>
  804. <button class="pure-button button-del-network more" type="button">Delete network</button>
  805. </div>
  806. </div>
  807. <div id="scheduleTemplate" class="template">
  808. <div class="pure-g">
  809. <label class="pure-u-1 pure-u-lg-1-4">When time is</label>
  810. <div class="pure-u-1-4 pure-u-lg-1-5">
  811. <input class="pure-u-2-3" name="schHour" type="number" min="0" step="1" max="23" size="20" />
  812. <div class="pure-u-1-4 hint center"> h</div>
  813. </div>
  814. <div class="pure-u-1-4 pure-u-lg-1-5">
  815. <input class="pure-u-2-3" name="schMinute" type="number" min="0" step="1" max="59" />
  816. <div class="pure-u-1-4 hint center"> m</div>
  817. </div>
  818. <div class="pure-u-0 pure-u-lg-1-3"></div>
  819. <label class="pure-u-1 pure-u-lg-1-4">And weekday is one of</label>
  820. <div class="pure-u-2-5 pure-u-lg-1-5">
  821. <input class="pure-u-23-24 pure-u-lg-23-24" name="schWDs" type="text" size="15" tabindex="0" value="1,2,3,4,5,6,7" />
  822. </div>
  823. <div class="pure-u-3-5 pure-u-lg-1-2 hint center">1 for Monday, 2 for Tuesday...</div>
  824. <label class="pure-u-1 pure-u-lg-1-4">Action</label>
  825. <div class="pure-u-1 pure-u-lg-1-5">
  826. <select class="pure-u-1 pure-u-lg-23-24" name="schAction">
  827. <option value="0">Turn OFF</option>
  828. <option value="1">Turn ON</option>
  829. <option value="2">Toggle</option>
  830. </select>
  831. </div>
  832. <select class="pure-u-1 pure-u-lg-1-5 isrelay" name="schSwitch"></select>
  833. <div class="pure-u-0 pure-u-lg-1-5"></div>
  834. <div class="pure-u-0 pure-u-lg-1-4"></div>
  835. <button class="pure-button button-del-schedule" type="button">Delete schedule</button>
  836. </div>
  837. </div>
  838. <div id="relayTemplate" class="template">
  839. <div class="pure-g">
  840. <div class="pure-u-1 pure-u-lg-1-4"><label>Switch #<span class="id"></span></label></div>
  841. <div class="pure-u-1 pure-u-lg-1-4"><input type="checkbox" class="relayStatus pure-u-1 pure-u-lg-1-4" data="0" /></div>
  842. </div>
  843. </div>
  844. <div id="relayConfigTemplate" class="template">
  845. <legend>Switch #<span class="id"></span> (GPIO<span class="gpio"></span>)</legend>
  846. <div class="pure-g">
  847. <div class="pure-u-1 pure-u-lg-1-4"><label>Boot mode</label></div>
  848. <select class="pure-u-1 pure-u-lg-3-4" name="relayBoot">
  849. <option value="0">Always OFF</option>
  850. <option value="1">Always ON</option>
  851. <option value="2">Same as before</option>
  852. <option value="3">Toggle before</option>
  853. </select>
  854. </div>
  855. <div class="pure-g">
  856. <div class="pure-u-1 pure-u-lg-1-4"><label>Pulse mode</label></div>
  857. <select class="pure-u-1 pure-u-lg-3-4" name="relayPulse">
  858. <option value="0">Don't pulse</option>
  859. <option value="1">Normally OFF</option>
  860. <option value="2">Normally ON</option>
  861. </select>
  862. </div>
  863. <div class="pure-g">
  864. <div class="pure-u-1 pure-u-lg-1-4"><label>Pulse time (s)</label></div>
  865. <div class="pure-u-1 pure-u-lg-1-4"><input name="relayTime" class="pure-u-1" type="number" min="0" step="0.1" max="3600" /></div>
  866. </div>
  867. <div class="pure-g module module-mqtt">
  868. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group</label></div>
  869. <div class="pure-u-1 pure-u-lg-3-4"><input name="mqttGroup" class="pure-u-1" tabindex="0" data="0" action="reconnect" /></div>
  870. </div>
  871. <div class="pure-g module module-mqtt">
  872. <div class="pure-u-1 pure-u-lg-1-4"><label>MQTT group sync</label></div>
  873. <select class="pure-u-1 pure-u-lg-3-4" name="mqttGroupInv">
  874. <option value="0">Same</option>
  875. <option value="1">Inverse</option>
  876. </select>
  877. </div>
  878. </div>
  879. <div id="dczRelayTemplate" class="template">
  880. <div class="pure-g">
  881. <label class="pure-u-1 pure-u-lg-1-4">Switch</label>
  882. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-23-24 dczRelayIdx" name="dczRelayIdx" type="number" min="0" tabindex="0" data="0" /></div>
  883. </div>
  884. </div>
  885. <div id="dczMagnitudeTemplate" class="template">
  886. <div class="pure-g">
  887. <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
  888. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-23-24 center" name="dczMagnitude" type="number" min="0" tabindex="0" data="0" /></div>
  889. <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
  890. </div>
  891. </div>
  892. <div id="tspkRelayTemplate" class="template">
  893. <div class="pure-g">
  894. <label class="pure-u-1 pure-u-lg-1-4">Switch</label>
  895. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-23-24" name="tspkRelay" type="number" min="0" max="8" tabindex="0" data="0" /></div>
  896. </div>
  897. </div>
  898. <div id="tspkMagnitudeTemplate" class="template">
  899. <div class="pure-g">
  900. <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
  901. <div class="pure-u-1 pure-u-lg-1-4"><input class="pure-u-23-24 center" name="tspkMagnitude" type="number" min="0" max="8" tabindex="0" data="0" /></div>
  902. <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
  903. </div>
  904. </div>
  905. <div id="colorRGBTemplate" class="template">
  906. <div class="pure-g">
  907. <label class="pure-u-1 pure-u-lg-1-4">Color</label>
  908. <input class="pure-u-1 pure-u-lg-1-4" data-wcp-layout="block" name="color" readonly />
  909. </div>
  910. <div class="pure-g">
  911. <label class="pure-u-1 pure-u-lg-1-4">Brightness</label>
  912. <input type="range" min="0" max="255" class="slider pure-u-lg-1-4" id="brightness">
  913. <span class="slider brightness pure-u-lg-1-4"></span>
  914. </div>
  915. </div>
  916. <div id="colorHSVTemplate" class="template">
  917. <div class="pure-g">
  918. <label class="pure-u-1 pure-u-lg-1-4">Color</label>
  919. <input class="pure-u-1 pure-u-lg-1-4" data-wcp-layout="block" name="color" readonly />
  920. </div>
  921. </div>
  922. <div id="channelTemplate" class="template">
  923. <div class="pure-g">
  924. <label class="pure-u-1 pure-u-lg-1-4">Channel #</label>
  925. <input type="range" min="0" max="255" class="slider channels pure-u-lg-1-4" data="99">
  926. <span class="slider pure-u-lg-1-4"></span>
  927. </div>
  928. </div>
  929. <div id="magnitudeTemplate" class="template">
  930. <div class="pure-g">
  931. <label class="pure-u-1 pure-u-lg-1-4"></label>
  932. <div class="pure-u-1 pure-u-lg-1-4">
  933. <input class="pure-u-1 pure-u-lg-23-24 center" type="text" name="magnitude" data="256" readonly />
  934. </div>
  935. <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
  936. </div>
  937. </div>
  938. <iframe id="downloader"></iframe>
  939. <input id="uploader" type="file" />
  940. </body>
  941. <!-- build:js script.js -->
  942. <script src="jquery-3.2.1.min.js"></script>
  943. <script src="checkboxes.js"></script>
  944. <script src="custom.js"></script>
  945. <script src="jquery.wheelcolorpicker-3.0.3.min.js"></script>
  946. <!-- endbuild -->
  947. </html>