-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathindex.html
101 lines (98 loc) · 4.25 KB
/
index.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A web interface for MQTT over Websockets">
<meta name="author" content="Fabian Affolter">
<title>Home conditions</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.2.3/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.2/mqttws31.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-2">
<a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="#">Home conditions</a>
</nav>
<div class="container-fluid">
<div id="status" class="alert">
<small>Loading...</small>
</div>
<div class="card mb-2">
<div class="row">
<div class="col-6 col-md-4">
<div class="card-body">
<div class="card-title">
Entrance
</div>
<span id="label1" class="badge w-100">Unknown</span>
</div>
</div>
<div class="col-6 col-md-4">
<div class="card-body">
<div class="card-title">
Back door
</div>
<span id="label2" class="badge w-100">Unknown</span>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card-body">
<div class="card-title">
Basement temperature
</div>
<span id="basementTempLabel" class="badge w-100">Unknown</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-md-7 mb-2">
<div class="card">
<div class="card-body">
<div class="card-title">
Living room temperature
<span id="livingTempLabel" class="text-muted float-right badge">Unknown</span>
</div>
</div>
<canvas id="tempChart" width="300" height="120"></canvas>
</div>
</div>
<div class="col-12 col-md-5">
<table class="table table-bordered table-sm table-striped mt-2">
<tbody>
<tr>
<th>Entrance</th>
<td><small id="value1">(no value received)</small></td>
</tr>
<tr>
<th>Back door</th>
<td><small id="value2">(no value received)</small></td>
</tr>
<tr>
<th>Basement temperature</th>
<td><small id="basementTempLabel">(no value received)</small></td>
</tr>
<tr>
<th>Living room temperature</th>
<td><small id="livingTempSensor">(no value received)</small></td>
</tr>
<tr>
<th>Last MQTT message</th>
<td><small id="message">no message recieved</small></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
<footer class="text-center mt-10">
<small>
<a href="https://github.com/fabaff/mqtt-panel">forked from github.com/fabaff/mqtt-panel</a>
</small>
</footer>
</div>
</body>
</html>