sysinfo 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <html><head>
  2. <meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
  3. <link rel='stylesheet' href='style.css'>
  4. <title>WiFiThermostat - WTherm-3598</title>
  5. <script>
  6. function g(i) { return document.getElementById(i) };
  7. var xhttp, updateTime, reqTime, reqFin;
  8. function transmit(f) {
  9. if (!xhttp) {
  10. reqTime = 0;
  11. reqFin = false;
  12. xhttp = new XMLHttpRequest();
  13. xhttp.timeout = 1000;
  14. xhttp.overrideMimeType("application/json");
  15. xhttp.open('GET', 'sysinfod');
  16. xhttp.send(f ? (new FormData(f)) : '');
  17. xhttp.onreadystatechange = function () {
  18. if (xhttp.readyState === XMLHttpRequest.DONE && xhttp.status === 200) {
  19. var data = JSON.parse(xhttp.responseText);
  20. if(data.DevName !== undefined) g('DevName').innerHTML = data.DevName;
  21. if(data.HostName !== undefined) g('HostName').innerHTML = data.HostName;
  22. if(data.SSID !== undefined) g('SSID').innerHTML = data.SSID;
  23. if(data.WiFiConf !== undefined) {
  24. if(data.WiFiConf == 1) g('WiFiConf').innerHTML = 'Default';
  25. else if(data.WiFiConf == 2) g('WiFiConf').innerHTML = 'Fallback';
  26. else g('WiFiConf').innerHTML = data.WiFiConf;
  27. }
  28. if(data.MAC !== undefined) g('MAC').innerHTML = data.MAC;
  29. if(data.IP !== undefined) g('IP').innerHTML = data.IP;
  30. if(data.GW !== undefined) g('GW').innerHTML = data.GW;
  31. if(data.DNS !== undefined) g('DNS').innerHTML = data.DNS;
  32. if(data.UpTime !== undefined) g('UpTime').innerHTML = data.UpTime;
  33. if(data.HeapFree !== undefined) g('HeapFree').innerHTML = data.HeapFree + ' Bytes';
  34. if(data.HeapFragment !== undefined) g('HeapFragment').innerHTML = data.HeapFragment + ' %';
  35. if(data.HeapMaxBlock !== undefined) g('HeapMaxBlock').innerHTML = data.HeapMaxBlock + ' Bytes';
  36. if(data.ResetReason !== undefined) g('ResetReason').innerHTML = data.ResetReason;
  37. if(data.FWName !== undefined) g('FWName').innerHTML = data.FWName;
  38. if(data.FWVer !== undefined) g('FWVer').innerHTML = data.FWVer;
  39. if(data.FWBuilt !== undefined) g('FWBuilt').innerHTML = data.FWBuilt;
  40. if(data.FWCr !== undefined) g('FWCr').innerHTML = data.FWCr;
  41. if(data.FWDebug !== undefined) g('FWDebug').innerHTML = data.FWDebug;
  42. if(data.CoreVersion !== undefined) g('CoreVersion').innerHTML = data.CoreVersion;
  43. if(data.SDKVersion !== undefined) g('SDKVersion').innerHTML = data.SDKVersion;
  44. if(data.CPUfreq !== undefined) g('CPUfreq').innerHTML = data.CPUfreq + ' MHz';
  45. if(data.SketchSize !== undefined) g('SketchSize').innerHTML = data.SketchSize + ' Bytes';
  46. if(data.FlashSize !== undefined) g('FlashSize').innerHTML = data.FlashSize + ' Bytes';
  47. if(data.Time !== undefined) g('Time').innerHTML = data.Time;
  48. if(data.Date !== undefined) g('Date').innerHTML = data.Date;
  49. xhttp = null;
  50. updateTime = 0;
  51. reqFin = true;
  52. }
  53. else {
  54. if(!reqFin && reqTime > 10) {
  55. xhttp = null;
  56. reqFin = true;
  57. }
  58. }
  59. }
  60. }
  61. return false;
  62. }
  63. function init() {
  64. transmit();
  65. }
  66. setInterval(transmit, 2500);
  67. </script>
  68. </head>
  69. <body onload='init()'>
  70. <div id='main'>
  71. <div id='head'>WiFiThermostat - WTherm-3598
  72. </div><hr>
  73. <div></div>
  74. <p><b>System Information</b></p>
  75. <table style='width:100%'>
  76. <tr><td>Device Name</td><td><span id='DevName'></td></tr>
  77. <tr><td colspan='2'>&nbsp;</td></tr>
  78. <tr><td>Host Name</td><td><span id='HostName'></td></tr>
  79. <tr><td>SSID</td><td><span id='SSID'></td></tr>
  80. <tr><td>WiFi-Conf</td><td><span id='WiFiConf'></td></tr>
  81. <tr><td>MAC</td><td><span id='MAC'></td></tr>
  82. <tr><td>IP</td><td><span id='IP'></td></tr>
  83. <tr><td>Gateway</td><td><span id='GW'></td></tr>
  84. <tr><td>DNS</td><td><span id='DNS'></td></tr>
  85. <tr><td colspan='2'>&nbsp;</td></tr>
  86. <tr><td colspan='2'>Heap Memory</td></tr>
  87. <tr><td>&nbsp;Free</td><td><span id='HeapFree'></td></tr>
  88. <tr><td>&nbsp;Fragmentation</td><td><span id='HeapFragment'></td></tr>
  89. <tr><td>&nbsp;Max Blocksize</td><td><span id='HeapMaxBlock'></td></tr>
  90. <tr><td>CPU Frequency</td><td><span id='CPUfreq'></td></tr>
  91. <tr><td colspan='2'>&nbsp;</td></tr>
  92. <tr><td colspan='2'>Firmware</td></tr>
  93. <tr><td>Name</td><td><span id='FWName'></td></tr>
  94. <tr><td>Version</td><td><span id='FWVer'></td></tr>
  95. <tr><td>Built Date</td><td><span id='FWBuilt'></td></tr>
  96. <tr><td>Created by</td><td><span id='FWCr'></td></tr>
  97. <tr><td>Debug Version</td><td><span id='FWDebug'></td></tr>
  98. <tr><td>Core Version</td><td><span id='CoreVersion'></td></tr>
  99. <tr><td>SDK Version</td><td><span id='SDKVersion'></td></tr>
  100. <tr><td>Sketch Size</td><td><span id='SketchSize'></td></tr>
  101. <tr><td>Flash Size</td><td><span id='FlashSize'></td></tr>
  102. <tr><td colspan='2'>&nbsp;</td></tr>
  103. <tr><td>Date</td><td><span id='Date'></td></tr>
  104. <tr><td>Time</td><td><span id='Time'></td></tr>
  105. <tr><td>Reset Reason</td><td><span id='ResetReason'></td></tr>
  106. <tr><td>UpTime</td><td><span id='UpTime'></td></tr>
  107. </table>
  108. <table style='width:100%'>
  109. <tr>
  110. <td style='width:100%'><button onclick='location=".";' class='bgrey'>Close</button></td>
  111. </tr></table>
  112. <div></div>
  113. <div style='text-align:right;font-size:0.7em;color:#AAA;'><hr/><a href='https://git.flokra.at/flo/WiFiThermostat' target='_blank' style='color:#AAA;'>WiFiThermostat</a> 0.6.1 by <a href='https://www.flokra.at/' target='_blank' style='color:#AAA;'>FloKra</a></div>
  114. </div></body></html>