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.

821 lines
49 KiB

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