forked from JackKelly/CurrentCostLogger
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpower.html
82 lines (80 loc) · 2.66 KB
/
power.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Power usage</title>
<!--meta http-equiv="refresh" content="30"/-->
<style type="text/css">
html, body { color: white; background: black; font-family: sans-serif; }
h1, h2 { color: lime; }
</style>
</head>
<body>
<div id="c">
<h1>Power use</h1>
<div id="p5m">
<p>Last five minutes</p>
<img id="p5i" widtxh="850" height="180" src="power-5min.svg" alt="Power usage graph for the last 5 minutes" />
</div>
<div id="p15m">
<p>Last fifteen minutes</p>
<img id="p15i" height="180" src="power-15min.svg" alt="Power usage graph for the last 15 minutes" />
</div>
<div id="p60m">
<p>Last hour</p>
<img id="p60i" height="180" src="power-60min.svg" alt="Power usage graph for the last hour" />
</div>
<div id="p1449m">
<p>Last day</p>
<img src="power-1440min.svg" alt="Power usage graph for the last day" />
</div>
<div id="p10080m">
<p>Last week</p>
<img src="power-10080min.svg" alt="Power usage graph for the last week" />
</div>
<div id="p43829m">
<p>Last month</p>
<img src="power-43829min.svg" alt="Power usage graph for the last month" />
</div>
<div id="p525949m">
<p>Last year</p>
<img src="power-525949min.svg" alt="Power usage graph for the last year" />
</div>
<div id="p-since-start">
<p>Last ten years (max)</p>
<img src="power-since-start.svg" alt="Power usage graph for the last 10 years, or since measurement started" />
</div>
<h2>Room temperature</h2>
<p>The temperature sensor on the power meter seems unreliable.</p>
<div id="t10080m">
<p>Last week</p>
<img src="temperature-10080min.svg" alt="Temperature graph for the last week" />
</div>
<div id="t43829m">
<p>Last month</p>
<img src="temperature-43829min.svg" alt="Temperature graph for the last month" />
</div>
<div id="t525949m">
<p>Last year</p>
<img src="temperature-525949min.svg" alt="Temperature graph for the last year" />
</div>
<div id="t-since-start">
<p>Last ten years (max)</p>
<img src="temperature-since-start.svg" alt="Temperature graph for the last 10 years, or since measurement started" />
</div>
</div>
</body>
<script type="text/javascript">
window.setInterval(update60, 60000);
function update60() {
document.images["p5i"].src = "power-5min.svg?" + new Date().getTime();
}
window.setInterval(update120, 120000);
function update120() {
document.images["p15i"].src = "power-15min.svg?" + new Date().getTime();
}
window.setInterval(update1800, 1800000);
function update1800() {
document.images["p60i"].src = "power-60min.svg?" + new Date().getTime();
}
</script>
</html>