-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathexample.html
29 lines (28 loc) · 1.12 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>pyPowerwall Proxy iFrame Example</title>
</head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<body style="text-align: center; background-color:#111217;">
<h1 style="color:white;font-family:verdana;">Tesla Powerwall Power Flows</h1>
<h2 style="color:gray;font-family:verdana;">iFrame Example</h2>
<!-- change src to be the address of you pyPowerwall host address -->
<iframe id="frame" src="/" width="500" height="300" frameBorder="0">
IFRAME not supported by browser.
</iframe>
<p class="version" style="color:gray;font-family:verdana;">Firmware</p>
</body>
<script>
// Get Firmware Version
function showversion() {
var pwver = window.location.protocol + "//" + window.location.hostname + ":8675/version";
$.getJSON(pwver, function(data) {
var text = `Firmware: ${data.version}`;
$(".version").html(text);
});
setTimeout(showversion, 10000);
}
showversion();
</script>
</html>