-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (62 loc) · 2.26 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
<!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 layout example that shows off a responsive product landing page.">
<title>MQTT on Websocket HomePortal</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>
<script src="mqtt_script.js" type="text/javascript"></script>
</script>
<div class="splash-container">
<div class="splash">
<h3 class="splash-head">HomePortal</h3>
</div>
</div>
<div class="content-wrapper">
<div class="ribbon l-box-lrg pure-g">
<div class="l-box-lrg pure-u-2-3">
<button class="clear" onclick="clearMessages()">message clear</button>
<div class="messages"></div>
</div>
<div class="pure-u-1-3">
<fieldset>
<legend>Connect / Disconnect</legend>
<button class="connect" onclick="connect()" >connect</button>
<button class="disconnect" onclick="disconnect()">disconnect</button>
</fieldset>
<br>
<fieldset>
<legend>MQTT broker on websocket</legend>
<label>
Address:
<input type="text" class="input-broker-ws" value="192.168.1.15"></label>
</fieldset>
<br>
<fieldset>
<legend>Subscribe / Unsubscribe</legend>
<label>
Topic:
<input type="text" class="topic-sub" value="homematic/status"></label>
<button class="subscribe" onclick="subscribe()">subscribe</button>
<button class="unsubscribe">unsubscribe</button>
</fieldset>
<br>
<fieldset>
<legend>Publish</legend>
<label>
Topic:
<input type="text" class="topic-pub" value="homematic/command"></label>
<label>
Message:
<input type="text" class="message" value="setTemperature_MEQ1556885_25"></label>
<button class="publish" onclick="publish()">publish</button>
</fieldset>
</div>
</div>
</div>
</body>
</html>