-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlights.htm
354 lines (354 loc) · 23.2 KB
/
lights.htm
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html><html><head><title id="Tabs">LED's verwalten</title><!-- Versions-Monitor: sv 1.14.0.2023.09.19 --><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/5.9.55/css/materialdesignicons.min.css" integrity="sha512-vIgFb4o1CL8iMGoIF7cYiEVFrel13k/BkTGvs0hGfVnlbV6XjAA0M0oEHdWqGdAVRTDID3vIZPOHmKdrMAUChA==" crossorigin="anonymous" /><style type="text/css" media="all">
*{font-family:Avant Garde, verdana, Magneto, Comic Sans MS, arial,sans-serif,Times New Roman,serif; list-style:none; color:rgb(245,245,245);}
body{margin:0;border:0; scrollbar-width: auto; scrollbar-color: rgb(0,0,0) rgb(245,245,245); color: rgb(245,245,245); background-color: #37474f; display:flex; flex-flow:row wrap; font-size:10pt;}
body::-webkit-scrollbar{width:20px;height:20px;}
body::-webkit-scrollbar-track{background-color:#37474f;}
body::-webkit-scrollbar-thumb{background-color:black; border-radius:10px; border:1px solid #00f0f0;}
.room{background-color:#455a64;padding:5px;border-radius:20px;color:#eee;margin-bottom:1px;}
.room > div{display:inline-block;width:88px;height:110px;background-color:#56676f;border-radius:10px;padding:5px;}
.favorit{font-size:2em;cursor:pointer;color:#00FFFF;}
.relay{font-size:3em;cursor:pointer;}
.relay:hover{background-color:#444;}
.relay big {font-size:0.4em;position:absolute;margin-left:-28px;margin-top:30px;opacity:0.7;z-index:0;}
.schalter{cursor:pointer;}
.uhr{font-size:1em;text-align:center;}
h4{margin:0;margin-bottom:3px;text-align:center;background-image: linear-gradient(to left, violet, cornflowerblue, lightblue, lime, yellow, orange, red); -webkit-background-clip: text; color: transparent;}
table{vertical-align:top;margin:0;height:1%;}
form{display:inline;}
form.cloud{display:none;}
fieldset{padding:3px;border-radius:6px;}
label.schreiben{cursor:hand;cursor:pointer;}
td.liste{border-style:solid;border-width:1px;border-color:#f5f5f5;}
textarea{overflow:auto;}
iframe{background-color:#f5f5f5;}
.on{background-color:lime;color:black;}
.stop{background-color:white;color:red;}
.off{background-color:tomato;color:white;}
.knopf{background-color:black;color:white;}
a:hover{color:white;position:relative;right:1px;top:1px;text-decoration:none;}
a{color:#ffffff;text-decoration:none;}
ol{margin:0;}
legend, ul, ol{white-space:nowrap;}
</style><script>
let Dauer = 5; // aller wieviel Sekunden soll neu gelesen werden?
let dimpos = 0;
let effpos = 0;
let duopos = 0;
let weisspos = 0;
let dimsequence = [
'75',
'50',
'25',
'10',
'1', // ggf. 4% Minimum bei vielen DunkelFarben
'10',
'25',
'50',
'75',
'100',
];
let weisstemperatur = [
'5800',
'5100',
'4400',
'3700',
'3000',
'3700',
'4400',
'5100',
'5800',
'6500',
];
let duotemperatur = [
'4600',
'2700',
'4600',
'6500',
];
let BulbEffekte = [
'0',
'1',
'2',
'3',
];
function BulbDimmen(ip, shellytype, relayindex, woc, ud) {
dimpos++;
if (dimsequence.length === dimpos) {
dimpos = 0;
};
fetch('http://' + ip + '/' + shellytype + '/' + relayindex + '?' + woc + '=' + dimsequence[dimpos])
.then()
.catch(err => alert(shellytype + ' Dimmen fehlgeschlagen'));
};
function WeissTemp(ip, shellytype, ud) {
weisspos++;
if (weisstemperatur.length === weisspos) {
weisspos = 0;
};
fetch('http://' + ip + '/' + shellytype + '/0?temp=' + weisstemperatur[weisspos])
.then()
.catch(err => alert('Weisstemperatur stellen fehlgeschlagen'));
};
function DuoTemp(ip, shellytype, ud) {
duopos++;
if (duotemperatur.length === duopos) {
duopos = 0;
};
fetch('http://' + ip + '/' + shellytype + '/0?temp=' + duotemperatur[duopos])
.then()
.catch(err => alert('Weisstemperatur der DUO stellen fehlgeschlagen'));
};
function EffekteSchalten(ip, shellytype, ud) {
effpos++;
if (BulbEffekte.length === effpos) {
effpos = 0;
};
fetch('http://' + ip + '/' + shellytype + '/0?effect=' + BulbEffekte[effpos])
.then()
.catch(err => alert('Effekte schalten fehlgeschlagen'));
};
function ToggleShelly(shellytype, relayindex, ip) {
fetch('http://' + ip +'/'+ shellytype +'/' + relayindex + '?turn=toggle')
.then()
.catch(err => alert('Umschalten hat nicht funktioniert'));
}
function Farbwechsel(ip, shellytype, ud){
// setInterval(function() {
let Bulb = ip;
let Bred = Math.round(Math.random() * 255); // für dunklere Farben etwa 100 als Multiplikator pro Farbe
let Bgreen = Math.round(Math.random() * 255);
let Bblue = Math.round(Math.random() * 255);
let Bbrightness = Math.round(Math.random() * 60); // maximal 100
fetch('http://' + Bulb + '/' + shellytype + '/0?red=' + Bred + '&green=' + Bgreen + '&blue=' + Bblue + 'white=0&gain=' + Bbrightness)
.then()
.catch(err => alert('kein ' + Bulb + ' Farbwechsel'));
// }, 6000);
// kein Link für TimerStop verbaut, Seite Neuladen stoppt den Timer, falls aktiviert
}
function BulbModus(ip, ud){
fetch('http://' + ip + '/settings?mode=' + ud)
.then()
.catch(err => alert('FarbModus' + ud + ' nicht gewechselt'));
}
function rgbToHex(r, g, b) {
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
function fuehrendeNull(wert) {
if (wert < 10) return "0" + parseInt(wert);
else return parseInt(wert);
}
function Sekundenumwandeln(Sekundenzahl) {
Sekundenzahl = Math.abs(Sekundenzahl)
if(Sekundenzahl > 86400){
return parseInt(Sekundenzahl/60/60/24)+ "d" + fuehrendeNull((Sekundenzahl/60/60)%24) + ":" + fuehrendeNull((Sekundenzahl/60)%60) + ":" + fuehrendeNull(Sekundenzahl%60);
} else if(Sekundenzahl < 60){
return fuehrendeNull(Sekundenzahl%60) + " sek.";
} else if(Sekundenzahl < 3600){
return fuehrendeNull((Sekundenzahl/60)%60) + ":" + fuehrendeNull(Sekundenzahl%60);
} else {
return fuehrendeNull((Sekundenzahl/60/60)%24) + ":" + fuehrendeNull((Sekundenzahl/60)%60) + ":" + fuehrendeNull(Sekundenzahl%60);
}
}
function loadData() {
let millis = Dauer * 1000;
setInterval(
function() {
Timer(Dauer);
let L1 = 0;
let L2 = 0;
$("div[data-ip]").each(function(){
var ip = $(this).data('ip');
var name = $(this).data('name');
var linkname = "<a href='http://" + ip + "/' title='GeräteWebseite öffnen' target='new'>" + $(this).data('name') + "</a>";
var power = $(this).data('consumption');
var shellytype = $(this).data('type');
var relayindex = $(this).data('relayindex');
var id = $(this).attr('id');
var hid = "h" + $(this).attr('id');
let content = "";
fetch('http://' + ip +'/status')
.then(response => response.json())
.then(function(data) {
var EndColorChange = "</div>";
var Rk = 255-data.lights[relayindex].red;
var Gk = 255-data.lights[relayindex].green;
var Bk = 255-data.lights[relayindex].blue;
var Rh = data.lights[relayindex].red;
var Gh = data.lights[relayindex].green;
var Bh = data.lights[relayindex].blue;
var Schriftfarbe = rgbToHex(Rk, Gk, Bk);
var Hintergrundfarbe = rgbToHex(Rh, Gh, Bh);
if (data.lights[relayindex].mode === 'color'){
var Leuchtmittelfarbe = Hintergrundfarbe;
var Helligkeit = data.lights[relayindex].gain;
if(Helligkeit < 4){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-outline"></i>';
} else if(Helligkeit > 3 && Helligkeit < 23){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-1"></i>';
} else if(Helligkeit > 22 && Helligkeit < 28){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-2"></i>';
} else if(Helligkeit > 27 && Helligkeit < 48){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-3"></i>';
} else if(Helligkeit > 47 && Helligkeit < 53){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-4"></i>';
} else if(Helligkeit > 52 && Helligkeit < 73){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-5"></i>';
} else if(Helligkeit > 72 && Helligkeit < 78){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-6"></i>';
} else if(Helligkeit > 77 && Helligkeit < 98){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-7"></i>';
} else {var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-8"></i>';}
var woc = "gain";
var Effektwechsel = ' Klick für Effektwechsel';
var Effeckt = data.lights[relayindex].effect;
if(Effeckt === 1){var LichtShow = '<i style="color:#ff0;" title="Meteor Shower - Meteorregen' + Effektwechsel + '" class="relay-off mdi mdi-meteor"></i>';
} else if(Effeckt === 2){var LichtShow = '<i style="color:#f0f;" title="Gradual Change - Allmähliche Veränderung' + Effektwechsel + '" class="relay-off mdi mdi-spray"></i>';
} else if(Effeckt === 3 && data.meters[relayindex].power > 0){var LichtShow = '<i style="color:#f00;" title="Flash - Blinken' + Effektwechsel + '" class="relay-off mdi mdi-alarm-light"></i>';
} else if(Effeckt === 3 && data.meters[relayindex].power < 1){var LichtShow = '<i style="color:#f00;" title="Flash - Blinken' + Effektwechsel + '" class="relay-off mdi mdi-alarm-light-outline"></i>';
} else {var LichtShow = '<i style="color:#888;" title="Effects Off - kein Effekt' + Effektwechsel + '" class="relay-off mdi mdi-alarm-light-off-outline"></i>';}
var onRGBW = "rgb(" + data.lights[relayindex].red + " " + data.lights[relayindex].green + " " + data.lights[relayindex].blue + ")";
if(shellytype === 'light'){
var ColorModus = "<big><nobr title=\"Klick für Color- oder WeissModus\" class=\"schalter\" onclick=\"BulbModus(\'" + ip + "\', \'white\');\">©</nobr><nobr class=\"schalter\" onclick=\"EffekteSchalten(\'" + ip + "\', \'" + shellytype + "\');\">" + LichtShow + " </nobr><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
} else {
var ColorModus = "<big><nobr class=\"schalter\" onclick=\"EffekteSchalten(\'" + ip + "\', \'" + shellytype + "\');\">" + LichtShow + " </nobr><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
}
var ColorChange = "<div title=\"Klick für Farbwechsel\" class=\"schalter\" onclick=\"Farbwechsel(\'" + ip + "\', \'" + shellytype + "\');\">";
if (data.lights[relayindex].timer_remaining === 0) {
var SEK = "";
} else {
let wirklicheZeit = Sekundenumwandeln(data.lights[relayindex].timer_remaining);
var SEK = "<span title=\"noch bis An oder Aus\">" + wirklicheZeit + "</span>";
};
} else {
var Helligkeit = data.lights[relayindex].brightness;
if(Helligkeit < 4){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-outline"></i>';
} else if(Helligkeit > 3 && Helligkeit < 23){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-1"></i>';
} else if(Helligkeit > 22 && Helligkeit < 28){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-2"></i>';
} else if(Helligkeit > 27 && Helligkeit < 48){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-3"></i>';
} else if(Helligkeit > 47 && Helligkeit < 53){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-4"></i>';
} else if(Helligkeit > 52 && Helligkeit < 73){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-5"></i>';
} else if(Helligkeit > 72 && Helligkeit < 78){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-6"></i>';
} else if(Helligkeit > 77 && Helligkeit < 98){var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-7"></i>';
} else {var Dimmer = '<i style="color:#00FFFF;" class="relay-off mdi mdi-circle-slice-8"></i>';}
var woc = "brightness";
var onRGBW = "mode: " + data.lights[relayindex].mode + ", Temp: " + data.lights[relayindex].temp + "K";
var Leuchtmittelfarbe = "#ffffff";
// Colorbulb-Umschalter im Weissmodus einblenden und bei DUO, RGBW2 sowie Dimmer(immer weiss) ausblenden
if(typeof data.lights[relayindex].mode !== 'undefined'){
if(data.calib_progress >= 1){
var ColorModus = "<big><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
} else {
if(shellytype === 'light'){
var ColorModus = "<big><nobr title=\"Klick für Color- oder WeissModus\" class=\"schalter\" onclick=\"BulbModus(\'" + ip + "\', \'color\');\">© </nobr><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
} else {
var ColorModus = "<big><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
}
}
} else {
var ColorModus = "<big><nobr title=\"Klick für eingestellte Dimmstufen\" class=\"schalter\" onclick=\"BulbDimmen(\'" + ip + "\', \'" + shellytype + "\', \'" + relayindex + "\', \'" + woc + "\');\">" + Dimmer + " </nobr></big>";
};
if(typeof data.lights[relayindex].red !== 'undefined'){
var ColorChange = "<div title=\"Klick für WeissTemperatur\" class=\"schalter\" onclick=\"WeissTemp(\'" + ip + "\', \'" + shellytype + "\');\">";
} else if(data.lights[relayindex].temp > 2699){
var ColorChange = "<div title=\"Klick für WeissTemperatur\" class=\"schalter\" onclick=\"DuoTemp(\'" + ip + "\', \'" + shellytype + "\');\">";
} else {
var ColorChange = "";
}
if (data.lights[relayindex].timer_remaining === 0) {
var SEK = "";
} else {
let wirklicheZeit = Sekundenumwandeln(data.lights[relayindex].timer_remaining);
var SEK = "<span title=\"noch bis An oder Aus\">" + wirklicheZeit + "</span>";
};
}
let FWN = data.update.new_version;
let FWO = data.update.old_version;
let NFW = "";
if(FWN === FWO){
FWN = "";
NFW = "";
} else {
if(data.cloud.connected === false){
NFW = "<big style='color:#ff0' title='" + name + " nicht mit Internet/Cloud verbunden'><nobr><i style='color:#FFFF00;' class='relay-off mdi mdi-cloud-off-outline'></i></a></nobr></big>";
} else {
NFW = "<big style='color:#ff0' title='" + name + " nicht mit FirmwareServer verbunden oder neue Firmware vorhanden: " + FWN + " Klick für Update, nur wenn NEUE Version in der Info angezeigt wird'><nobr><a href='http://" + ip + "/ota?update=1' target='schalter'><i style='color:#FFFF00;' class='relay-off mdi mdi-rotate-3d-variant'></i></a></nobr></big>";
}
}
content += "<div>" + linkname + "</div>";
if(data.lights[relayindex].ison == true)
if(id > 0 && id < 5)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="'+ onRGBW + ' accesskey ' + id + '" style="color:' + Leuchtmittelfarbe + ';" class="relay relay-off mdi mdi-track-light"><big accesskey="' + id + '"></big></i></div>';
else
if(id > 4 && id < 8)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="'+ onRGBW + ' accesskey ' + id + '" style="color:' + Leuchtmittelfarbe + ';" class="relay relay-off mdi mdi-ceiling-light"><big accesskey="' + id + '"></big></i></div>';
else
if(id == 8)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="' + onRGBW + ' accesskey ' + id + '" style="color:' + Leuchtmittelfarbe + ';" class="relay relay-off mdi mdi-coach-lamp"><big accesskey="' + id + '"></big></i></div>';
else
if(id == 9)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="' + onRGBW + ' accesskey ' + id + '" style="color:' + Leuchtmittelfarbe + ';" class="relay relay-off mdi mdi-lamp"><big accesskey="' + id + '"></big></i></div>';
else
if(id == 0)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="' + onRGBW + ' accesskey ' + id + '" style="color:' + Leuchtmittelfarbe + ';" class="relay relay-off mdi mdi-led-strip-variant"><big accesskey="' + id + '"></big></i></div>';
else
if(id > 11 && id < 18)
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="'+ onRGBW + ' accesskey ' + id + '" style="color:' + onRGBW + ';" class="relay relay-off mdi mdi-led-strip-variant"><big accesskey="' + id + '"></big></i></div>';
else
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\', '+ relayindex + ' ,\'' + ip + '\');"><i title="Ausschalten accesskey ' + id + '" style="color:#ffffff;" class="relay relay-off mdi mdi-lightbulb-on-outline"><big accesskey="' + id + '"></big></i></div>';
else
content += '<div style="width:100%; text-align: center;" onclick="ToggleShelly(\'' + shellytype + '\',' + relayindex + ',\'' + ip + '\');"><i title="Anschalten accesskey ' + id + '" style="color:#000000;" class="relay relay-off mdi mdi-lightbulb-outline"><big accesskey="' + id + '">Aus</big></i></div>';
content += "<div style=\"text-align: center; padding-top: 1px; \">";
if(typeof data.meters[relayindex].power !== 'undefined')
L1 = data.meters[relayindex].power;
L2 += L1;
L3 = L2.toFixed(2);
L4 = L2.toFixed(0);
if (data.meters[relayindex].power > 0)
content += ColorChange + "<nobr style=\"background-color:" + Hintergrundfarbe + "; color:" + Schriftfarbe + ";\"> " + data.meters[relayindex].power + "W " + Helligkeit + "% </nobr><br>" + SEK + EndColorChange;
else if (data.lights.overpower === false)
content += "<big style=\"color:#00ffff;\" title=\"kein PowerMetering\">-</big><br>" + SEK;
else
content += "<i style=\"color:" + Hintergrundfarbe + "\" title=\"keine Leistungsabnahme\" class=\"relay-off mdi mdi-brightness-1\"></i><br>" + SEK;
content += "<fieldset style='width:88%;'><legend style='text-align:left;'>" + ColorModus + NFW +"</legend></fieldset>";
content += "</div>";
$('#' + id ).html(content);
document.getElementById("Alles").innerHTML = "<b style=\"text-align: center; color:#10ff00;\">" + L3 + " </b>";
document.getElementById("Tabs").innerHTML = "alle Lichter: " + L4 + " Watt";
})
});
}, millis
)
}
function Timer(s) {
document.getElementById("wieoft").innerHTML=s;
s--;
if (s > 0) {
window.setTimeout('Timer(' + s + ')', 999);
} else {
s = Dauer;
}
}
</script></head><body scroll="auto">
<table><tr><!-- For RGBW2 dara-type = color or white and data-relayindex = 0-3 -->
<td><div class="room"><h4><a href="4fachTasterArbeitszimmer.png" target="rechts" title="BedienungInfo">Büro</a></h4><div id="1" data-consumption="true" data-type="light" data-relayindex="0" data-name="Sonne" data-ip="192.168.178.101"></div></div></td>
<td><div class="room"><h4>Büro</a></h4><div id="2" data-consumption="true" data-type="light" data-relayindex="0" data-name="Mond" data-ip="192.168.178.102"></div></div></td>
<td><div class="room"><h4>Büro</a></h4><div id="3" data-consumption="true" data-type="light" data-relayindex="0" data-name="Mars" data-ip="192.168.178.103"></div></div></td>
<td><div class="room"><h4>Büro</a></h4><div id="4" data-consumption="true" data-type="light" data-relayindex="0" data-name="Venus" data-ip="192.168.178.104"></div></div></td>
<td><div class="room"><h4>Bad</a></h4><div id="0" data-consumption="true" data-type="color" data-relayindex="0" data-name="LED-Strip" data-ip="192.168.178.93"></div></div></td>
</tr><tr>
<td><div class="room"><h4><a href="4fachTasterWohnzimmer.png" target="rechts" title="BedienungInfo">WZ</a></h4><div id="5" data-consumption="true" data-type="light" data-relayindex="0" data-name="Erde" data-ip="192.168.178.105"></div></div></td>
<td><div class="room"><h4>WZ</a></h4><div id="6" data-consumption="true" data-type="light" data-relayindex="0" data-name="Saturn" data-ip="192.168.178.106"></div></div></td>
<td><div class="room"><h4>WZ</a></h4><div id="7" data-consumption="true" data-type="light" data-relayindex="0" data-name="Merkur" data-ip="192.168.178.107"></div></div></td>
<td><div class="room"><h4>Außentreppe</h4><div id="8" data-consumption="true" data-type="light" data-relayindex="0" data-name="Uranus" data-ip="192.168.178.108"></div></div></td>
<td><div class="room"><h4>Nachttisch</a></h4><div id="9" data-consumption="true" data-type="light" data-relayindex="0" data-name="Jupiter" data-ip="192.168.178.109"></div></div></td>
</tr><!-- tr>
<td><div class="room"><h4>G125</h4><div id="10" data-consumption="true" data-type="light" data-relayindex="0" data-name="Vintage" data-ip="192.168.178.119"></div></div></td>
<td><div class="room"><h4>Reserve</h4><div id="11" data-consumption="true" data-type="light" data-relayindex="0" data-name="Dimmer" data-ip="192.168.178.100"></div></div></td>
<td><div class="room"><h4>Reserve</h4><div id="12" data-consumption="true" data-type="white" data-relayindex="0" data-name="LED-Strip 1" data-ip="192.168.178.93"></div></div></td>
<td><div class="room"><h4>Reserve</h4><div id="13" data-consumption="true" data-type="white" data-relayindex="1" data-name="LED-Strip 2" data-ip="192.168.178.93"></div></div></td>
<td><div class="room"><h4>Reserve</h4><div id="14" data-consumption="true" data-type="white" data-relayindex="2" data-name="LED-Strip 3" data-ip="192.168.178.93"></div></div></td>
<td><div class="room"><h4>Reserve</h4><div id="15" data-consumption="true" data-type="white" data-relayindex="3" data-name="LED-Strip 4" data-ip="192.168.178.93"></div></div></td>
</tr --><tr>
<td colspan="8"><div class="room"><fieldset><legend>Daten werden nach <span id="wieoft"></span> Sekunden <a href="javascript:location.reload()">aktualisiert</a><iframe src="about:blank" width="0" height="0" name="schalter"></iframe></legend>
<!-- big style="color:#ff0000">• </big><small style="color:#ffff00">keine LeistungsAbnahme</small> • <big style="color:#00ffff">- </big><small style="color:#00ffff">keine LeistungsMessung</small><br -->
<div style="width:100%; text-align:center;"><table style="width:100%; text-align:center;"><tr><td style="width:50%; text-align:right;"><big id="Alles" style="color:#10ff00"></big></td><td style="width:50%; text-align:left;"><b><big style="color:#10ff00">Watt</big></b></td></tr></table></div>
</fieldset></div></td></tr></table>
<script>
$( document ).ready(function() {
loadData();
Timer(Dauer);
})
</script></body></html>