View difference between Paste ID: AuX41egb and QSdSY5TM
SHOW: | | - or go back to the newest paste.
1
[
2
    {
3
        "id": "ce5d7c18.92579",
4
        "type": "tab",
5-
        "label": "Day17_Rooms2",
5+
        "label": "[K3_P10 - Zeitgesteuerte Lichter]",
6
        "disabled": true,
7
        "info": ""
8
    },
9
    {
10
        "id": "d38000b4.68858",
11
        "type": "mqtt in",
12
        "z": "ce5d7c18.92579",
13
        "name": "",
14
        "topic": "NodeESP/[PID]/button/state/get/out",
15
        "qos": "2",
16
        "broker": "3c53c9b8.8965a6",
17
        "x": 200,
18
        "y": 120,
19
        "wires": [
20
            [
21
                "374e05a9.b7df0a"
22
            ]
23
        ]
24
    },
25
    {
26
        "id": "374e05a9.b7df0a",
27
        "type": "json",
28
        "z": "ce5d7c18.92579",
29
        "name": "",
30
        "property": "payload",
31
        "action": "",
32
        "pretty": false,
33
        "x": 190,
34
        "y": 180,
35
        "wires": [
36
            [
37
                "3653b639.8f685a"
38
            ]
39
        ]
40
    },
41
    {
42
        "id": "131b3bd6.0d5e54",
43
        "type": "ui_switch",
44
        "z": "ce5d7c18.92579",
45
        "name": "",
46
        "label": "LED1 (on/off)",
47
        "group": "a260dabf.f82928",
48
        "order": 1,
49
        "width": 0,
50
        "height": 0,
51
        "passthru": true,
52
        "decouple": "false",
53
        "topic": "",
54
        "style": "",
55
        "onvalue": "true",
56
        "onvalueType": "bool",
57
        "onicon": "",
58
        "oncolor": "",
59
        "offvalue": "false",
60
        "offvalueType": "bool",
61
        "officon": "",
62
        "offcolor": "",
63
        "x": 790,
64
        "y": 140,
65
        "wires": [
66
            [
67
                "44062ba.3746ed4"
68
            ]
69
        ]
70
    },
71
    {
72
        "id": "ef2a4e22.c257c",
73
        "type": "ui_switch",
74
        "z": "ce5d7c18.92579",
75
        "name": "",
76
        "label": "LED2 (on/off)",
77
        "group": "d920fbc5.d14b98",
78
        "order": 1,
79
        "width": 0,
80
        "height": 0,
81
        "passthru": true,
82
        "decouple": "false",
83
        "topic": "",
84
        "style": "",
85
        "onvalue": "true",
86
        "onvalueType": "bool",
87
        "onicon": "",
88
        "oncolor": "",
89
        "offvalue": "false",
90
        "offvalueType": "bool",
91
        "officon": "",
92
        "offcolor": "",
93
        "x": 790,
94
        "y": 220,
95
        "wires": [
96
            [
97
                "41ace90c.2e4648"
98
            ]
99
        ]
100
    },
101
    {
102
        "id": "295a58e8.6e6918",
103
        "type": "switch",
104
        "z": "ce5d7c18.92579",
105
        "name": "",
106
        "property": "payload.pin_name",
107
        "propertyType": "msg",
108
        "rules": [
109
            {
110
                "t": "eq",
111
                "v": "Button1",
112
                "vt": "str"
113
            },
114
            {
115
                "t": "eq",
116
                "v": "Button2",
117
                "vt": "str"
118
            }
119
        ],
120
        "checkall": "true",
121
        "repair": false,
122
        "outputs": 2,
123
        "x": 430,
124
        "y": 180,
125
        "wires": [
126
            [
127
                "984f0e52.8731b"
128
            ],
129
            [
130
                "715cb1ad.f2617"
131
            ]
132
        ]
133
    },
134
    {
135
        "id": "3653b639.8f685a",
136
        "type": "split",
137
        "z": "ce5d7c18.92579",
138
        "name": "",
139
        "splt": ",",
140
        "spltType": "str",
141
        "arraySplt": 1,
142
        "arraySpltType": "len",
143
        "stream": false,
144
        "addname": "",
145
        "x": 310,
146
        "y": 180,
147
        "wires": [
148
            [
149
                "295a58e8.6e6918"
150
            ]
151
        ]
152
    },
153
    {
154
        "id": "36081dd0.5bdbe2",
155
        "type": "mqtt out",
156
        "z": "ce5d7c18.92579",
157
        "name": "",
158
        "topic": "NodeESP/[PID]/pwm/state/set",
159
        "qos": "",
160
        "retain": "",
161
        "broker": "3c53c9b8.8965a6",
162
        "x": 1250,
163
        "y": 180,
164
        "wires": []
165
    },
166
    {
167
        "id": "44062ba.3746ed4",
168
        "type": "template",
169
        "z": "ce5d7c18.92579",
170
        "name": "set_pwm_state",
171
        "field": "payload",
172
        "fieldType": "msg",
173
        "format": "handlebars",
174
        "syntax": "mustache",
175
        "template": " {\"cmd\":\"set_pwm_state\",\"LED1\":{{payload}}}",
176
        "output": "str",
177
        "x": 980,
178
        "y": 140,
179
        "wires": [
180
            [
181
                "36081dd0.5bdbe2"
182
            ]
183
        ]
184
    },
185
    {
186
        "id": "41ace90c.2e4648",
187
        "type": "template",
188
        "z": "ce5d7c18.92579",
189
        "name": "set_pwm_state",
190
        "field": "payload",
191
        "fieldType": "msg",
192
        "format": "handlebars",
193
        "syntax": "mustache",
194
        "template": " {\"cmd\":\"set_pwm_state\",\"LED2\":{{payload}}}",
195
        "output": "str",
196
        "x": 980,
197
        "y": 220,
198
        "wires": [
199
            [
200
                "36081dd0.5bdbe2"
201
            ]
202
        ]
203
    },
204
    {
205
        "id": "984f0e52.8731b",
206
        "type": "function",
207
        "z": "ce5d7c18.92579",
208
        "name": "led1_pin_state",
209
        "func": "var pin_state=global.get('led1_pin_state') || false;\n\nif (!msg.payload.pin_state){\n    (pin_state===false) ? (pin_state= true) : (pin_state= false);\n    global.set('led1_pin_state', pin_state);\n    msg.payload = pin_state;\n    return msg;\n}\n",
210
        "outputs": 1,
211
        "noerr": 0,
212
        "x": 600,
213
        "y": 140,
214
        "wires": [
215
            [
216
                "131b3bd6.0d5e54"
217
            ]
218
        ]
219
    },
220
    {
221
        "id": "715cb1ad.f2617",
222
        "type": "function",
223
        "z": "ce5d7c18.92579",
224
        "name": "led2_pin_state",
225
        "func": "var pin_state=global.get('led2_pin_state') || false;\n\nif (!msg.payload.pin_state){\n    (pin_state===false) ? (pin_state= true) : (pin_state= false);\n    global.set('led2_pin_state', pin_state);\n    msg.payload = pin_state;\n    return msg;\n}\n\n",
226
        "outputs": 1,
227
        "noerr": 0,
228
        "x": 600,
229
        "y": 220,
230
        "wires": [
231
            [
232
                "ef2a4e22.c257c"
233
            ]
234
        ]
235
    },
236
    {
237
        "id": "b4f87db5.409db",
238
        "type": "mqtt in",
239
        "z": "ce5d7c18.92579",
240
        "name": "",
241
        "topic": "NodeESP/[PID]/adc/state/get/out",
242
        "qos": "2",
243
        "broker": "3c53c9b8.8965a6",
244
        "x": 190,
245
        "y": 340,
246
        "wires": [
247
            [
248
                "11a689a1.9a46a6"
249
            ]
250
        ]
251
    },
252
    {
253
        "id": "11a689a1.9a46a6",
254
        "type": "json",
255
        "z": "ce5d7c18.92579",
256
        "name": "",
257
        "property": "payload",
258
        "action": "",
259
        "pretty": false,
260
        "x": 430,
261
        "y": 340,
262
        "wires": [
263
            [
264
                "90755690.a6e1a8"
265
            ]
266
        ]
267
    },
268
    {
269
        "id": "90755690.a6e1a8",
270
        "type": "template",
271
        "z": "ce5d7c18.92579",
272
        "name": "set_pwm_state",
273
        "field": "payload",
274
        "fieldType": "msg",
275
        "format": "handlebars",
276
        "syntax": "mustache",
277
        "template": " {\"cmd\":\"set_pwm_state\",\"LED1\":{{payload.Poti_Led1}},\"LED2\":{{payload.Poti_Led2}}}",
278
        "output": "str",
279
        "x": 600,
280
        "y": 340,
281
        "wires": [
282
            [
283
                "27dbc289.2db6be"
284
            ]
285
        ]
286
    },
287
    {
288
        "id": "27dbc289.2db6be",
289
        "type": "mqtt out",
290
        "z": "ce5d7c18.92579",
291
        "name": "",
292
        "topic": "NodeESP/[PID]/pwm/state/set",
293
        "qos": "",
294
        "retain": "",
295
        "broker": "3c53c9b8.8965a6",
296
        "x": 870,
297
        "y": 340,
298
        "wires": []
299
    },
300
    {
301
        "id": "bf6f47bc.9d0f48",
302
        "type": "inject",
303
        "z": "ce5d7c18.92579",
304
        "name": "LED1 On",
305
        "topic": "",
306
        "payload": " {\"cmd\":\"set_pwm_state\",\"LED1\":\"ON\"}",
307
        "payloadType": "str",
308
        "repeat": "",
309
        "crontab": "00 08 * * *",
310
        "once": false,
311
        "onceDelay": 0.1,
312
        "x": 170,
313
        "y": 440,
314
        "wires": [
315
            [
316
                "f35c54f0.9d1908"
317
            ]
318
        ]
319
    },
320
    {
321
        "id": "df8961c9.da296",
322
        "type": "inject",
323
        "z": "ce5d7c18.92579",
324
        "name": "LED1 Off",
325
        "topic": "",
326
        "payload": " {\"cmd\":\"set_pwm_state\",\"LED1\":\"OFF\"}",
327
        "payloadType": "str",
328
        "repeat": "",
329
        "crontab": "00 18 * * *",
330
        "once": false,
331
        "onceDelay": 0.1,
332
        "x": 170,
333
        "y": 500,
334
        "wires": [
335
            [
336
                "f35c54f0.9d1908"
337
            ]
338
        ]
339
    },
340
    {
341
        "id": "c890c054.3b6fc",
342
        "type": "inject",
343
        "z": "ce5d7c18.92579",
344
        "name": "LED2 On",
345
        "topic": "",
346
        "payload": " {\"cmd\":\"set_pwm_state\",\"LED2\":\"ON\"}",
347
        "payloadType": "str",
348
        "repeat": "",
349
        "crontab": "00 20 * * *",
350
        "once": false,
351
        "onceDelay": 0.1,
352
        "x": 170,
353
        "y": 580,
354
        "wires": [
355
            [
356
                "a83e4a39.3b5da8"
357
            ]
358
        ]
359
    },
360
    {
361
        "id": "34d187e5.511f78",
362
        "type": "inject",
363
        "z": "ce5d7c18.92579",
364
        "name": "LED2 Off",
365
        "topic": "",
366
        "payload": " {\"cmd\":\"set_pwm_state\",\"LED2\":\"OFF\"}",
367
        "payloadType": "str",
368
        "repeat": "",
369
        "crontab": "00 23 * * *",
370
        "once": false,
371
        "onceDelay": 0.1,
372
        "x": 170,
373
        "y": 640,
374
        "wires": [
375
            [
376
                "a83e4a39.3b5da8"
377
            ]
378
        ]
379
    },
380
    {
381
        "id": "f35c54f0.9d1908",
382
        "type": "mqtt out",
383
        "z": "ce5d7c18.92579",
384
        "name": "",
385
        "topic": "NodeESP/[PID]/pwm/state/set",
386
        "qos": "",
387
        "retain": "",
388
        "broker": "3c53c9b8.8965a6",
389
        "x": 510,
390
        "y": 460,
391
        "wires": []
392
    },
393
    {
394
        "id": "a83e4a39.3b5da8",
395
        "type": "mqtt out",
396
        "z": "ce5d7c18.92579",
397
        "name": "",
398
        "topic": "NodeESP/[PID]/pwm/state/set",
399
        "qos": "",
400
        "retain": "",
401
        "broker": "3c53c9b8.8965a6",
402
        "x": 510,
403
        "y": 600,
404
        "wires": []
405
    },
406
    {
407
        "id": "3c53c9b8.8965a6",
408
        "type": "mqtt-broker",
409
        "z": "",
410
        "name": "fkainka.de",
411
        "broker": "broker.fkainka.de",
412
        "port": "1883",
413
        "clientid": "",
414
        "usetls": false,
415
        "compatmode": true,
416
        "keepalive": "60",
417
        "cleansession": true,
418
        "willTopic": "",
419
        "willQos": "0",
420
        "willPayload": "",
421
        "birthTopic": "",
422
        "birthQos": "0",
423
        "birthPayload": ""
424
    },
425
    {
426
        "id": "a260dabf.f82928",
427
        "type": "ui_group",
428
        "z": "",
429
        "name": "LED1",
430
        "tab": "a36589e4.c55a28",
431
        "order": 1,
432
        "disp": true,
433
        "width": "6",
434
        "collapse": false
435
    },
436
    {
437
        "id": "d920fbc5.d14b98",
438
        "type": "ui_group",
439
        "z": "",
440
        "name": "LED2",
441
        "tab": "a36589e4.c55a28",
442
        "order": 2,
443
        "disp": true,
444
        "width": "6",
445
        "collapse": false
446
    },
447
    {
448
        "id": "a36589e4.c55a28",
449
        "type": "ui_tab",
450
        "z": "",
451-
        "name": "Day14",
451+
        "name": "[K3_P10]",
452
        "icon": "dashboard",
453
        "order": 9
454
    }
455
]