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.

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