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.

1066 lines
69 KiB

7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 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="side-menu.css" />
  11. <link rel="stylesheet" href="grids-responsive-1.0.0.min.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. <input class="pure-u-1 pure-u-sm-3-4" type="hidden" name="webMode" value="1" />
  22. <div class="panel" style="display: 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-md-1-4" for="adminPass1">Admin password</label>
  31. <input name="adminPass1" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="1" autocomplete="false" />
  32. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  33. <div class="pure-u-1 pure-u-md-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 should have at least <strong>eight characters</strong> (letters, numbers or the underscore) and at least <strong>one number</strong>, <strong>one lowercase</strong> and <strong>one uppercase</strong> letter.</div>
  36. </div>
  37. <div class="pure-g">
  38. <label class="pure-u-1 pure-u-md-1-4" for="adminPass2">Admin password (repeat)</label>
  39. <input name="adminPass2" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="2" autocomplete="false" />
  40. </div>
  41. <button class="pure-button button-update-password">Update</button>
  42. </fieldset>
  43. </div>
  44. </div>
  45. </form>
  46. </div> <!-- content -->
  47. </div>
  48. <div id="layout" class="webmode">
  49. <a href="#menu" id="menuLink" class="menu-link">
  50. <span></span>
  51. </a>
  52. <div id="menu">
  53. <div class="pure-menu">
  54. <span class="pure-menu-heading">ESPurna 0.0.0</span>
  55. <ul class="pure-menu-list">
  56. <li class="pure-menu-item">
  57. <a href="#" class="pure-menu-link" data="panel-status">STATUS</a>
  58. </li>
  59. <li class="pure-menu-item">
  60. <a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
  61. </li>
  62. <li class="pure-menu-item">
  63. <a href="#" class="pure-menu-link" data="panel-wifi">WIFI</a>
  64. </li>
  65. <li class="pure-menu-item">
  66. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  67. </li>
  68. <li class="pure-menu-item module module-ntp">
  69. <a href="#" class="pure-menu-link" data="panel-ntp">NTP</a>
  70. </li>
  71. <li class="pure-menu-item module module-dcz">
  72. <a href="#" class="pure-menu-link" data="panel-domoticz">DOMOTICZ</a>
  73. </li>
  74. <li class="pure-menu-item module module-idb">
  75. <a href="#" class="pure-menu-link" data="panel-idb">INFLUXDB</a>
  76. </li>
  77. <li class="pure-menu-item module module-hlw module-emon module-v9261f">
  78. <a href="#" class="pure-menu-link" data="panel-power">POWER</a>
  79. </li>
  80. <li class="pure-menu-item module module-rfb">
  81. <a href="#" class="pure-menu-link" data="panel-rfb">RFBRIDGE</a>
  82. </li>
  83. <li class="pure-menu-item">
  84. <a href="#" class="pure-menu-link" data="panel-admin">ADMIN</a>
  85. </li>
  86. </ul>
  87. <div class="main-buttons">
  88. <button class="pure-button button-update">Save</button>
  89. <button class="pure-button button-reconnect">Reconnect</button>
  90. <button class="pure-button button-reset">Reset</button>
  91. </div>
  92. <div class="footer">
  93. &copy; 2016-2017<br />
  94. Xose Pérez<br/>
  95. <a href="http://tinkerman.cat" target="_blank">http://tinkerman.cat</a><br/>
  96. <a href="https://bitbucket.org/xoseperez/espurna" target="_blank">ESPurna @ Bitbucket</a><br/>
  97. GPLv3 license<br/>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="content">
  102. <div class="panel" id="panel-status" style="display: block;">
  103. <div class="header">
  104. <h1>STATUS</h1>
  105. <h2>Current configuration</h2>
  106. </div>
  107. <div class="page">
  108. <form class="pure-form pure-form-aligned">
  109. <fieldset>
  110. <div id="relays">
  111. </div>
  112. <div id="colors">
  113. </div>
  114. <div id="channels">
  115. </div>
  116. <div class="pure-g module module-analog">
  117. <label class="pure-u-1 pure-u-sm-1-4" for="analogValue">Analog</label>
  118. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="analogValue" readonly />
  119. </div>
  120. <div class="pure-g module module-counter">
  121. <label class="pure-u-1 pure-u-sm-1-4" for="counterValue">Counts / last minute</label>
  122. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="counterValue" readonly />
  123. </div>
  124. <div class="pure-g module module-ds">
  125. <label class="pure-u-1 pure-u-sm-1-4" for="dsTmp">Temperature (<span id="tmpUnit"></span>)</label>
  126. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="dsTmp" readonly />
  127. </div>
  128. <div class="pure-g module module-dht">
  129. <label class="pure-u-1 pure-u-sm-1-4" for="dhtTmp">Temperature (<span id="tmpUnit"></span>)</label>
  130. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="dhtTmp" readonly />
  131. </div>
  132. <div class="pure-g module module-dht">
  133. <label class="pure-u-1 pure-u-sm-1-4" for="dhtHum">Humidity (%)</label>
  134. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="dhtHum" readonly />
  135. </div>
  136. <div class="pure-g module module-emon module-hlw module-v9261f module-ech1560">
  137. <label class="pure-u-1 pure-u-sm-1-4" for="pwrCurrent">Current</label>
  138. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrCurrent" post=" A" readonly />
  139. </div>
  140. <div class="pure-g module module-emon module-hlw module-v9261f module-ech1560">
  141. <label class="pure-u-1 pure-u-sm-1-4" for="pwrVoltage">Voltage</label>
  142. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrVoltage" post=" V" readonly />
  143. </div>
  144. <div class="pure-g module module-hlw module-v9261f">
  145. <label class="pure-u-1 pure-u-sm-1-4" for="pwrActive">Active Power</label>
  146. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrActive" post=" W" readonly />
  147. </div>
  148. <div class="pure-g module module-emon module-hlw module-v9261f module-ech1560">
  149. <label class="pure-u-1 pure-u-sm-1-4" for="pwrApparent">Apparent Power</label>
  150. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrApparent" post=" VA" readonly />
  151. </div>
  152. <div class="pure-g module module-hlw module-v9261f">
  153. <label class="pure-u-1 pure-u-sm-1-4" for="pwrReactive">Reactive Power</label>
  154. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrReactive" post=" VAR" readonly />
  155. </div>
  156. <div class="pure-g module module-hlw module-v9261f">
  157. <label class="pure-u-1 pure-u-sm-1-4" for="pwrFactor">Power Factor</label>
  158. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrFactor" post="%" readonly />
  159. </div>
  160. <div class="pure-g module module-emon module-hlw module-v9261f module-ech1560">
  161. <label class="pure-u-1 pure-u-sm-1-4" for="pwrEnergy">Energy</label>
  162. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="pwrEnergy" post=" J (aggregated)" readonly />
  163. </div>
  164. <div class="pure-u-1 state">
  165. <div class="pure-u-1 pure-u-sm-1-4">Manufacturer</div>
  166. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="manufacturer"></span></div>
  167. <div class="pure-u-1 pure-u-sm-1-4">Device</div>
  168. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="device"></span></div>
  169. <div class="pure-u-1 pure-u-sm-1-4">Chip ID</div>
  170. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="chipid"></span></div>
  171. <div class="pure-u-1 pure-u-sm-1-4">MAC</div>
  172. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="mac"></span></div>
  173. <div class="pure-u-1 pure-u-sm-1-4">Network</div>
  174. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="network"></span></div>
  175. <div class="pure-u-1 pure-u-sm-1-4">IP</div>
  176. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="deviceip"></span></div>
  177. <div class="pure-u-1 pure-u-sm-1-4">Firmware name</div>
  178. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_name"></span></div>
  179. <div class="pure-u-1 pure-u-sm-1-4">Firmware version</div>
  180. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_version"></span></div>
  181. <div class="pure-u-1 pure-u-sm-1-4">Firmware build</div>
  182. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_build"></span></div>
  183. <div class="pure-u-1 pure-u-sm-1-4">Current time</div>
  184. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="time"></span></div>
  185. <div class="pure-u-1 pure-u-sm-1-4">Uptime</div>
  186. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="uptime"></span></div>
  187. <div class="pure-u-1 pure-u-sm-1-4">Free heap</div>
  188. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="heap" post=" bytes"></span></div>
  189. <div class="pure-u-1 pure-u-sm-1-4">Firmware size</div>
  190. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="sketch_size" post=" bytes"></span></div>
  191. <div class="pure-u-1 pure-u-sm-1-4">Free space</div>
  192. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="free_size" post=" bytes"></span></div>
  193. <div class="pure-u-1 pure-u-sm-1-4">MQTT Status</div>
  194. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="mqttStatus"></span></div>
  195. <div class="pure-u-1 pure-u-sm-1-4">NTP Status</div>
  196. <div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="ntpStatus"></span></div>
  197. </div>
  198. </fieldset>
  199. </form>
  200. </div>
  201. </div>
  202. <form id="formSave" class="pure-form" action="/" method="post" enctype="multipart/form-data">
  203. <input class="pure-u-1 pure-u-sm-3-4" type="hidden" name="webMode" value="0" />
  204. <div class="panel" id="panel-general">
  205. <div class="header">
  206. <h1>GENERAL</h1>
  207. <h2>General configuration values</h2>
  208. </div>
  209. <div class="page">
  210. <fieldset>
  211. <div class="pure-g">
  212. <label class="pure-u-1 pure-u-md-1-4" for="hostname">Hostname</label>
  213. <input name="hostname" class="pure-u-1 pure-u-md-3-4" type="text" action="reset" tabindex="1" />
  214. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  215. <div class="pure-u-1 pure-u-md-3-4 hint">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.</div>
  216. </div>
  217. <div class="pure-g">
  218. <label class="pure-u-1 pure-u-md-1-4" for="relayMode">Switch boot mode</label>
  219. <div class="pure-u-1 pure-u-md-3-4">
  220. <select name="relayMode" class="pure-u-3-4" tabindex="2">
  221. <option value="0">Always OFF</a>
  222. <option value="1">Always ON</a>
  223. <option value="2">Same as before</a>
  224. <option value="3">Toogle before</a>
  225. </select>
  226. </div>
  227. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  228. <div class="pure-u-1 pure-u-md-3-4 hint">Here you can define what will be the status of the switch after a reboot.</div>
  229. </div>
  230. <div class="pure-g module module-multirelay">
  231. <label class="pure-u-1 pure-u-md-1-4" for="relaySync">Switch sync mode</label>
  232. <div class="pure-u-1 pure-u-md-3-4">
  233. <select name="relaySync" class="pure-u-3-4" tabindex="3">
  234. <option value="0">No synchonisation</a>
  235. <option value="1">Zero or one switches active</a>
  236. <option value="2">One and just one switch active</a>
  237. <option value="3">All synchonised</a>
  238. </select>
  239. </div>
  240. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  241. <div class="pure-u-1 pure-u-md-3-4 hint">Define how the different switches should be synchronized.</div>
  242. </div>
  243. <div class="pure-g">
  244. <label class="pure-u-1 pure-u-md-1-4" for="relayPulseMode">Switch pulse mode</label>
  245. <div class="pure-u-1 pure-u-md-3-4">
  246. <select name="relayPulseMode" class="pure-u-3-4" tabindex="4">
  247. <option value="0">Don't pulse</a>
  248. <option value="1">Normally OFF (stays on for a short time)</a>
  249. <option value="2">Normally ON (stays off for a short time)</a>
  250. </select>
  251. </div>
  252. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  253. <div class="pure-u-1 pure-u-md-3-4 hint">When pulse mode is enabled the switch will automatically switch back to its normal state after the pulse time (below).</div>
  254. </div>
  255. <div class="pure-g">
  256. <label class="pure-u-1 pure-u-md-1-4" for="relayPulseTime">Switch pulse time</label>
  257. <input name="relayPulseTime" class="pure-u-1 pure-u-md-3-4" type="number" min="0" step="0.1" max="60" tabindex="5" />
  258. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  259. <div class="pure-u-1 pure-u-md-3-4 hint">Pulse time in seconds (maximum value is 60s, accepts decimals).</div>
  260. </div>
  261. <div class="pure-g">
  262. <label class="pure-u-1 pure-u-md-1-4" for="btnDelay">Double click delay</label>
  263. <input name="btnDelay" class="pure-u-1 pure-u-md-3-4" type="number" action="reset" min="0" step="100" max="1000" tabindex="6" />
  264. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  265. <div class="pure-u-1 pure-u-md-3-4 hint">Delay in milliseconds to detect a double click (from 0 to 1000ms).<br />
  266. The lower this number the faster the device will respond to button clicks but the harder it will be to get a double click.
  267. Increase this number if you are having trouble to double click the button.
  268. 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 />
  269. You will have to <strong>reset the device</strong> after updating for this setting to apply.
  270. </div>
  271. </div>
  272. <div class="pure-g module module-color">
  273. <div class="pure-u-1 pure-u-sm-1-4"><label for="useColor">Use colorpicker</label></div>
  274. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="useColor" action="reload" tabindex="8" /></div>
  275. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  276. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  277. <div class="pure-u-1 pure-u-md-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>
  278. </div>
  279. <div class="pure-g module module-color">
  280. <div class="pure-u-1 pure-u-sm-1-4"><label for="useRGB">Use RGB picker</label></div>
  281. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="useRGB" action="reload" tabindex="11" /></div>
  282. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  283. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  284. <div class="pure-u-1 pure-u-md-3-4 hint">Use RGB color picker if enabled (plus brightness), otherwise use HSV (hue-saturation-value) style</div>
  285. </div>
  286. <div class="pure-g module module-color">
  287. <div class="pure-u-1 pure-u-sm-1-4"><label for="useWhite">Use white channel</label></div>
  288. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="useWhite" action="reload" tabindex="9" /></div>
  289. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  290. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  291. <div class="pure-u-1 pure-u-md-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>
  292. </div>
  293. <div class="pure-g module module-color">
  294. <div class="pure-u-1 pure-u-sm-1-4"><label for="useGamma">Use gamma correction</label></div>
  295. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="useGamma" tabindex="10" /></div>
  296. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  297. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  298. <div class="pure-u-1 pure-u-md-3-4 hint">Use gamma correction for RGB channels.<br />Will only work if "use colorpicker" above is also ON.</div>
  299. </div>
  300. <div class="pure-g module module-color">
  301. <div class="pure-u-1 pure-u-sm-1-4"><label for="useCSS">Use CSS style</label></div>
  302. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="useCSS" tabindex="11" /></div>
  303. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  304. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  305. <div class="pure-u-1 pure-u-md-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>
  306. </div>
  307. <div class="pure-g module module-alexa">
  308. <div class="pure-u-1 pure-u-sm-1-4"><label for="alexaEnabled">Alexa integration</label></div>
  309. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="alexaEnabled" tabindex="12" /></div>
  310. </div>
  311. <div class="pure-g module module-ha">
  312. <div class="pure-u-1 pure-u-sm-1-4"><label for="haEnabled">Home Assistant</label></div>
  313. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="haEnabled" tabindex="13" /></div>
  314. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  315. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  316. <div class="pure-u-1 pure-u-md-3-4 hint">
  317. Home Assistant auto-discovery feature. Enable and save to add the device to your HA console.
  318. When using a colour light you might want to disable CSS style so Home Assistant can parse the color.
  319. </div>
  320. </div>
  321. <div class="pure-g module module-ha">
  322. <label class="pure-u-1 pure-u-md-1-4" for="haPrefix">Home Assistant Prefix</label>
  323. <input class="pure-u-1 pure-u-md-1-4" name="haPrefix" type="text" tabindex="14" />
  324. </div>
  325. <div class="pure-g module module-ds module-dht">
  326. <label class="pure-u-1 pure-u-sm-1-4" for="tmpUnits">Temperature units</label>
  327. <div class="pure-u-1 pure-u-sm-1-4"><input type="radio" name="tmpUnits" tabindex="15" value="0"> Celsius (&deg;C)</input></div>
  328. <div class="pure-u-1 pure-u-sm-1-4"><input type="radio" name="tmpUnits" tabindex="16" value="1"> Fahrenheit (&deg;F)</input></div>
  329. </div>
  330. <div class="pure-g module module-ds module-dht">
  331. <label class="pure-u-1 pure-u-md-1-4" for="tmpCorrection">Temperature correction</label>
  332. <input name="tmpCorrection" class="pure-u-1 pure-u-md-1-4" type="number" action="reset" min="-100" step="0.1" max="100" tabindex="17" />
  333. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  334. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  335. <div class="pure-u-1 pure-u-md-3-4 hint">
  336. Temperature correction value is added to the measured value which may be inaccurate due to many factors. The value can be negative.
  337. </div>
  338. </div>
  339. </fieldset>
  340. </div>
  341. </div>
  342. <div class="panel" id="panel-admin">
  343. <div class="header">
  344. <h1>ADMINISTRATION</h1>
  345. <h2>Device administration and security settings</h2>
  346. </div>
  347. <div class="page">
  348. <fieldset>
  349. <div class="pure-g">
  350. <label class="pure-u-1 pure-u-md-1-4" for="adminPass1">Admin password</label>
  351. <input name="adminPass1" class="pure-u-1 pure-u-md-3-4" type="password" action="reset" tabindex="11" autocomplete="false" />
  352. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  353. <div class="pure-u-1 pure-u-md-3-4 hint">
  354. 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 />
  355. It should have at least <strong>eight characters</strong> (letters, numbers or the underscore) and at least <strong>one number</strong>, <strong>one lowercase</strong> and <strong>one uppercase</strong> letter.</div>
  356. </div>
  357. <div class="pure-g">
  358. <label class="pure-u-1 pure-u-md-1-4" for="adminPass2">Repeat password</label>
  359. <input name="adminPass2" class="pure-u-1 pure-u-md-3-4" type="password" action="reset" tabindex="12" autocomplete="false" />
  360. </div>
  361. <div class="pure-g">
  362. <label class="pure-u-1 pure-u-md-1-4" for="webPort">HTTP port</label>
  363. <input name="webPort" class="pure-u-1 pure-u-md-3-4" type="text" action="reset" tabindex="13" />
  364. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  365. <div class="pure-u-1 pure-u-md-3-4 hint">
  366. This is the port for the web interface and API requests.<br />
  367. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
  368. </div>
  369. </div>
  370. <div class="pure-g">
  371. <div class="pure-u-1 pure-u-sm-1-4"><label for="apiEnabled">Enable HTTP API</label></div>
  372. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="apiEnabled" /></div>
  373. </div>
  374. <div class="pure-g">
  375. <div class="pure-u-1 pure-u-sm-1-4"><label for="apiRealTime">Real time API</label></div>
  376. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="apiRealTime" /></div>
  377. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  378. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  379. <div class="pure-u-1 pure-u-md-3-4 hint">
  380. By default, some magnitudes are being preprocessed and filtered to avoid spurious values.<br />
  381. If you want to get real-time values (not preprocessed) in the API turn on this setting.
  382. </div>
  383. </div>
  384. <div class="pure-g">
  385. <label class="pure-u-1 pure-u-md-1-4" for="apiKey">HTTP API Key</label>
  386. <input name="apiKey" class="pure-u-3-4 pure-u-md-1-2" type="text" tabindex="14" />
  387. <div class=" pure-u-1-4 pure-u-md-1-4"><button class="pure-button button-apikey pure-u-23-24">Generate</button></div>
  388. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  389. <div class="pure-u-1 pure-u-md-3-4 hint">
  390. This is the key you will have to pass with every HTTP request to the API, either to get or write values.<br />
  391. All API calls must contain the <strong>apikey</strong> parameter with the value above.<br />
  392. To know what APIs are enabled do a call to <strong>/apis</strong>.
  393. </div>
  394. </div>
  395. <div class="pure-g module module-telnet">
  396. <div class="pure-u-1 pure-u-sm-1-4"><label for="telnetSTA">Enable TELNET</label></div>
  397. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="telnetSTA" /></div>
  398. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  399. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  400. <div class="pure-u-1 pure-u-md-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>
  401. </div>
  402. <div class="pure-g module module-nofuss">
  403. <div class="pure-u-1 pure-u-sm-1-4"><label for="nofussEnabled">Automatic remote updates (NoFUSS)</label></div>
  404. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="nofussEnabled" /></div>
  405. </div>
  406. <div class="pure-g module module-nofuss">
  407. <label class="pure-u-1 pure-u-md-1-4" for="nofussServer">NoFUSS server</label>
  408. <input name="nofussServer" class="pure-u-1 pure-u-md-3-4" type="text" tabindex="15" />
  409. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  410. <div class="pure-u-1 pure-u-md-3-4 hint">This name address of the NoFUSS server for automatic remote updates (see https://bitbucket.org/xoseperez/nofuss).</div>
  411. </div>
  412. <div class="pure-g">
  413. <label class="pure-u-1 pure-u-sm-1-4">Settings</label>
  414. <div class="pure-u-1 pure-u-sm-1-8"><button class="pure-button button-settings-backup pure-u-23-24">Backup</button></div>
  415. <div class="pure-u-1 pure-u-sm-1-8"><button class="pure-button button-settings-restore pure-u-23-24">Restore</button></div>
  416. </div>
  417. <div class="pure-g">
  418. <label class="pure-u-1 pure-u-md-1-4">Upgrade</label>
  419. <input class="pure-u-1-2 pure-u-md-1-2" name="filename" type="text" readonly />
  420. <div class=" pure-u-1-8 pure-u-md-1-8"><button class="pure-button button-upgrade-browse pure-u-23-24">Browse</button></div>
  421. <div class=" pure-u-1-8 pure-u-md-1-8"><button class="pure-button button-upgrade pure-u-23-24">Upgrade</button></div>
  422. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  423. <div class="pure-u-1 pure-u-md-3-4"><progress id="upgrade-progress"></progress></div>
  424. <input name="upgrade" type="file" tabindex="16" />
  425. </div>
  426. </fieldset>
  427. </div>
  428. </div>
  429. <div class="panel" id="panel-wifi">
  430. <div class="header">
  431. <h1>WIFI</h1>
  432. <h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  433. </div>
  434. <div class="page">
  435. <fieldset>
  436. <div id="networks">
  437. </div>
  438. <button type="button" class="pure-button button-add-network">Add network</button>
  439. </fieldset>
  440. </div>
  441. </div>
  442. <div class="panel" id="panel-mqtt">
  443. <div class="header">
  444. <h1>MQTT</h1>
  445. <h2>Configure an <strong>MQTT broker</strong> in your network and you will be able to change the switch status via an MQTT message. Leave the server field empty to disable MQTT.</h2>
  446. </div>
  447. <div class="page">
  448. <fieldset>
  449. <div class="pure-g">
  450. <div class="pure-u-1 pure-u-sm-1-4"><label for="mqttEnabled">Enable MQTT</label></div>
  451. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="mqttEnabled" tabindex="30" /></div>
  452. </div>
  453. <div class="pure-g">
  454. <label class="pure-u-1 pure-u-md-1-4" for="mqttServer">MQTT Broker</label>
  455. <input class="pure-u-1 pure-u-md-3-4" name="mqttServer" type="text" size="20" tabindex="21" placeholder="IP or address of your broker" />
  456. </div>
  457. <div class="pure-g">
  458. <label class="pure-u-1 pure-u-md-1-4" for="mqttPort">MQTT Port</label>
  459. <input class="pure-u-1 pure-u-md-3-4" name="mqttPort" type="text" size="6" tabindex="22" value="1883" />
  460. </div>
  461. <div class="pure-g">
  462. <label class="pure-u-1 pure-u-md-1-4" for="mqttUser">MQTT User</label>
  463. <input class="pure-u-1 pure-u-md-3-4" name="mqttUser" type="text" size="20" tabindex="23" placeholder="Leave blank if no user/pass" autocomplete="false" />
  464. </div>
  465. <div class="pure-g">
  466. <label class="pure-u-1 pure-u-md-1-4" for="mqttPassword">MQTT Password</label>
  467. <input class="pure-u-1 pure-u-md-3-4" name="mqttPassword" type="password" size="20" tabindex="24" placeholder="Leave blank if no user/pass" autocomplete="false" />
  468. </div>
  469. <div class="pure-g module module-mqttssl">
  470. <div class="pure-u-1 pure-u-sm-1-4"><label for="mqttUseSSL">Use secure connection (SSL)</label></div>
  471. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="mqttUseSSL" tabindex="25" /></div>
  472. </div>
  473. <div class="pure-g module module-mqttssl">
  474. <label class="pure-u-1 pure-u-md-1-4" for="mqttFP">SSL Fingerprint</label>
  475. <input class="pure-u-1 pure-u-md-3-4" name="mqttFP" type="text" size="59" tabindex="26" />
  476. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  477. <div class="pure-u-1 pure-u-md-3-4 hint">
  478. This is the fingerprint for the SSL certificate of the server.<br />
  479. You can get it using <a href="https://www.grc.com/fingerprints.htm" target="_blank">https://www.grc.com/fingerprints.htm</a><br />
  480. or using openssl from a linux box by typing:<br />
  481. <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>
  482. </div>
  483. </div>
  484. <div class="pure-g">
  485. <label class="pure-u-1 pure-u-md-1-4" for="mqttTopic">MQTT Root Topic</label>
  486. <input class="pure-u-1 pure-u-md-3-4" name="mqttTopic" type="text" size="20" tabindex="27" />
  487. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  488. <div class="pure-u-1 pure-u-md-3-4 hint">
  489. 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 />
  490. - <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 />
  491. <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>
  492. <span class="module module-color">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness using a value from 0 to 255.<br /></span>
  493. <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>
  494. <span class="module module-color">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br /></span>
  495. - <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 />
  496. - 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>.
  497. </div>
  498. </div>
  499. <div class="pure-g">
  500. <div class="pure-u-1 pure-u-sm-1-4"><label for="mqttUseJson">Use JSON payload</label></div>
  501. <div class="pure-u-1 pure-u-sm-3-4"><input type="checkbox" name="mqttUseJson" tabindex="26" /></div>
  502. <div class="pure-u-1 pure-u-md-1-4">&nbsp;</div>
  503. <div class="pure-u-1 pure-u-md-3-4 hint">
  504. All messages (except the device status) will be included in a JSON payload along with the timestamp and hostname
  505. and sent under the <strong>&lt;root&gt;/data</strong> topic.<br />
  506. Messages will be queued and sent after 100ms, so different messages could be merged into a single payload.<br />
  507. Subscribtions will still be done to single topics.
  508. </div>
  509. </div>
  510. </fieldset>
  511. </div>
  512. </div>
  513. <div class="panel" id="panel-ntp">
  514. <div class="header">
  515. <h1>NTP</h1>
  516. <h2>Configure your NTP (Network Time Protocol) servers and local configuration to keep your device time up to the second for your location.</h2>
  517. </div>
  518. <div class="page">
  519. <fieldset>
  520. <div class="pure-g">
  521. <label class="pure-u-1 pure-u-md-1-4" for="ntpServer1">NTP Server 1</label>
  522. <input class="pure-u-1 pure-u-md-3-4" name="ntpServer1" type="text" size="20" tabindex="41" />
  523. </div>
  524. <div class="pure-g">
  525. <label class="pure-u-1 pure-u-md-1-4" for="ntpServer2">NTP Server 2</label>
  526. <input class="pure-u-1 pure-u-md-3-4" name="ntpServer2" type="text" size="20" tabindex="42" />
  527. </div>
  528. <div class="pure-g">
  529. <label class="pure-u-1 pure-u-md-1-4" for="ntpServer3">NTP Server 3</label>
  530. <input class="pure-u-1 pure-u-md-3-4" name="ntpServer3" type="text" size="20" tabindex="43" />
  531. </div>
  532. <div class="pure-g">
  533. <label class="pure-u-1 pure-u-sm-1-4" for="ntpOffset">Time offset</label>
  534. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="ntpOffset" type="number" min="-11" max="14" tabindex="44" data="0" /></div>
  535. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 for UTC time</div>
  536. </div>
  537. <div class="pure-g">
  538. <div class="pure-u-1 pure-u-sm-1-4"><label for="ntpDST">Enable Daylight Saving Time</label></div>
  539. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="ntpDST" /></div>
  540. </div>
  541. </fieldset>
  542. </div>
  543. </div>
  544. <div class="panel" id="panel-domoticz">
  545. <div class="header">
  546. <h1>DOMOTICZ</h1>
  547. <h2>
  548. Configure the connection to your Domoticz server.
  549. </h2>
  550. </div>
  551. <div class="page">
  552. <fieldset>
  553. <div class="pure-g">
  554. <div class="pure-u-1 pure-u-sm-1-4"><label for="dczEnabled">Enable Domoticz</label></div>
  555. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="dczEnabled" tabindex="30" /></div>
  556. </div>
  557. <div class="pure-g">
  558. <label class="pure-u-1 pure-u-sm-1-4" for="dczSkip">Anti-recursion time</label>
  559. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczSkip" type="number" min="0" max="10" tabindex="31" /></div>
  560. <div class="pure-u-1 pure-u-sm-5-8 hint center">Skips in/out messages from the same IDX within this time in seconds</div>
  561. </div>
  562. <div class="pure-g">
  563. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicIn">Domoticz IN Topic</label>
  564. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicIn" type="text" tabindex="31" />
  565. </div>
  566. <div class="pure-g">
  567. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicOut">Domoticz OUT Topic</label>
  568. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicOut" type="text" action="reconnect" tabindex="32" />
  569. </div>
  570. <div class="pure-g module module-dht module-ds">
  571. <label class="pure-u-1 pure-u-sm-1-4" for="dczTmpIdx">Temperature IDX</label>
  572. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczTmpIdx" type="number" min="0" tabindex="33" data="0" /></div>
  573. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  574. </div>
  575. <div class="pure-g module module-dht">
  576. <label class="pure-u-1 pure-u-sm-1-4" for="dczHumIdx">Humidity IDX</label>
  577. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczHumIdx" type="number" min="0" tabindex="34" data="0" /></div>
  578. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  579. </div>
  580. <div class="pure-g module module-pwr">
  581. <label class="pure-u-1 pure-u-sm-1-4" for="dczPowIdx">Power IDX</label>
  582. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczPowIdx" type="number" min="0" tabindex="35" data="0" /></div>
  583. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  584. </div>
  585. <div class="pure-g module module-pwr">
  586. <label class="pure-u-1 pure-u-sm-1-4" for="dczEnergyIdx">Energy increment IDX</label>
  587. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczEnergyIdx" type="number" min="0" tabindex="36" data="0" /></div>
  588. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  589. </div>
  590. <div class="pure-g module module-pwr">
  591. <label class="pure-u-1 pure-u-sm-1-4" for="dczVoltIdx">Voltage IDX</label>
  592. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczVoltIdx" type="number" min="0" tabindex="37" data="0" /></div>
  593. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  594. </div>
  595. <div class="pure-g module module-pwr">
  596. <label class="pure-u-1 pure-u-sm-1-4" for="dczCurrentIdx">Current IDX</label>
  597. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczCurrentIdx" type="number" min="0" tabindex="38" data="0" /></div>
  598. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  599. </div>
  600. <div class="pure-g module module-analog">
  601. <label class="pure-u-1 pure-u-sm-1-4" for="dczAnaIdx">Analog IDX</label>
  602. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczAnaIdx" type="number" min="0" tabindex="39" data="0" /></div>
  603. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  604. </div>
  605. <div id="idxs">
  606. </div>
  607. </fieldset>
  608. </div>
  609. </div>
  610. <div class="panel" id="panel-idb">
  611. <div class="header">
  612. <h1>INFLUXDB</h1>
  613. <h2>
  614. Configure the connection to your InfluxDB server. Leave the host field empty to disable InfluxDB connection.
  615. </h2>
  616. </div>
  617. <div class="page">
  618. <fieldset>
  619. <div class="pure-g">
  620. <label class="pure-u-1 pure-u-md-1-4" for="idbHost">Host</label>
  621. <input class="pure-u-1 pure-u-md-3-4" name="idbHost" type="text" tabindex="41" />
  622. </div>
  623. <div class="pure-g">
  624. <label class="pure-u-1 pure-u-md-1-4" for="idbPort">Port</label>
  625. <input class="pure-u-1 pure-u-md-3-4" name="idbPort" type="text" tabindex="42" />
  626. </div>
  627. <div class="pure-g">
  628. <label class="pure-u-1 pure-u-md-1-4" for="idbDatabase">Database</label>
  629. <input class="pure-u-1 pure-u-md-3-4" name="idbDatabase" type="text" tabindex="43" />
  630. </div>
  631. <div class="pure-g">
  632. <label class="pure-u-1 pure-u-md-1-4" for="idbUsername">Username</label>
  633. <input class="pure-u-1 pure-u-md-3-4" name="idbUsername" type="text" tabindex="44" autocomplete="false" />
  634. </div>
  635. <div class="pure-g">
  636. <label class="pure-u-1 pure-u-md-1-4" for="idbPassword">Password</label>
  637. <input class="pure-u-1 pure-u-md-3-4" name="idbPassword" type="password" tabindex="45" autocomplete="false" />
  638. </div>
  639. </fieldset>
  640. </div>
  641. </div>
  642. <div class="panel" id="panel-power">
  643. <div class="header">
  644. <h1>POWER CALIBRATION</h1>
  645. <h2>
  646. Configure and calibrate your power monitor device. Use a pure resistive load and introduce the expected values for active power, current and voltage. Use the nominal values or a multimeter to get the proper numbers. Set any field to 0 to leave the calibration value untouched.
  647. </h2>
  648. </div>
  649. <div class="page">
  650. <fieldset>
  651. <div class="pure-g">
  652. <label class="pure-u-1 pure-u-sm-1-4" for="pwrReadEvery">Read interval</label>
  653. <select class="pure-u-1 pure-u-sm-1-4" name="pwrReadEvery">
  654. <option value=2000>2 seconds</option>
  655. <option value=6000>6 seconds</option>
  656. <option value=10000>10 seconds</option>
  657. <option value=15000>15 seconds</option>
  658. <option value=30000>30 seconds</option>
  659. <option value=60000>60 seconds</option>
  660. </select>
  661. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  662. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  663. <div class="pure-u-1 pure-u-md-3-4 hint">
  664. Select the interval between readings. These will be filtered and averaged for the report.<br />
  665. The default and recommended value is 6 seconds.
  666. </div>
  667. </div>
  668. <div class="pure-g">
  669. <label class="pure-u-1 pure-u-sm-1-4" for="pwrReportEvery">Report interval</label>
  670. <select class="pure-u-1 pure-u-sm-1-4" name="pwrReportEvery">
  671. <option value=6000>6 seconds</option>
  672. <option value=10000>10 seconds</option>
  673. <option value=30000>30 seconds</option>
  674. <option value=60000>1 minute</option>
  675. <option value=300000>5 minutes</option>
  676. </select>
  677. <div class="pure-u-0 pure-u-md-1-2">&nbsp;</div>
  678. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  679. <div class="pure-u-1 pure-u-md-3-4 hint">
  680. Select the interval between reports via MQTT.<br />
  681. This can't be less than the reading interval above.<br />
  682. The default and recommended value is 1 minute.
  683. </div>
  684. </div>
  685. <div class="pure-g module module-hlw module-emon module-v9261f">
  686. <label class="pure-u-1 pure-u-md-1-4" for="pwrExpectedP">AC RMS Active Power</label>
  687. <input class="pure-u-1 pure-u-md-3-4 pwrExpected" name="pwrExpectedP" type="text" size="8" tabindex="51" placeholder="0" />
  688. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  689. <div class="pure-u-1 pure-u-md-3-4 hint">In Watts (W). If you are using a pure resistive load like a bulb this will be writen on it, otherwise use a socket multimeter to get this value.</div>
  690. </div>
  691. <div class="pure-g module module-v9261f">
  692. <label class="pure-u-1 pure-u-md-1-4" for="pwrExpectedF">AC Power Factor</label>
  693. <input class="pure-u-1 pure-u-md-3-4 pwrExpected" name="pwrExpectedF" type="text" size="8" tabindex="51" placeholder="0" />
  694. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  695. <div class="pure-u-1 pure-u-md-3-4 hint">In percentage (%). You will need to use a calibrated multimeter to get this value and a mixed resistive and reactive load.</div>
  696. </div>
  697. <div class="pure-g module module-emon module-hlw module-v9261f">
  698. <label class="pure-u-1 pure-u-md-1-4" for="pwrExpectedV">AC RMS Voltage</label>
  699. <input class="pure-u-1 pure-u-md-3-4 pwrExpected" name="pwrExpectedV" type="text" size="8" tabindex="52" placeholder="0" />
  700. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  701. <div class="pure-u-1 pure-u-md-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>
  702. </div>
  703. <div class="pure-g module module-hlw module-v9261f">
  704. <label class="pure-u-1 pure-u-md-1-4" for="pwrExpectedC">AC RMS Current</label>
  705. <input class="pure-u-1 pure-u-md-3-4 pwrExpected" name="pwrExpectedC" type="text" size="8" tabindex="55" placeholder="0" />
  706. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  707. <div class="pure-u-1 pure-u-md-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>
  708. </div>
  709. <div class="pure-g module module-hlw module-emon module-v9261f">
  710. <div class="pure-u-1 pure-u-sm-1-4"><label for="pwrResetCalibration">Reset calibration</label></div>
  711. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="pwrResetCalibration" /></div>
  712. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  713. <div class="pure-u-1 pure-u-md-3-4 hint">Move this switch to ON and press "Update" to revert to factory calibration values.</div>
  714. </div>
  715. </fieldset>
  716. </div>
  717. </div>
  718. </form>
  719. <div class="panel" id="panel-rfb">
  720. <div class="header">
  721. <h1>RFBRIDGE</h1>
  722. <h2>
  723. Sonoff 433 RF Bridge Configuration<br /><br />
  724. 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 />
  725. 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 />
  726. Delete any code clicking the <strong>FORGET</strong> button.
  727. </h2>
  728. </div>
  729. <div class="page">
  730. <div id="rfbNodes" />
  731. </div>
  732. </div>
  733. </div> <!-- content -->
  734. </div> <!-- layout -->
  735. <!-- Templates -->
  736. <div id="rfbNodeTemplate" class="template">
  737. <fieldset>
  738. <legend>&nbsp;Switch <span></span>&nbsp;</legend>
  739. <div class="pure-g">
  740. <label class="pure-u-1-2 pure-u-sm-1-4">Switch ON</label>
  741. <input class="pure-u-1-2 pure-u-sm-1-3" type="text" maxlength="18" name="rfbcode" data_id="1" data_status="1" />
  742. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
  743. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
  744. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
  745. </div>
  746. <div class="pure-g">
  747. <label class="pure-u-1-2 pure-u-sm-1-4">Switch OFF</label>
  748. <input class="pure-u-1-2 pure-u-sm-1-3" type="text" maxlength="18" name="rfbcode" data_id="1" data_status="0" />
  749. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
  750. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
  751. <div class="pure-u-1-3 pure-u-md-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
  752. </div>
  753. </fieldset>
  754. </div>
  755. <div id="networkTemplate" class="template">
  756. <div class="pure-g">
  757. <label class="pure-u-md-1-6 pure-u-1-4" for="ssid">Network SSID</label>
  758. <div class="pure-u-md-3-4 pure-u-5-8"><input name="ssid" type="text" action="reconnect" class="pure-u-23-24" value="" size="8" tabindex="0" placeholder="Network SSID" required autocomplete="false" /></div>
  759. <div class="pure-u-md-1-12 pure-u-1-8"><button type="button" class="pure-button button-more-network pure-u-1">...</button></div>
  760. <div class="more">
  761. <div class="break"></div>
  762. <label class="pure-u-md-1-6 pure-u-1-4" for="pass">Password</label>
  763. <input class="pure-u-md-5-6 pure-u-3-4" name="pass" type="password" action="reconnect" value="" tabindex="0" autocomplete="false" />
  764. <div class="break"></div>
  765. <label class="pure-u-md-1-6 pure-u-1-4" for="ip">Static IP</label>
  766. <input class="pure-u-md-5-6 pure-u-3-4" name="ip" type="text" action="reconnect" value="" size="15" tabindex="0" autocomplete="false" />
  767. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  768. <div class="pure-u-md-5-6 pure-u-3-4 hint">Leave empty for DNS negotiation</div>
  769. <label class="pure-u-md-1-6 pure-u-1-4" for="gw">Gateway IP</label>
  770. <input class="pure-u-md-5-6 pure-u-3-4" name="gw" type="text" action="reconnect" value="" size="15" tabindex="0" autocomplete="false" />
  771. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  772. <div class="pure-u-md-5-6 pure-u-3-4 hint">Set when using a static IP</div>
  773. <label class="pure-u-md-1-6 pure-u-1-4" for="mask">Network Mask</label>
  774. <input class="pure-u-md-5-6 pure-u-3-4" name="mask" type="text" action="reconnect" value="255.255.255.0" size="15" tabindex="0" autocomplete="false" />
  775. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  776. <div class="pure-u-md-5-6 pure-u-3-4 hint">Usually 255.255.255.0 for /24 networks</div>
  777. <label class="pure-u-md-1-6 pure-u-1-4" for="dns">DNS IP</label>
  778. <input class="pure-u-md-5-6 pure-u-3-4" name="dns" type="text" action="reconnect" value="8.8.8.8" size="15" tabindex="0" autocomplete="false" />
  779. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  780. <div class="pure-u-md-5-6 pure-u-3-4 hint">Set the Domain Name Server IP to use when using a static IP</div>
  781. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  782. <div class="pure-u-md-1-6 pure-u-1-4"><button type="button" class="pure-button button-del-network pure-u-5-6 pure-u-md-5-6">Del</button></div>
  783. </div>
  784. </div>
  785. </div>
  786. <div id="relayTemplate" class="template">
  787. <div class="pure-g">
  788. <div class="pure-u-1 pure-u-sm-1-4"><label>Switch<span class="relay_id"></span> Status</label></div>
  789. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" class="relayStatus pure-u-1 pure-u-sm-1-4" data="0" /></div
  790. </div>
  791. </div>
  792. <div id="idxTemplate" class="template">
  793. <div class="pure-g">
  794. <label class="pure-u-1 pure-u-sm-1-4" for="dczRelayIdx">Switch<span class="id"></span> IDX</label>
  795. <div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24 dczRelayIdx" name="dczRelayIdx" type="number" min="0" tabindex="0" data="0" /></div>
  796. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  797. </div>
  798. </div>
  799. <div id="colorRGBTemplate" class="template">
  800. <div class="pure-g">
  801. <label class="pure-u-1 pure-u-sm-1-4">Color</label>
  802. <input class="pure-u-1 pure-u-sm-1-4" data-wcp-layout="block" name="color" readonly />
  803. </div>
  804. <div class="pure-g">
  805. <label class="pure-u-1 pure-u-sm-1-4">Brightness</label>
  806. <input type="range" min="0" max="255" class="slider pure-u-sm-1-4" id="brightness">
  807. <span class="slider brightness pure-u-sm-1-4"></span>
  808. </div>
  809. </div>
  810. <div id="colorHSVTemplate" class="template">
  811. <div class="pure-g">
  812. <label class="pure-u-1 pure-u-sm-1-4">Color</label>
  813. <input class="pure-u-1 pure-u-sm-1-4" data-wcp-layout="block" name="color" readonly />
  814. </div>
  815. </div>
  816. <div id="channelTemplate" class="template">
  817. <div class="pure-g">
  818. <label class="pure-u-1 pure-u-sm-1-4">Channel #</label>
  819. <input type="range" min="0" max="255" class="slider channels pure-u-sm-1-4" data="99">
  820. <span class="slider pure-u-sm-1-4"></span>
  821. </div>
  822. </div>
  823. <iframe id="downloader" style="display:none;"></iframe>
  824. <input id="uploader" type="file" style="display:none;" />
  825. </body>
  826. <!-- build:js script.js -->
  827. <script src="jquery-3.2.1.min.js"></script>
  828. <script src="checkboxes.js"></script>
  829. <script src="custom.js"></script>
  830. <script src="jquery.wheelcolorpicker-3.0.3.min.js"></script>
  831. <!-- endbuild -->
  832. </html>