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.

636 lines
37 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  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. <label class="pure-u-1 pure-u-sm-1-4" for="fauxmoEnabled">Alexa integration</label>
  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. <label class="pure-u-1 pure-u-sm-1-4" for="tmpUnits">Temperature units</label>
  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. <div class="pure-g">
  235. <label class="pure-u-1 pure-u-sm-1-4">Settings</label>
  236. <div class="pure-u-1 pure-u-sm-1-8"><button class="pure-button button-settings-backup pure-u-23-24">Backup</button></div>
  237. <div class="pure-u-1 pure-u-sm-1-8"><button class="pure-button button-settings-restore pure-u-23-24">Restore</button></div>
  238. </div>
  239. </fieldset>
  240. </div>
  241. </div>
  242. <div class="panel" id="panel-security">
  243. <div class="header">
  244. <h1>SECURITY</h1>
  245. <h2>Device security settings</h2>
  246. </div>
  247. <div class="page">
  248. <fieldset>
  249. <div class="pure-g">
  250. <label class="pure-u-1 pure-u-md-1-4" for="adminPass1">Admin password</label>
  251. <input name="adminPass1" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="11" />
  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">
  254. 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 />
  255. 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>
  256. </div>
  257. <div class="pure-g">
  258. <label class="pure-u-1 pure-u-md-1-4" for="adminPass2">Admin password (repeat)</label>
  259. <input name="adminPass2" class="pure-u-1 pure-u-md-3-4" type="password" tabindex="12" />
  260. </div>
  261. <div class="pure-g">
  262. <label class="pure-u-1 pure-u-md-1-4" for="webPort">HTTP port</label>
  263. <input name="webPort" class="pure-u-1 pure-u-md-3-4" type="text" tabindex="13" />
  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">
  266. This is the port for the web interface and API requests.<br />
  267. If different than 80 (standard HTTP port) you will have to add it explicitly to your requests: http://myip:myport/
  268. </div>
  269. </div>
  270. <div class="pure-g">
  271. <div class="pure-u-1 pure-u-sm-1-4"><label for="apiEnabled">Enable HTTP API</label></div>
  272. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="apiEnabled" /></div>
  273. </div>
  274. <div class="pure-g">
  275. <label class="pure-u-1 pure-u-md-1-4" for="apiKey">HTTP API Key</label>
  276. <input name="apiKey" class="pure-u-3-4 pure-u-md-1-2" type="text" tabindex="14" />
  277. <div class=" pure-u-1-4 pure-u-md-1-4"><button class="pure-button button-apikey pure-u-23-24">Generate</button></div>
  278. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  279. <div class="pure-u-1 pure-u-md-3-4 hint">
  280. This is the key you will have to pass with every HTTP request to the API, either to get or write values.<br />
  281. All API calls must contain the <strong>apikey</strong> parameter with the value above.<br />
  282. To know what APIs are enabled do a call to <strong>/apis</strong>.
  283. </div>
  284. </div>
  285. </fieldset>
  286. </div>
  287. </div>
  288. <div class="panel" id="panel-wifi">
  289. <div class="header">
  290. <h1>WIFI</h1>
  291. <h2>You can configure up to 5 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  292. </div>
  293. <div class="page">
  294. <fieldset>
  295. <div id="networks">
  296. </div>
  297. <button type="button" class="pure-button button-add-network">Add network</button>
  298. </fieldset>
  299. </div>
  300. </div>
  301. <div class="panel" id="panel-mqtt">
  302. <div class="header">
  303. <h1>MQTT</h1>
  304. <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>
  305. </div>
  306. <div class="page">
  307. <fieldset>
  308. <div class="pure-g">
  309. <label class="pure-u-1 pure-u-md-1-4" for="mqttServer">MQTT Server</label>
  310. <input class="pure-u-1 pure-u-md-3-4" name="mqttServer" type="text" size="20" tabindex="21" placeholder="MQTT Server" />
  311. </div>
  312. <div class="pure-g">
  313. <label class="pure-u-1 pure-u-md-1-4" for="mqttPort">MQTT Port</label>
  314. <input class="pure-u-1 pure-u-md-3-4" name="mqttPort" type="text" size="6" tabindex="22" placeholder="1883" />
  315. </div>
  316. <div class="pure-g">
  317. <label class="pure-u-1 pure-u-md-1-4" for="mqttUser">MQTT User</label>
  318. <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" />
  319. </div>
  320. <div class="pure-g">
  321. <label class="pure-u-1 pure-u-md-1-4" for="mqttPassword">MQTT Password</label>
  322. <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" />
  323. </div>
  324. <div class="pure-g">
  325. <label class="pure-u-1 pure-u-md-1-4" for="mqttTopic">MQTT Root Topic</label>
  326. <input class="pure-u-1 pure-u-md-3-4" name="mqttTopic" type="text" size="20" tabindex="25" />
  327. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  328. <div class="pure-u-1 pure-u-md-3-4 hint">
  329. This is the root topic for this device. The {identifier} placeholder will be replaces by the device hostname.<br />
  330. - <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 />
  331. - <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 />
  332. - <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 />
  333. - <strong>&lt;root&gt;/ip</strong> The device will report to this topic its IP.<br />
  334. - <strong>&lt;root&gt;/version</strong> The device will report to this topic its firmware version on boot.<br />
  335. - <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.
  336. </div>
  337. </div>
  338. </fieldset>
  339. </div>
  340. </div>
  341. <div class="panel" id="panel-domoticz">
  342. <div class="header">
  343. <h1>DOMOTICZ</h1>
  344. <h2>
  345. Configure the connection to your Domoticz server.
  346. </h2>
  347. </div>
  348. <div class="page">
  349. <fieldset>
  350. <div class="pure-g">
  351. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicIn">Domoticz IN Topic</label>
  352. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicIn" type="text" tabindex="31" placeholder="domoticz/in" />
  353. </div>
  354. <div class="pure-g">
  355. <label class="pure-u-1 pure-u-md-1-4" for="dczTopicOut">Domoticz OUT Topic</label>
  356. <input class="pure-u-1 pure-u-md-3-4" name="dczTopicOut" type="text" tabindex="32" placeholder="domoticz/out" />
  357. </div>
  358. <div class="pure-g module module-dht module-ds">
  359. <label class="pure-u-1 pure-u-sm-1-4" for="dczTmpIdx">Temperature IDX</label>
  360. <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>
  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-dht">
  364. <label class="pure-u-1 pure-u-sm-1-4" for="dczHumIdx">Humidity IDX</label>
  365. <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>
  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="dczPowIdx">Power IDX</label>
  370. <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>
  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 module-emon">
  374. <label class="pure-u-1 pure-u-sm-1-4" for="dczEnergyIdx">Energy increment IDX</label>
  375. <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>
  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">
  379. <label class="pure-u-1 pure-u-sm-1-4" for="dczVoltIdx">Voltage IDX</label>
  380. <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>
  381. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  382. </div>
  383. <div class="pure-g module module-pow module-emon">
  384. <label class="pure-u-1 pure-u-sm-1-4" for="dczCurrentIdx">Current IDX</label>
  385. <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>
  386. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  387. </div>
  388. <div id="idxs">
  389. </div>
  390. </fieldset>
  391. </div>
  392. </div>
  393. <div class="panel" id="panel-power">
  394. <div class="header">
  395. <h1>POWER</h1>
  396. <h2>
  397. 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.
  398. </h2>
  399. </div>
  400. <div class="page">
  401. <fieldset>
  402. <div class="pure-g">
  403. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedPower">AC RMS Active Power</label>
  404. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedPower" type="text" size="8" tabindex="51" placeholder="0" />
  405. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  406. <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>
  407. </div>
  408. <div class="pure-g">
  409. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedVoltage">AC RMS Voltage</label>
  410. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedVoltage" type="text" size="8" tabindex="52" placeholder="0" />
  411. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  412. <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>
  413. </div>
  414. <div class="pure-g">
  415. <label class="pure-u-1 pure-u-md-1-4" for="powExpectedCurrent">AC RMS Current</label>
  416. <input class="pure-u-1 pure-u-md-3-4 powExpected" name="powExpectedCurrent" type="text" size="8" tabindex="55" placeholder="0" />
  417. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  418. <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>
  419. </div>
  420. <div class="pure-g">
  421. <div class="pure-u-1 pure-u-sm-1-4"><label for="powExpectedReset">Reset calibration</label></div>
  422. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="powExpectedReset" /></div>
  423. <div class="pure-u-0 pure-u-md-1-4">&nbsp;</div>
  424. <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>
  425. </div>
  426. </fieldset>
  427. </div>
  428. </div>
  429. </form>
  430. </div> <!-- content -->
  431. </div> <!-- layout -->
  432. <!-- Templates -->
  433. <div id="networkTemplate" class="template">
  434. <div class="pure-g">
  435. <label class="pure-u-md-1-6 pure-u-1-4" for="ssid">Network SSID</label>
  436. <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>
  437. <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>
  438. <div class="more">
  439. <div class="break"></div>
  440. <label class="pure-u-md-1-6 pure-u-1-4" for="pass">Password</label>
  441. <input class="pure-u-md-5-6 pure-u-3-4" name="pass" type="password" value="" tabindex="0" />
  442. <div class="break"></div>
  443. <label class="pure-u-md-1-6 pure-u-1-4" for="ip">Static IP</label>
  444. <input class="pure-u-md-5-6 pure-u-3-4" name="ip" type="text" value="" 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">Leave empty for DNS negotiation</div>
  447. <label class="pure-u-md-1-6 pure-u-1-4" for="gw">Gateway IP</label>
  448. <input class="pure-u-md-5-6 pure-u-3-4" name="gw" type="text" value="" 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 when using a static IP</div>
  451. <label class="pure-u-md-1-6 pure-u-1-4" for="mask">Network Mask</label>
  452. <input class="pure-u-md-5-6 pure-u-3-4" name="mask" type="text" value="255.255.255.0" size="15" tabindex="0" />
  453. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  454. <div class="pure-u-md-5-6 pure-u-3-4 hint">Usually 255.255.255.0 for /24 networks</div>
  455. <label class="pure-u-md-1-6 pure-u-1-4" for="dns">DNS IP</label>
  456. <input class="pure-u-md-5-6 pure-u-3-4" name="dns" type="text" value="8.8.8.8" size="15" tabindex="0" />
  457. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  458. <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>
  459. <div class="pure-u-md-1-6 pure-u-1-4"></div>
  460. <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>
  461. </div>
  462. </div>
  463. </div>
  464. <div id="relayTemplate" class="template">
  465. <div class="pure-g">
  466. <label class="pure-u-1 pure-u-sm-1-4">Relay<span class="relay_id"></span> Status</label>
  467. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" class="relayStatus" data="0" /></div>
  468. </div>
  469. </div>
  470. <div id="idxTemplate" class="template">
  471. <div class="pure-g">
  472. <label class="pure-u-1 pure-u-sm-1-4" for="dczRelayIdx">Relay<span class="id"></span> IDX</label>
  473. <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>
  474. <div class="pure-u-1 pure-u-sm-5-8 hint center">Set to 0 to disable notifications.</div>
  475. </div>
  476. </div>
  477. <iframe id="downloader" style="display:none;"></iframe>
  478. <input id="uploader" type="file" style="display:none;" />
  479. </body>
  480. <!-- build:js script.js -->
  481. <script src="jquery-1.12.3.min.js"></script>
  482. <script src="checkboxes.js"></script>
  483. <script src="custom.js"></script>
  484. <!-- endbuild -->
  485. </html>