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.

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