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.

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