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.

718 lines
43 KiB

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