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.

326 lines
16 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>ESPurna 0.0.0</title>
  5. <meta charset="utf-8" />
  6. <link rel="shortcut icon" type="image/x-icon" href="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. <!-- endbuild -->
  15. </head>
  16. <body>
  17. <div id="layout">
  18. <a href="#menu" id="menuLink" class="menu-link">
  19. <span></span>
  20. </a>
  21. <div id="menu">
  22. <div class="pure-menu">
  23. <span class="pure-menu-heading">ESPurna 0.0.0</span>
  24. <ul class="pure-menu-list">
  25. <li class="pure-menu-item">
  26. <a href="#" class="pure-menu-link" data="panel-status">STATUS</a>
  27. </li>
  28. <li class="pure-menu-item">
  29. <a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
  30. </li>
  31. <li class="pure-menu-item">
  32. <a href="#" class="pure-menu-link" data="panel-wifi">WIFI</a>
  33. </li>
  34. <li class="pure-menu-item">
  35. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  36. </li>
  37. <li class="pure-menu-item">
  38. <a href="#" class="pure-menu-link" data="panel-power">POWER</a>
  39. </li>
  40. </ul>
  41. <div class="main-buttons">
  42. <button class="pure-button button-update">Update</button>
  43. <button class="pure-button button-reconnect">Reconnect</button>
  44. <button class="pure-button button-reset">Reset</button>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="content">
  49. <div class="panel" id="panel-status" style="display: block;">
  50. <div class="header">
  51. <h1>STATUS</h1>
  52. <h2>Current configuration</h2>
  53. </div>
  54. <div class="page">
  55. <form class="pure-form pure-form-aligned">
  56. <fieldset>
  57. <div class="pure-g">
  58. <label class="pure-u-1 pure-u-sm-1-4" for="manufacturer">Manufacturer</label>
  59. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="manufacturer" readonly />
  60. </div>
  61. <div class="pure-g">
  62. <label class="pure-u-1 pure-u-sm-1-4" for="device">Device</label>
  63. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="device" readonly />
  64. </div>
  65. <div class="pure-g">
  66. <label class="pure-u-1 pure-u-sm-1-4" for="chipid">Chip ID</label>
  67. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="chipid" readonly />
  68. </div>
  69. <div class="pure-g">
  70. <label class="pure-u-1 pure-u-sm-1-4" for="mac">MAC</label>
  71. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="mac" readonly />
  72. </div>
  73. <div class="pure-g">
  74. <label class="pure-u-1 pure-u-sm-1-4" for="network">Network</label>
  75. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="network" readonly />
  76. </div>
  77. <div class="pure-g">
  78. <label class="pure-u-1 pure-u-sm-1-4" for="ip">IP</label>
  79. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="ip" readonly />
  80. </div>
  81. <div class="pure-g">
  82. <label class="pure-u-1 pure-u-sm-1-4" for="mqtt">MQTT Status</label>
  83. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="mqttStatus" readonly />
  84. </div>
  85. <div class="pure-g">
  86. <label class="pure-u-1 pure-u-sm-1-4" for="dhtTmp">Temperature (ºC)</label>
  87. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="dhtTmp" readonly />
  88. </div>
  89. <div class="pure-g">
  90. <label class="pure-u-1 pure-u-sm-1-4" for="dhtHum">Humidity (%)</label>
  91. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="dhtHum" readonly />
  92. </div>
  93. <div class="pure-g">
  94. <label class="pure-u-1 pure-u-sm-1-4" for="emonPower">Power (W)</label>
  95. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="emonPower" readonly />
  96. </div>
  97. <div class="pure-g">
  98. <div class="pure-u-1 pure-u-sm-1-4"><label for="relayStatus">Relay Status</label></div>
  99. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="relayStatus" /></div>
  100. </div>
  101. </fieldset>
  102. </form>
  103. </div>
  104. </div>
  105. <form id="formSave" class="pure-form pure-form-stacked" action="/" method="post">
  106. <div class="panel" id="panel-general">
  107. <div class="header">
  108. <h1>GENERAL</h1>
  109. <h2>General configuration values</h2>
  110. </div>
  111. <div class="page">
  112. <fieldset>
  113. <div class="pure-u-1">
  114. <label class="form-label" for="hostname">Hostname</label>
  115. <div class="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>
  116. <input name="hostname" type="text" class="pure-u-1-4" tabindex="1">
  117. </div>
  118. <div class="pure-u-1">
  119. <label class="form-label" for="relayMode">Relay boot mode</label>
  120. <div class="hint">Here you can define what will be the status of the relay after a reboot.</div>
  121. <select name="relayMode" class="pure-u-1-4" tabindex="2">
  122. <option value="0">Always OFF</a>
  123. <option value="1">Always ON</a>
  124. <option value="2">Same as before</a>
  125. </select>
  126. </div>
  127. </fieldset>
  128. </div>
  129. </div>
  130. <div class="panel" id="panel-wifi">
  131. <div class="header">
  132. <h1>WIFI</h1>
  133. <h2>You can configure up to 3 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  134. </div>
  135. <div class="page">
  136. <fieldset>
  137. <legend>First network</legend>
  138. <div class="pure-g">
  139. <div class="pure-u-1 pure-u-md-1-2">
  140. <label for="ssid">SSID</label>
  141. <input type="text" class="pure-u-23-24" tabindex="10" name="ssid">
  142. </div>
  143. <div class="pure-u-1 pure-u-md-1-2">
  144. <label for="pass">Password</label>
  145. <input type="text" class="pure-u-23-24" tabindex="11" name="pass">
  146. </div>
  147. </div>
  148. <legend>Second network</legend>
  149. <div class="pure-g">
  150. <div class="pure-u-1 pure-u-md-1-2">
  151. <label for="ssid">SSID</label>
  152. <input type="text" class="pure-u-23-24" tabindex="12" name="ssid">
  153. </div>
  154. <div class="pure-u-1 pure-u-md-1-2">
  155. <label for="pass">Password</label>
  156. <input type="text" class="pure-u-23-24" tabindex="13" name="pass">
  157. </div>
  158. </div>
  159. <legend>Third network</legend>
  160. <div class="pure-g">
  161. <div class="pure-u-1 pure-u-md-1-2">
  162. <label for="ssid">SSID</label>
  163. <input type="text" class="pure-u-23-24" tabindex="14" name="ssid">
  164. </div>
  165. <div class="pure-u-1 pure-u-md-1-2">
  166. <label for="pass">Password</label>
  167. <input type="text" class="pure-u-23-24" tabindex="15" name="pass">
  168. </div>
  169. </div>
  170. </fieldset>
  171. </div>
  172. </div>
  173. <div class="panel" id="panel-mqtt">
  174. <div class="header">
  175. <h1>MQTT</h1>
  176. <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>
  177. </div>
  178. <div class="page">
  179. <fieldset>
  180. <div class="pure-g">
  181. <div class="pure-u-1">
  182. <label class="form-label" for="mqttServer">MQTT Server</label>
  183. <input name="mqttServer" type="text" class="pure-u-23-24" value="" size="20" tabindex="10" placeholder="MQTT Server">
  184. </div>
  185. <div class="pure-u-1">
  186. <label class="form-label" for="mqttPort">MQTT Port</label>
  187. <input name="mqttPort" type="text" class="pure-u-23-24" value="" size="21" tabindex="11" placeholder="1883">
  188. </div>
  189. <div class="pure-u-1">
  190. <label class="form-label" for="mqttUser">MQTT User</label>
  191. <input name="mqttUser" type="text" class="pure-u-23-24" value="" size="22" tabindex="12" placeholder="Leave blank if no user/pass">
  192. </div>
  193. <div class="pure-u-1">
  194. <label class="form-label" for="mqttPassword">MQTT Password</label>
  195. <input name="mqttPassword" type="text" class="pure-u-23-24" value="" size="23" tabindex="13" placeholder="Leave blank if no user/pass">
  196. </div>
  197. <div class="pure-u-1">
  198. <label class="form-label" for="mqttTopic">MQTT Topic</label>
  199. <div class="hint">Send a 0 or a 1 as a payload to the provided topic below to switch it on or off. You can also send a 2 to toggle its current state. The switch will also report its current open/close status to the same topic and its IP address, hertbeat, firmware version and file system version to the topic you define plus "/ip", "/heartbeat", "/version" and "/fsversion" respectively. </div>
  200. <input name="mqttTopic" type="text" class="pure-u-23-24" value="" size="24" tabindex="13" placeholder="Leave blank if no user/pass">
  201. </div>
  202. </div>
  203. </fieldset>
  204. </div>
  205. </div>
  206. <div class="panel" id="panel-power">
  207. <div class="header">
  208. <h1>POWER</h1>
  209. <h2>
  210. Configure your power monitor variables.
  211. </h2>
  212. </div>
  213. <div class="page">
  214. <fieldset>
  215. <div class="pure-g">
  216. <div class="pure-u-1">
  217. <label class="form-label" for="emonMains">AC RMS Voltage</label>
  218. <div class="hint">This is your house nominal voltage, you probably know this or you wont be playing with this device...</div>
  219. <select name="emonMains" class="pure-u-1-4" tabindex="40">
  220. <option value="125">125</a>
  221. <option value="220">220</a>
  222. <option value="230">230</a>
  223. <option value="240">240</a>
  224. </select>
  225. </div>
  226. <div class="pure-u-1">
  227. <label class="form-label" for="emonRatio">Current Ratio</label>
  228. <div class="hint">This is the value in amps for a 1V output for your sensor. Some current sensors like the YHDC SCT-013-030 have it written in the enclosure: 30A 1V. If you are using a current sensor that outputs a current (no built in burden resistor) it will depend on the turns ratio between the primary and secondary coils in the sensor and the burden resistor you use. Check about this constant in the <a href="https://openenergymonitor.org/emon/buildingblocks/calibration" target="_blank">post about calibration</a> in the Open Energy Monitor site.</div>
  229. <input name="emonRatio" type="text" class="pure-u-1-4" value="" size="8" tabindex="41" placeholder="0">
  230. </div>
  231. </div>
  232. </fieldset>
  233. </div>
  234. </div>
  235. </form>
  236. </div> <!-- content -->
  237. </div> <!-- layout -->
  238. </body>
  239. <!-- build:js script.js -->
  240. <script src="jquery-1.12.3.min.js"></script>
  241. <script src="checkboxes.js"></script>
  242. <script src="custom.js"></script>
  243. <!-- endbuild -->
  244. </html>