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.

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