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.

284 lines
14 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
  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-wifi">WIFI</a>
  30. </li>
  31. <li class="pure-menu-item">
  32. <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
  33. </li>
  34. <li class="pure-menu-item">
  35. <a href="#" class="pure-menu-link" data="panel-power">POWER</a>
  36. </li>
  37. </ul>
  38. <div class="center">
  39. <button class="pure-button button-update">Update</button>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="content">
  44. <div class="panel" id="panel-status" style="display: block;">
  45. <div class="header">
  46. <h1>STATUS</h1>
  47. <h2>Current configuration</h2>
  48. </div>
  49. <div class="page">
  50. <form class="pure-form pure-form-aligned">
  51. <fieldset>
  52. <div class="pure-g">
  53. <label class="pure-u-1 pure-u-sm-1-4" for="manufacturer">Manufacturer</label>
  54. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="manufacturer" disabled>
  55. </div>
  56. <div class="pure-g">
  57. <label class="pure-u-1 pure-u-sm-1-4" for="device">Device</label>
  58. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="device" disabled>
  59. </div>
  60. <div class="pure-g">
  61. <label class="pure-u-1 pure-u-sm-1-4" for="hostname">Hostname</label>
  62. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="hostname" readonly />
  63. </div>
  64. <div class="pure-g">
  65. <label class="pure-u-1 pure-u-sm-1-4" for="network">Network</label>
  66. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="network" readonly />
  67. </div>
  68. <div class="pure-g">
  69. <label class="pure-u-1 pure-u-sm-1-4" for="ip">IP</label>
  70. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="ip" readonly />
  71. </div>
  72. <div class="pure-g">
  73. <label class="pure-u-1 pure-u-sm-1-4" for="mqtt">MQTT Status</label>
  74. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="mqttStatus" readonly />
  75. </div>
  76. <div class="pure-g">
  77. <label class="pure-u-1 pure-u-sm-1-4" for="temperature">Temperature (ºC)</label>
  78. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="temperature" readonly />
  79. </div>
  80. <div class="pure-g">
  81. <label class="pure-u-1 pure-u-sm-1-4" for="humidity">Humidity (%)</label>
  82. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="humidity" readonly />
  83. </div>
  84. <div class="pure-g">
  85. <label class="pure-u-1 pure-u-sm-1-4" for="power">Power (W)</label>
  86. <input class="pure-u-1 pure-u-sm-3-4" type="text" name="power" readonly />
  87. </div>
  88. <div class="pure-g">
  89. <div class="pure-u-1 pure-u-sm-1-4"><label for="relayStatus">Relay Status</label></div>
  90. <div class="pure-u-1 pure-u-sm-1-4"><input type="checkbox" name="relayStatus" /></div>
  91. </div>
  92. </fieldset>
  93. </form>
  94. </div>
  95. </div>
  96. <form id="formSave" class="pure-form pure-form-stacked" action="/" method="post">
  97. <div class="panel" id="panel-wifi">
  98. <div class="header">
  99. <h1>WIFI</h1>
  100. <h2>You can configure up to 3 different WiFi networks. The device will try to connect in order of signal strength.</h2>
  101. </div>
  102. <div class="page">
  103. <fieldset>
  104. <legend>First network</legend>
  105. <div class="pure-g">
  106. <div class="pure-u-1 pure-u-md-1-2">
  107. <label for="ssid">SSID</label>
  108. <input type="text" class="pure-u-23-24" tabindex="10" name="ssid">
  109. </div>
  110. <div class="pure-u-1 pure-u-md-1-2">
  111. <label for="pass">Password</label>
  112. <input type="text" class="pure-u-23-24" tabindex="11" name="pass">
  113. </div>
  114. </div>
  115. <legend>Second network</legend>
  116. <div class="pure-g">
  117. <div class="pure-u-1 pure-u-md-1-2">
  118. <label for="ssid">SSID</label>
  119. <input type="text" class="pure-u-23-24" tabindex="12" name="ssid">
  120. </div>
  121. <div class="pure-u-1 pure-u-md-1-2">
  122. <label for="pass">Password</label>
  123. <input type="text" class="pure-u-23-24" tabindex="13" name="pass">
  124. </div>
  125. </div>
  126. <legend>Third network</legend>
  127. <div class="pure-g">
  128. <div class="pure-u-1 pure-u-md-1-2">
  129. <label for="ssid">SSID</label>
  130. <input type="text" class="pure-u-23-24" tabindex="14" name="ssid">
  131. </div>
  132. <div class="pure-u-1 pure-u-md-1-2">
  133. <label for="pass">Password</label>
  134. <input type="text" class="pure-u-23-24" tabindex="15" name="pass">
  135. </div>
  136. </div>
  137. </fieldset>
  138. </div>
  139. </div>
  140. <div class="panel" id="panel-mqtt">
  141. <div class="header">
  142. <h1>MQTT</h1>
  143. <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>
  144. </div>
  145. <div class="page">
  146. <fieldset>
  147. <div class="pure-g">
  148. <div class="pure-u-1">
  149. <label class="form-label" for="mqttServer">MQTT Server</label>
  150. <input name="mqttServer" type="text" class="pure-u-23-24" value="" size="20" tabindex="10" placeholder="MQTT Server">
  151. </div>
  152. <div class="pure-u-1">
  153. <label class="form-label" for="mqttPort">MQTT Port</label>
  154. <input name="mqttPort" type="text" class="pure-u-23-24" value="" size="21" tabindex="11" placeholder="1883">
  155. </div>
  156. <div class="pure-u-1">
  157. <label class="form-label" for="mqttUser">MQTT User</label>
  158. <input name="mqttUser" type="text" class="pure-u-23-24" value="" size="22" tabindex="12" placeholder="Leave blank if no user/pass">
  159. </div>
  160. <div class="pure-u-1">
  161. <label class="form-label" for="mqttPassword">MQTT Password</label>
  162. <input name="mqttPassword" type="text" class="pure-u-23-24" value="" size="23" tabindex="13" placeholder="Leave blank if no user/pass">
  163. </div>
  164. <div class="pure-u-1">
  165. <label class="form-label" for="mqttTopic">MQTT Topic</label>
  166. <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>
  167. <input name="mqttTopic" type="text" class="pure-u-23-24" value="" size="24" tabindex="13" placeholder="Leave blank if no user/pass">
  168. </div>
  169. </div>
  170. </fieldset>
  171. </div>
  172. </div>
  173. <div class="panel" id="panel-power">
  174. <div class="header">
  175. <h1>POWER</h1>
  176. <h2>
  177. Configure your power monitor variables.
  178. </h2>
  179. </div>
  180. <div class="page">
  181. <fieldset>
  182. <div class="pure-g">
  183. <div class="pure-u-1">
  184. <label class="form-label" for="pwMainsVoltage">AC RMS Voltage</label>
  185. <div class="hint">This is your house nominal voltage, you probably know this or you wont be playing with this device...</div>
  186. <select name="pwMainsVoltage" class="pure-u-1-4" tabindex="40">
  187. <option value="125">125</a>
  188. <option value="220">220</a>
  189. <option value="230">230</a>
  190. <option value="240">240</a>
  191. </select>
  192. </div>
  193. <div class="pure-u-1">
  194. <label class="form-label" for="pwCurrentRatio">Current Ratio</label>
  195. <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>
  196. <input name="pwCurrentRatio" type="text" class="pure-u-1-4" value="" size="8" tabindex="41" placeholder="0">
  197. </div>
  198. </div>
  199. </fieldset>
  200. </div>
  201. </div>
  202. </form>
  203. </div> <!-- content -->
  204. </div> <!-- layout -->
  205. </body>
  206. <!-- build:js script.js -->
  207. <script src="jquery-1.12.3.min.js"></script>
  208. <script src="checkboxes.js"></script>
  209. <script src="custom.js"></script>
  210. <!-- endbuild -->
  211. </html>