blob: 69fcd31bed49a1ed801ea95a351646cbf3cf8c62 (
plain)
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
83
84
85
86
87
88
89
90
|
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>edaweb power monitor</title>
<!-- JQuery and JQurty UI current version -->
<script src='https://code.jquery.com/jquery-3.6.0.js'></script>
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
<!-- Highcharts libraries -->
<script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/highcharts-more.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/export-data.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/accessibility.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/maps/modules/map.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/mapdata/custom/world-robinson.js"></script>
<!-- local Javascript files -->
<script type="text/javascript" src="{{ url_for('static', filename='scripts.js') }}"></script>
<!-- remote and local CSS stylesheet -->
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header>
<h1>edaweb power monitoring</h1>
<div id="externallinks">
<nav>
<ul>
<li><a href="http://eda.gay">eda.gay</a></li>
<li><a href="http://wiki.eda.gay">wiki.eda.gay</a></li>
</ul>
</nav>
</div>
</header>
<div id="main_content">
<div id="multicharts">
<ul id="charts_ul">
<li>
<figure class="chart_container">
<div class="minichart" id="longterm_chart"></div>
</figure>
</li>
<li>
<figure class="chart_container">
<div class="minichart" id="hourly_chart"></div>
</figure>
</li>
</ul>
</div>
<table id="power_table">
<tr id="header_row">
<td>Plug local hostname</td>
<td>Plug description</td>
<td>Current power usage (W)</td>
<td>Power usage yesterday (kWh)</td>
</tr>
{% for host, description_md in tasmota_devices %}
<tr id="tr_{{ host }}">
<td><a href="http://{{ host }}" target="_blank">{{ host }}</a></td>
<td>{{ description_md|safe }}</td>
<td id="{{ host }}_watts_now"></td>
<td id="{{ host }}_watts_yesterday"></td>
</tr>
{% endfor %}
<tr id="sum_row">
<td></td>
<td></td>
<td id="sum_watts_now"></td>
<td id="sum_watts_yesterday"></td>
</tr>
</table>
</div>
<ul id="last_updated_ul">
<li id="watts_last_updated">Current power usage never updated</li>
<li id="kwh_last_updated">Yesterday's power usage never updated</li>
<li id="switch_last_updated">Switch power usage never updated</li>
</ul>
<footer>
<p><a href="https://github.com/jwansek/power.eda.gay">Source code released under GPLv3</a></p>
<p><a href="https://www.fsf.org/campaigns/freejs">Read the Free Software Foundations statements about JavaScript</a></p>
</footer>
</body>
|