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.

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