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.

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