forked from dimagoltsman/Random-Broadlink-RM-Code-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
120 lines (102 loc) · 5.05 KB
/
index.html
File metadata and controls
120 lines (102 loc) · 5.05 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Broadlink RM Random Code Generator</title>
<script src="hex.js"></script>
<script src="generator.js"></script>
<script src="index.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"
integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"
integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"
integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
<style>
td {
word-break: break-all;
min-width: 90px;
}
</style>
</head>
<body>
<div class="container">
<h1>Random Broadlink RM Code Generator</h1>
<br><br>
<div class="card">
<div class="card-body" style="width: 90rem;">
<h3>Generate Random Code</h3>
<div class="row">
<label for="signal_type" class="badge-pill col col-2">type:</label>
<select id="signal_type" class="custom-select col col-2">
<option value="RF433">RF433</option>
<option value="RF315">RF315</option>
</select>
</div>
<button type="button" class="btn btn-success" onclick="startGenerate()">Generate</button>
<button type="button" class="btn btn-success" onclick="startAnalyzeNexa()">Analyze Nexa</button>
<button type="button" class="btn btn-success" onclick="startGenerateNexa()">Generate Nexa</button>
</div>
</div>
<br><br><br><br>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">Type</th>
<th scope="col">Regular code</th>
<th scope="col">same code with long repeat (for learning)</th>
</tr>
</thead>
<tbody id="restable">
</tbody>
</table>
</div>
<br><br><br><br>
<div class="card">
<div class="card-body" style="width: 90rem;">
<h3>Change number of repeats in existing code (also works for IR codes)</h3>
<br><br>
<form class="form-horizontal">
<div class="form-group">
<label for="usercode">Your code:</label>
<input type="text" class="form-control" id="usercode" placeholder="sgw0AA0kDSQkDQ0kJA0NJA0kDSQNJCQNJA0NJCQNDSQNJA0kDSQkDSQNDSQNJA0kDSQkDQwAAW8AAAAA" style="width: 65rem;" onchange="calcRepeats()">
<br><label for="repeats">Current Repeats:</label>
<b><div id="repeats" placeholder="14 (max 255)" style="width: 10rem;" >0</div></b>
</div>
<div class="form-group">
<br>
<label for="NexaID">Controller ID:</label>
<input type="text" class="form-control" id="id" placeholder="Controller Code" style="width: 10rem;">
<br>
<label for="NexaGroup">Group:</label>
<input type="text" class="form-control" id="groupflag" style="width: 10rem;">
<br>
<label for="NexaOnOff">On/Off:</label>
<input type="text" class="form-control" id="onoff" style="width: 10rem;">
<br>
<label for="NexaDevice">Device:</label>
<input type="text" class="form-control" id="device" style="width: 10rem;">
<label for="NexaDevice">Dim:</label>
<input type="text" class="form-control" id="dim" style="width: 10rem;">
<br><label for="repeats">Current Repeats:</label>
<b><div id="repeats" placeholder="14 (max 255)" style="width: 10rem;" >0</div></b>
</div>
<input type="text" class="form-control" id="newrepeat" placeholder="New Repeats (max 255)" style="width: 13rem;">
<br>
<button type="button" class="btn btn-success" onclick="generateNewRepeat()">Generate</button>
<div class="form-group">
<br>
<input type="text" class="form-control" id="newcode" placeholder="New Code" style="width: 65rem;">
</div>
</form>
</div>
</div>
</div>
<div style="margin-top: 100px; margin-left: 20px;">
you are welcome to contribute: <a href="https://github.com/dimagoltsman/Random-Broadlink-RM-Code-Generator">https://github.com/dimagoltsman/Random-Broadlink-RM-Code-Generator</a>
</div>
</body>
</html>