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.

627 lines
37 KiB

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
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-min.css" />
  10. <link rel="stylesheet" href="side-menu.css" />
  11. <link rel="stylesheet" href="grids-responsive-min.css" />
  12. <link rel="stylesheet" href="checkboxes.css" />
  13. <link rel="stylesheet" href="custom.css" />
  14. <!-- endbuild -->
  15. </head>
  16. <body>
  17. <div id="credentials" class="webmode">
  18. Wrong credentials
  19. </div>
  20. <div id="password" class="webmode">
  21. <div class="content">
  22. <form id="formPassword" class="pure-form" action="/" method="post">
  23. <input class="pure-u-1 pure-u-sm-3-4" type="hidden" name="webMode" value="1" />
  24. <div class="panel" style="display: block;">
  25. <div class="header">
  26. <h1>SECURITY</h1>
  27. <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>
  28. </div>
  29. <div class="page">
  30. <fieldset>
  31. <div class="pure-g">
  32. <label class="pure-u-1 pure-u-md-1-4" for="adminPass1">Admin password</label>
  33. <input name="adminPass1" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="1" />
  34. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  35. <div class="pure-u-1 pure-u-md-3-4 hint">
  36. 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 />
  37. 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>
  38. </div>
  39. <div class="pure-g">
  40. <label class="pure-u-1 pure-u-md-1-4" for="adminPass2">Admin password (repeat)</label>
  41. <input name="adminPass2" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="2" />
  42. </div>
  43. <button class="pure-button button-update-password">Update</button>
  44. </fieldset>
  45. </div>
  46. </div>
  47. </form>
  48. </div> <!-- content -->
  49. </div>
  50. <div id="layout" class="webmode">
  51. <a href="#menu" id="menuLink" class="menu-link">
  52. <span></span>
  53. </a>
  54. <div id="menu">
  55. <div class="pure-menu">
  56. <span class="pure-menu-heading">ESPurna 0.0.0</span>
  57. <ul class="pure-menu-list">
  58. <li class="pure-menu-item">
  59. <a href="#" class="pure-menu-link" data="panel-status">STATUS</a>
  60. </li>
  61. <li class="pure-menu-item">
  62. <a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
  63. </li>
  64. <li class="pure-menu-item">
  65. <a href="#" class="pure-menu-link" data="panel-security">SECURITY</a>
  66. </li>
  67. <li class="pure-menu-item">
  68. <a href="#" class="pure-menu-link" data="panel-wifi">WIFI</a>
  69. </li>
  70. <li class="pure-menu-item">
  71. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  72. </li>
  73. <li class="pure-menu-item module module-dcz">
  74. <a href="#" class="pure-menu-link" data="panel-domoticz">DOMOTICZ</a>
  75. </li>
  76. <li class="pure-menu-item module module-pow">
  77. <a href="#" class="pure-menu-link" data="panel-power">POWER</a>
  78. </li>
  79. </ul>
  80. <div class="main-buttons">
  81. <button class="pure-button button-update">Update</button>
  82. <button class="pure-button button-reconnect">Reconnect</button>
  83. <button class="pure-button button-reset">Reset</button>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="content">
  88. <div class="panel" id="panel-status" style="display: block;">
  89. <div class="header">
  90. <h1>STATUS</h1>
  91. <h2>Current configuration</h2>
  92. </div>
  93. <div class="page">
  94. <form class="pure-form pure-form-aligned">
  95. <fieldset>
  96. <div class="pure-g">
  97. <label class="pure-u-1 pure-u-sm-1-4" for="manufacturer">Manufacturer</label>
  98. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="manufacturer" readonly />
  99. </div>
  100. <div class="pure-g">
  101. <label class="pure-u-1 pure-u-sm-1-4" for="device">Device</label>
  102. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="device" readonly />
  103. </div>
  104. <div class="pure-g">
  105. <label class="pure-u-1 pure-u-sm-1-4" for="chipid">Chip ID</label>
  106. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="chipid" readonly />
  107. </div>
  108. <div class="pure-g">
  109. <label class="pure-u-1 pure-u-sm-1-4" for="mac">MAC</label>
  110. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="mac" readonly />
  111. </div>
  112. <div class="pure-g">
  113. <label class="pure-u-1 pure-u-sm-1-4" for="network">Network</label>
  114. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="network" readonly />
  115. </div>
  116. <div class="pure-g">
  117. <label class="pure-u-1 pure-u-sm-1-4" for="deviceip">IP</label>
  118. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="deviceip" readonly />
  119. </div>
  120. <div class="pure-g">
  121. <label class="pure-u-1 pure-u-sm-1-4" for="mqtt">MQTT Status</label>
  122. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="mqttStatus" 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-pow">
  137. <label class="pure-u-1 pure-u-sm-1-4" for="powActivePower">Active Power (W)</label>
  138. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powActivePower" readonly />
  139. </div>
  140. <div class="pure-g module module-pow module-emon">
  141. <label class="pure-u-1 pure-u-sm-1-4" for="powApparentPower">Apparent Power (W)</label>
  142. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powApparentPower" readonly />
  143. </div>
  144. <div class="pure-g module module-pow">
  145. <label class="pure-u-1 pure-u-sm-1-4" for="powReactivePower">Reactive Power (W)</label>
  146. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powReactivePower" readonly />
  147. </div>
  148. <div class="pure-g module module-pow">
  149. <label class="pure-u-1 pure-u-sm-1-4" for="powCurrent">Current (A)</label>
  150. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powCurrent" readonly />
  151. </div>
  152. <div class="pure-g module module-pow">
  153. <label class="pure-u-1 pure-u-sm-1-4" for="powVoltage">Voltage (V)</label>
  154. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powVoltage" readonly />
  155. </div>
  156. <div class="pure-g module module-pow">
  157. <label class="pure-u-1 pure-u-sm-1-4" for="powPowerFactor">Power Factor (%)</label>
  158. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="powPowerFactor" readonly />
  159. </div>
  160. <div id="relays">
  161. </div>
  162. </fieldset>
  163. </form>
  164. </div>
  165. </div>
  166. <form id="formSave" class="pure-form" action="/" method="post">
  167. <input class="pure-u-1 pure-u-sm-3-4" type="hidden" name="webMode" value="0" />
  168. <div class="panel" id="panel-general">
  169. <div class="header">
  170. <h1>GENERAL</h1>
  171. <h2>General configuration values</h2>
  172. </div>
  173. <div class="page">
  174. <fieldset>
  175. <div class="pure-g">
  176. <label class="pure-u-1 pure-u-md-1-4" for="hostname">Hostname</label>
  177. <input name="hostname" class="pure-u-1 pure-u-md-3-4" type="text" tabindex="1" />
  178. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  179. <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>
  180. </div>
  181. <div class="pure-g">
  182. <label class="pure-u-1 pure-u-md-1-4" for="relayMode">Relay boot mode</label>
  183. <div class="pure-u-1 pure-u-md-3-4">
  184. <select name="relayMode" class="pure-u-3-4" tabindex="2">
  185. <option value="0">Always OFF</a>
  186. <option value="1">Always ON</a>
  187. <option value="2">Same as before</a>
  188. <option value="3">Toogle before</a>
  189. </select>
  190. </div>
  191. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  192. <div class="pure-u-1 pure-u-md-3-4 hint">Here you can define what will be the status of the relay after a reboot.</div>
  193. </div>
  194. <div class="pure-g module module-multirelay">
  195. <label class="pure-u-1 pure-u-md-1-4" for="relaySync">Relay sync mode</label>
  196. <div class="pure-u-1 pure-u-md-3-4">
  197. <select name="relaySync" class="pure-u-3-4" tabindex="3">
  198. <option value="0">No synchonisation</a>
  199. <option value="1">Zero or one relays active</a>
  200. <option value="2">One and just one relay active</a>
  201. <option value="3">All synchonised</a>
  202. </select>
  203. </div>
  204. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  205. <div class="pure-u-1 pure-u-md-3-4 hint">Define how the different relays should be synchronized.</div>
  206. </div>
  207. <div class="pure-g">
  208. <label class="pure-u-1 pure-u-md-1-4" for="relayPulseMode">Relay pulse mode</label>
  209. <div class="pure-u-1 pure-u-md-3-4">
  210. <select name="relayPulseMode" class="pure-u-3-4" tabindex="4">
  211. <option value="0">Don't pulse</a>
  212. <option value="1">Normally OFF (stays on for a short time)</a>
  213. <option value="2">Normally ON (stays off for a short time)</a>
  214. </select>
  215. </div>
  216. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  217. <div class="pure-u-1 pure-u-md-3-4 hint">When pulse mode is enabled the relay will automatically switch back to its normal state after the pulse time (below).</div>
  218. </div>
  219. <div class="pure-g">
  220. <label class="pure-u-1 pure-u-md-1-4" for="relayPulseTime">Relay pulse time</label>
  221. <input name="relayPulseTime" class="pure-u-1 pure-u-md-3-4" type="number" min="1" tabindex="5" />
  222. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  223. <div class="pure-u-1 pure-u-md-3-4 hint">Pulse time in seconds.</div>
  224. </div>
  225. <div class="pure-g module module-fauxmo">
  226. <div class="pure-u-1 pure-u-sm-1-4"><label for="fauxmoEnabled">Alexa integration</label></div>
  227. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="fauxmoEnabled" tabindex="6" /></div>
  228. </div>
  229. <div class="pure-g module module-ds module-dht">
  230. <div class="pure-u-1 pure-u-sm-1-4"><label for="tmpUnits">Temperature units</label></div>
  231. <div class="pure-u-1 pure-u-sm-1-4"><input type="radio" name="tmpUnits" tabindex="7" value="0"> Celsius (ºC)</input></div>
  232. <div class="pure-u-1 pure-u-sm-1-4"><input type="radio" name="tmpUnits" tabindex="8" value="1"> Fahrenheit (ºF)</input></div>
  233. </div>
  234. </fieldset>
  235. </div>
  236. </div>
  237. <div class="panel" id="panel-security">
  238. <div class="header">
  239. <h1>SECURITY</h1>
  240. <h2>Device security settings</h2>
  241. </div>
  242. <div class="page">
  243. <fieldset>
  244. <div class="pure-g">
  245. <label class="pure-u-1 pure-u-md-1-4" for="adminPass1">Admin password</label>
  246. <input name="adminPass1" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="11" />
  247. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  248. <div class="pure-u-1 pure-u-md-3-4 hint">
  249. 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 />
  250. 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>
  251. </div>
  252. <div class="pure-g">
  253. <label class="pure-u-1 pure-u-md-1-4" for="adminPass2">Admin password (repeat)</label>
  254. <input name="adminPass2" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="12" />
  255. </div>
  256. <div class="pure-g">
  257. <label class="pure-u-1 pure-u-md-1-4" for="webPort">HTTP port</label>
  258. <input name="webPort" class="pure-u-1 pure-u-md-3-4" type="text" tabindex="13" />
  259. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  260. <div class="pure-u-1 pure-u-md-3-4 hint">
  261. This is the port for the web interface and API requests.<br />
  262. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
  263. </div>
  264. </div>
  265. <div class="pure-g">
  266. <div class="pure-u-1 pure-u-sm-1-4"><label for="apiEnabled">Enable HTTP API</label></div>
  267. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="apiEnabled" /></div>
  268. </div>
  269. <div class="pure-g">
  270. <label class="pure-u-1 pure-u-md-1-4" for="apiKey">HTTP API Key</label>
  271. <input name="apiKey" class="pure-u-3-4 pure-u-md-1-2" type="text" tabindex="14" />
  272. <div class=" pure-u-1-4 pure-u-md-1-4"><button class="pure-button button-apikey pure-u-23-24">Generate</button></div>
  273. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  274. <div class="pure-u-1 pure-u-md-3-4 hint">
  275. This is the key you will have to pass with every HTTP request to the API, either to get or write values.<br />
  276. All API calls must contain the <strong>apikey</strong> parameter with the value above.<br />
  277. To know what APIs are enabled do a call to <strong>/apis</strong>.
  278. </div>
  279. </div>
  280. </fieldset>
  281. </div>
  282. </div>
  283. <div class="panel" id="panel-wifi">
  284. <div class="header">
  285. <h1>WIFI</h1>
  286. <h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  287. </div>
  288. <div class="page">
  289. <fieldset>
  290. <div id="networks">
  291. </div>
  292. <button type="button" class="pure-button button-add-network">Add network</button>
  293. </fieldset>
  294. </div>
  295. </div>
  296. <div class="panel" id="panel-mqtt">
  297. <div class="header">
  298. <h1>MQTT</h1>
  299. <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>
  300. </div>
  301. <div class="page">
  302. <fieldset>
  303. <div class="pure-g">
  304. <label class="pure-u-1 pure-u-md-1-4" for="mqttServer">MQTT Server</label>
  305. <input class="pure-u-1 pure-u-md-3-4" name="mqttServer" type="text" size="20" tabindex="21" placeholder="MQTT Server" />
  306. </div>
  307. <div class="pure-g">
  308. <label class="pure-u-1 pure-u-md-1-4" for="mqttPort">MQTT Port</label>
  309. <input class="pure-u-1 pure-u-md-3-4" name="mqttPort" type="text" size="6" tabindex="22" placeholder="1883" />
  310. </div>
  311. <div class="pure-g">
  312. <label class="pure-u-1 pure-u-md-1-4" for="mqttUser">MQTT User</label>
  313. <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" />
  314. </div>
  315. <div class="pure-g">
  316. <label class="pure-u-1 pure-u-md-1-4" for="mqttPassword">MQTT Password</label>
  317. <input class="pure-u-1 pure-u-md-3-4" name="mqttPassword" type="text" size="20" tabindex="24" placeholder="Leave blank if no user/pass" />
  318. </div>
  319. <div class="pure-g">
  320. <label class="pure-u-1 pure-u-md-1-4" for="mqttTopic">MQTT Root Topic</label>
  321. <input class="pure-u-1 pure-u-md-3-4" name="mqttTopic" type="text" size="20" tabindex="25" />
  322. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  323. <div class="pure-u-1 pure-u-md-3-4 hint">
  324. This is the root topic for this device. The {identifier} placeholder will be replaces by the device hostname.<br />
  325. - <strong>&lt;root&gt;/relay/#</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 relay ID (starting from 0). If the board has only one relay it will be 0.<br />
  326. - <strong>&lt;root&gt;/led/#</strong> Send a 0 or a 1 as a payload to this topic to set the onboard LED to the given state, send a 3 to turn it back to WIFI indicator. Replace # with the LED ID (starting from 0). If the board has only one LED it will be 0.<br />
  327. - <strong>&lt;root&gt;/button/#</strong> For each button in the board subscribe to this topic to know when it is pressed (payload 1) or released (payload 0).<br />
  328. - <strong>&lt;root&gt;/ip</strong> The device will report to this topic its IP.<br />
  329. - <strong>&lt;root&gt;/version</strong> The device will report to this topic its firmware version on boot.<br />
  330. - <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.
  331. </div>
  332. </div>
  333. </fieldset>
  334. </div>
  335. </div>
  336. <div class="panel" id="panel-domoticz">
  337. <div class="header">
  338. <h1>DOMOTICZ</h1>
  339. <h2>
  340. Configure the connection to your Domoticz server.
  341. </h2>
  342. </div>
  343. <div class="page">
  344. <fieldset>
  345. <div class="pure-g">
  346. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicIn">Domoticz IN Topic</label>
  347. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicIn" type="text" tabindex="31" placeholder="domoticz/in" />
  348. </div>
  349. <div class="pure-g">
  350. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicOut">Domoticz OUT Topic</label>
  351. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicOut" type="text" tabindex="32" placeholder="domoticz/out" />
  352. </div>
  353. <div class="pure-g module module-dht module-ds">
  354. <label class="pure-u-1 pure-u-sm-1-4" for="dczTmpIdx">Temperature IDX</label>
  355. <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>
  356. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  357. </div>
  358. <div class="pure-g module module-dht">
  359. <label class="pure-u-1 pure-u-sm-1-4" for="dczHumIdx">Humidity IDX</label>
  360. <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>
  361. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  362. </div>
  363. <div class="pure-g module module-pow module-emon">
  364. <label class="pure-u-1 pure-u-sm-1-4" for="dczPowIdx">Power IDX</label>
  365. <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>
  366. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  367. </div>
  368. <div class="pure-g module module-pow module-emon">
  369. <label class="pure-u-1 pure-u-sm-1-4" for="dczEnergyIdx">Energy increment IDX</label>
  370. <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>
  371. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  372. </div>
  373. <div class="pure-g module module-pow">
  374. <label class="pure-u-1 pure-u-sm-1-4" for="dczVoltIdx">Voltage IDX</label>
  375. <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>
  376. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  377. </div>
  378. <div class="pure-g module module-pow module-emon">
  379. <label class="pure-u-1 pure-u-sm-1-4" for="dczCurrentIdx">Current IDX</label>
  380. <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>
  381. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  382. </div>
  383. <div id="idxs">
  384. </div>
  385. </fieldset>
  386. </div>
  387. </div>
  388. <div class="panel" id="panel-power">
  389. <div class="header">
  390. <h1>POWER</h1>
  391. <h2>
  392. 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.
  393. </h2>
  394. </div>
  395. <div class="page">
  396. <fieldset>
  397. <div class="pure-g">
  398. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedPower">AC RMS Active Power</label>
  399. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedPower" type="text" size="8" tabindex="51" placeholder="0" />
  400. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  401. <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>
  402. </div>
  403. <div class="pure-g">
  404. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedVoltage">AC RMS Voltage</label>
  405. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedVoltage" type="text" size="8" tabindex="52" placeholder="0" />
  406. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  407. <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>
  408. </div>
  409. <div class="pure-g">
  410. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedCurrent">AC RMS Current</label>
  411. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedCurrent" type="text" size="8" tabindex="55" placeholder="0" />
  412. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  413. <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>
  414. </div>
  415. <div class="pure-g">
  416. <div class="pure-u-1 pure-u-sm-1-4"><label for="powExpectedReset">Reset calibration</label></div>
  417. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="powExpectedReset" /></div>
  418. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  419. <div class="pure-u-1 pure-u-md-3-4 hint">Move this switch to ON and press "Update" to revert to factory values.</div>
  420. </div>
  421. </fieldset>
  422. </div>
  423. </div>
  424. </form>
  425. </div> <!-- content -->
  426. </div> <!-- layout -->
  427. <!-- Templates -->
  428. <div id="networkTemplate" class="template">
  429. <div class="pure-g">
  430. <label class="pure-u-md-1-6 pure-u-1-4" for="ssid">Network SSID</label>
  431. <div class="pure-u-md-3-4 pure-u-5-8"><input name="ssid" type="text" class="pure-u-23-24" value="" size="8" tabindex="0" placeholder="Network SSID" required /></div>
  432. <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>
  433. <div class="more">
  434. <div class="break"></div>
  435. <label class="pure-u-md-1-6 pure-u-1-4" for="pass">Password</label>
  436. <input class="pure-u-md-5-6 pure-u-3-4" name="pass" type="password" value="" tabindex="0" />
  437. <div class="break"></div>
  438. <label class="pure-u-md-1-6 pure-u-1-4" for="ip">Static IP</label>
  439. <input class="pure-u-md-5-6 pure-u-3-4" name="ip" type="text" value="" size="15" tabindex="0" />
  440. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  441. <div class="pure-u-md-5-6 pure-u-3-4 hint">Leave empty for DNS negotiation</div>
  442. <label class="pure-u-md-1-6 pure-u-1-4" for="gw">Gateway IP</label>
  443. <input class="pure-u-md-5-6 pure-u-3-4" name="gw" type="text" value="" size="15" tabindex="0" />
  444. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  445. <div class="pure-u-md-5-6 pure-u-3-4 hint">Set when using a static IP</div>
  446. <label class="pure-u-md-1-6 pure-u-1-4" for="mask">Network Mask</label>
  447. <input class="pure-u-md-5-6 pure-u-3-4" name="mask" type="text" value="255.255.255.0" size="15" tabindex="0" />
  448. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  449. <div class="pure-u-md-5-6 pure-u-3-4 hint">Usually 255.255.255.0 for /24 networks</div>
  450. <label class="pure-u-md-1-6 pure-u-1-4" for="dns">DNS IP</label>
  451. <input class="pure-u-md-5-6 pure-u-3-4" name="dns" type="text" value="8.8.8.8" size="15" tabindex="0" />
  452. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  453. <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>
  454. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  455. <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>
  456. </div>
  457. </div>
  458. </div>
  459. <div id="relayTemplate" class="template">
  460. <div class="pure-g">
  461. <label class="pure-u-1 pure-u-sm-1-4">Relay<span class="relay_id"></span> Status</label>
  462. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" class="relayStatus" data="0" /></div>
  463. </div>
  464. </div>
  465. <div id="idxTemplate" class="template">
  466. <div class="pure-g">
  467. <label class="pure-u-1 pure-u-sm-1-4" for="dczRelayIdx">Relay<span class="id"></span> IDX</label>
  468. <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>
  469. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  470. </div>
  471. </div>
  472. </body>
  473. <!-- build:js script.js -->
  474. <script src="jquery-1.12.3.min.js"></script>
  475. <script src="checkboxes.js"></script>
  476. <script src="custom.js"></script>
  477. <!-- endbuild -->
  478. </html>