From 3420522a545ec56f60cdf727a0e684139918ca76 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Fri, 30 Aug 2024 17:04:56 +0200 Subject: [PATCH] Function for highlighting / enabling and disabling buttons added --- .config.users.json.backup | 4 +- .flows.json.backup | 1157 +++++++++++++------------------------ flows.json | 784 ++++++++++++------------- 3 files changed, 760 insertions(+), 1185 deletions(-) diff --git a/.config.users.json.backup b/.config.users.json.backup index da5aa0b..24537d1 100644 --- a/.config.users.json.backup +++ b/.config.users.json.backup @@ -13,7 +13,7 @@ "view-store-zoom": false }, "tours": { - "welcome": "3.0.2" + "welcome": "3.1.0" } }, "debug": { @@ -21,6 +21,6 @@ "filteredNodes": [] }, "menu-menu-item-sidebar": true, - "menu-menu-item-palette": true + "menu-menu-item-palette": false } } \ No newline at end of file diff --git a/.flows.json.backup b/.flows.json.backup index c5cec89..bd3be2c 100644 --- a/.flows.json.backup +++ b/.flows.json.backup @@ -95,6 +95,14 @@ "info": "", "env": [] }, + { + "id": "98d0499ebd4be017", + "type": "tab", + "label": "Injections", + "disabled": false, + "info": "", + "env": [] + }, { "id": "7a3b4c82bf031f40", "type": "group", @@ -409,7 +417,7 @@ "type": "ui_group", "name": "Wohnzimmer", "tab": "9aa02c6c3d38d60f", - "order": 5, + "order": 3, "disp": true, "width": "6", "collapse": false, @@ -449,9 +457,9 @@ { "id": "36ba0c088930c9ea", "type": "ui_group", - "name": "Dirk", - "tab": "9aa02c6c3d38d60f", - "order": 2, + "name": "Heizung", + "tab": "fab7f104a06c62b1", + "order": 7, "disp": true, "width": "6", "collapse": false, @@ -592,7 +600,7 @@ "type": "ui_group", "name": "Schlafzimmer", "tab": "9aa02c6c3d38d60f", - "order": 4, + "order": 2, "disp": true, "width": "6", "collapse": false, @@ -621,8 +629,8 @@ { "id": "2d8cc5990c1886e5", "type": "ui_group", - "name": "Marion", - "tab": "9aa02c6c3d38d60f", + "name": "Heizung", + "tab": "a367626eff648c1b", "order": 3, "disp": true, "width": "6", @@ -634,7 +642,7 @@ "type": "ui_group", "name": "Bath", "tab": "9aa02c6c3d38d60f", - "order": 8, + "order": 6, "disp": true, "width": "6", "collapse": false, @@ -676,7 +684,7 @@ "type": "ui_group", "name": "Esszimmer", "tab": "9aa02c6c3d38d60f", - "order": 6, + "order": 4, "disp": true, "width": "6", "collapse": false, @@ -687,7 +695,7 @@ "type": "ui_group", "name": "Julian", "tab": "9aa02c6c3d38d60f", - "order": 9, + "order": 7, "disp": true, "width": "6", "collapse": false, @@ -698,7 +706,7 @@ "type": "ui_group", "name": "Schlafzimmer Mika", "tab": "9aa02c6c3d38d60f", - "order": 10, + "order": 8, "disp": true, "width": "6", "collapse": false, @@ -709,7 +717,7 @@ "type": "ui_group", "name": "Küche", "tab": "9aa02c6c3d38d60f", - "order": 7, + "order": 5, "disp": true, "width": "6", "collapse": false, @@ -740,7 +748,7 @@ "type": "ui_group", "name": "Wohnzimmer Mika", "tab": "9aa02c6c3d38d60f", - "order": 11, + "order": 9, "disp": true, "width": "6", "collapse": false, @@ -755,17 +763,6 @@ "disabled": false, "hidden": false }, - { - "id": "936f87c326e33511", - "type": "ui_group", - "name": "BT-Audio", - "tab": "fab7f104a06c62b1", - "order": 7, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, { "id": "63f764e445c01db5", "type": "ui_group", @@ -1124,7 +1121,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/LINE1", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE1", "qos": "", "retain": "", "respTopic": "", @@ -1133,8 +1130,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1450, - "y": 2260, + "x": 1470, + "y": 2520, "wires": [] }, { @@ -1151,10 +1148,10 @@ "rh": 0, "inputs": 0, "x": 190, - "y": 2440, + "y": 2340, "wires": [ [ - "edd7c6fba27133b9" + "87fdd7ab519e84b8" ] ] }, @@ -1173,7 +1170,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/CD", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/CD", "qos": "", "retain": "", "respTopic": "", @@ -1182,8 +1179,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1440, - "y": 2320, + "x": 1460, + "y": 2460, "wires": [] }, { @@ -1191,7 +1188,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/LINE3", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE3", "qos": "", "retain": "", "respTopic": "", @@ -1200,8 +1197,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1450, - "y": 2380, + "x": 1470, + "y": 2640, "wires": [] }, { @@ -1217,19 +1214,18 @@ "label": "Raspi", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2260, + "y": 2520, "wires": [ [ - "83b318af46e9726a", - "247b448bf9282116" + "83b318af46e9726a" ] ] }, @@ -1246,19 +1242,18 @@ "label": "CD", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2320, + "y": 2460, "wires": [ [ - "ff46549cc7d67863", - "247b448bf9282116" + "ff46549cc7d67863" ] ] }, @@ -1275,15 +1270,15 @@ "label": "AG03", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2380, + "y": 2640, "wires": [ [ "b88196a880cf812a" @@ -1295,7 +1290,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/MUTE", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/MUTE", "qos": "", "retain": "", "respTopic": "", @@ -1304,8 +1299,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1450, - "y": 2440, + "x": 1470, + "y": 2340, "wires": [] }, { @@ -1314,8 +1309,8 @@ "z": "8e9c7f123e3fa72b", "name": "", "group": "8bb63e2d106e61a9", - "order": 6, - "width": "2", + "order": 7, + "width": "4", "height": "1", "passthru": false, "label": "", @@ -1329,44 +1324,13 @@ "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2440, + "y": 2340, "wires": [ [ "ddcd537e8fcfa244" ] ] }, - { - "id": "7c9b55b69296dda1", - "type": "delay", - "z": "8e9c7f123e3fa72b", - "name": "", - "pauseType": "delay", - "timeout": "1", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 860, - "y": 2260, - "wires": [ - [ - "9e8359b1ca5e794c", - "c1389f9f380b0542", - "a7ee780fe5879b1a", - "5a50d77e3a43a840", - "cbe87d4bcae3956c", - "58dd64a73de47edd", - "82d583e20cf34448" - ] - ] - }, { "id": "676453a59928c5c3", "type": "comment", @@ -1374,7 +1338,7 @@ "name": "Remote CD", "info": "", "x": 110, - "y": 2720, + "y": 2920, "wires": [] }, { @@ -1391,40 +1355,10 @@ "rh": 0, "inputs": 0, "x": 190, - "y": 2860, + "y": 2980, "wires": [ [ - "dd2ddbacc8285a33" - ] - ] - }, - { - "id": "ad497b400e60edda", - "type": "delay", - "z": "8e9c7f123e3fa72b", - "name": "", - "pauseType": "delay", - "timeout": "1", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 840, - "y": 2780, - "wires": [ - [ - "ef494099580b898c", - "b1e58bfe996c56d3", - "1c4167983bda6925", - "8ada9701cffecf8f", - "fe0ed22185cec253", - "20b370e467c1438a" + "32c3dc97ebb09497" ] ] }, @@ -1433,7 +1367,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/STOP", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/STOP", "qos": "", "retain": "", "respTopic": "", @@ -1442,8 +1376,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1470, - "y": 2900, + "x": 1490, + "y": 3100, "wires": [] }, { @@ -1466,8 +1400,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2900, + "x": 1110, + "y": 3100, "wires": [ [ "90a1fbb9306b7b3d" @@ -1479,7 +1413,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/PAUSE", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/PAUSE", "qos": "", "retain": "", "respTopic": "", @@ -1488,8 +1422,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1480, - "y": 2960, + "x": 1490, + "y": 3160, "wires": [] }, { @@ -1512,8 +1446,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2960, + "x": 1110, + "y": 3160, "wires": [ [ "14db89a9fbde98fb" @@ -1525,7 +1459,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/PLAY", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/PLAY", "qos": "", "retain": "", "respTopic": "", @@ -1534,8 +1468,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1470, - "y": 3020, + "x": 1480, + "y": 3220, "wires": [] }, { @@ -1558,8 +1492,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 3020, + "x": 1110, + "y": 3220, "wires": [ [ "eb54a9ee2b67177c" @@ -1571,7 +1505,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/TRACK_PREV", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/TRACK_PREV", "qos": "", "retain": "", "respTopic": "", @@ -1580,8 +1514,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1500, - "y": 2840, + "x": 1510, + "y": 3040, "wires": [] }, { @@ -1604,8 +1538,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2840, + "x": 1110, + "y": 3040, "wires": [ [ "76856a2722b2d2fd" @@ -1617,7 +1551,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/TRACK_NEXT", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/TRACK_NEXT", "qos": "", "retain": "", "respTopic": "", @@ -1626,8 +1560,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1500, - "y": 3080, + "x": 1510, + "y": 3280, "wires": [] }, { @@ -1650,8 +1584,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 3080, + "x": 1110, + "y": 3280, "wires": [ [ "b3a9dfc6d43ace42" @@ -1663,7 +1597,7 @@ "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/EUR642100/OPEN_CLOSE", + "topic": "my_apps/gfw/dirk/remote_ctrl/EUR642100/OPEN_CLOSE", "qos": "", "retain": "", "respTopic": "", @@ -1672,8 +1606,8 @@ "correl": "", "expiry": "", "broker": "f6f673e95e75873d", - "x": 1500, - "y": 2780, + "x": 1510, + "y": 2980, "wires": [] }, { @@ -1696,8 +1630,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2780, + "x": 1110, + "y": 2980, "wires": [ [ "a803f31163813e6c" @@ -1705,75 +1639,11 @@ ] }, { - "id": "cbe87d4bcae3956c", - "type": "ui_template", - "z": "8e9c7f123e3fa72b", - "group": "8bb63e2d106e61a9", - "name": "", - "order": 7, - "width": "2", - "height": "1", - "format": "", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 1100, - "y": 2500, - "wires": [ - [ - "12b5c0ac03168588" - ] - ] - }, - { - "id": "12b5c0ac03168588", + "id": "084e729f2517cc93", "type": "mqtt out", "z": "8e9c7f123e3fa72b", "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/VOLUP", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1460, - "y": 2500, - "wires": [] - }, - { - "id": "58dd64a73de47edd", - "type": "ui_template", - "z": "8e9c7f123e3fa72b", - "group": "8bb63e2d106e61a9", - "name": "", - "order": 5, - "width": "2", - "height": "1", - "format": "", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 1100, - "y": 2560, - "wires": [ - [ - "c2f1852a3f8ac00d" - ] - ] - }, - { - "id": "c2f1852a3f8ac00d", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/VOLDOWN", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/POWER", "qos": "", "retain": "", "respTopic": "", @@ -1783,25 +1653,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1470, - "y": 2560, - "wires": [] - }, - { - "id": "084e729f2517cc93", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/remote/RAS5/POWER", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1460, - "y": 2620, + "y": 2400, "wires": [] }, { @@ -1825,192 +1677,13 @@ "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2620, + "y": 2400, "wires": [ [ "084e729f2517cc93" ] ] }, - { - "id": "dd2ddbacc8285a33", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "enable", - "rules": [ - { - "t": "move", - "p": "payload", - "pt": "msg", - "to": "enabled", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 450, - "y": 2860, - "wires": [ - [ - "0f8f1b5a181b561d" - ] - ] - }, - { - "id": "edd7c6fba27133b9", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "enable", - "rules": [ - { - "t": "move", - "p": "payload", - "pt": "msg", - "to": "enabled", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 470, - "y": 2440, - "wires": [ - [ - "82ca242fd7b8cf4b" - ] - ] - }, - { - "id": "0f8f1b5a181b561d", - "type": "switch", - "z": "8e9c7f123e3fa72b", - "name": "true_false", - "property": "enabled", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "false" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 620, - "y": 2860, - "wires": [ - [ - "ad497b400e60edda" - ], - [ - "20b370e467c1438a", - "8ada9701cffecf8f", - "ef494099580b898c", - "b1e58bfe996c56d3", - "1c4167983bda6925", - "fe0ed22185cec253", - "0a7f97c9915f5e4b" - ] - ] - }, - { - "id": "82ca242fd7b8cf4b", - "type": "switch", - "z": "8e9c7f123e3fa72b", - "name": "true_false", - "property": "enabled", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "false" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 640, - "y": 2440, - "wires": [ - [ - "7c9b55b69296dda1" - ], - [ - "9e8359b1ca5e794c", - "c1389f9f380b0542", - "a7ee780fe5879b1a", - "5a50d77e3a43a840", - "cbe87d4bcae3956c", - "58dd64a73de47edd", - "82d583e20cf34448", - "4e0612dc2d3303e4" - ] - ] - }, - { - "id": "4e0612dc2d3303e4", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 650, - "y": 2260, - "wires": [ - [ - "7c9b55b69296dda1" - ] - ] - }, - { - "id": "0a7f97c9915f5e4b", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 630, - "y": 2780, - "wires": [ - [ - "ad497b400e60edda" - ] - ] - }, { "id": "a2f6fd63e69752c5", "type": "ui_led", @@ -2108,6 +1781,7 @@ "id": "537d9c8f0a6b511c", "type": "ui_led", "z": "8e9c7f123e3fa72b", + "d": true, "order": 3, "group": "fdf81fd80a36f0f7", "width": 0, @@ -2797,335 +2471,6 @@ "y": 1780, "wires": [] }, - { - "id": "03ae3793c0b0406b", - "type": "comment", - "z": "8e9c7f123e3fa72b", - "name": "Control BT CD", - "info": "", - "x": 110, - "y": 3120, - "wires": [] - }, - { - "id": "3152800d6bb75a91", - "type": "mqtt in", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "videv/gfw/dirk/active_brightness_device/state_2", - "qos": "2", - "datatype": "json", - "broker": "f6f673e95e75873d", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 220, - "y": 3260, - "wires": [ - [ - "6df433b81ad85d7d" - ] - ] - }, - { - "id": "c122c00c6dd3d9e3", - "type": "delay", - "z": "8e9c7f123e3fa72b", - "name": "", - "pauseType": "delay", - "timeout": "1", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 840, - "y": 3180, - "wires": [ - [ - "151bae93d6a91c42", - "9a0c376521bcc4a3", - "f3740bd03907325d", - "18b41684e95bd2fb" - ] - ] - }, - { - "id": "d21e7fedb3d28b23", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/hifi/btaudio/PAUSE", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1450, - "y": 3360, - "wires": [] - }, - { - "id": "151bae93d6a91c42", - "type": "ui_button", - "z": "8e9c7f123e3fa72b", - "name": "", - "group": "936f87c326e33511", - "order": 2, - "width": "1", - "height": "1", - "passthru": false, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "pause", - "payload": "", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 1070, - "y": 3360, - "wires": [ - [ - "d21e7fedb3d28b23" - ] - ] - }, - { - "id": "0eafa6611b9e1d16", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/hifi/btaudio/PLAY", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1440, - "y": 3420, - "wires": [] - }, - { - "id": "9a0c376521bcc4a3", - "type": "ui_button", - "z": "8e9c7f123e3fa72b", - "name": "", - "group": "936f87c326e33511", - "order": 3, - "width": "2", - "height": "1", - "passthru": false, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "play_arrow", - "payload": "", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 1070, - "y": 3420, - "wires": [ - [ - "0eafa6611b9e1d16" - ] - ] - }, - { - "id": "1dfdb02677980a7e", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/hifi/btaudio/TRACK_PREV", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1470, - "y": 3240, - "wires": [] - }, - { - "id": "f3740bd03907325d", - "type": "ui_button", - "z": "8e9c7f123e3fa72b", - "name": "", - "group": "936f87c326e33511", - "order": 1, - "width": "1", - "height": "1", - "passthru": false, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "skip_previous", - "payload": "", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 1070, - "y": 3240, - "wires": [ - [ - "1dfdb02677980a7e" - ] - ] - }, - { - "id": "c93a9c4dda4db3b1", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/hifi/btaudio/TRACK_NEXT", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1470, - "y": 3480, - "wires": [] - }, - { - "id": "18b41684e95bd2fb", - "type": "ui_button", - "z": "8e9c7f123e3fa72b", - "name": "", - "group": "936f87c326e33511", - "order": 4, - "width": "1", - "height": "1", - "passthru": false, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "skip_next", - "payload": "", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 1070, - "y": 3480, - "wires": [ - [ - "c93a9c4dda4db3b1" - ] - ] - }, - { - "id": "6df433b81ad85d7d", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "enable", - "rules": [ - { - "t": "move", - "p": "payload", - "pt": "msg", - "to": "enabled", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 470, - "y": 3260, - "wires": [ - [ - "f9669c6c5090d8b5" - ] - ] - }, - { - "id": "f9669c6c5090d8b5", - "type": "switch", - "z": "8e9c7f123e3fa72b", - "name": "true_false", - "property": "enabled", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "false" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 620, - "y": 3260, - "wires": [ - [ - "c122c00c6dd3d9e3" - ], - [ - "f3740bd03907325d", - "151bae93d6a91c42", - "18b41684e95bd2fb", - "789d92293ea33285" - ] - ] - }, - { - "id": "789d92293ea33285", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 630, - "y": 3180, - "wires": [ - [ - "c122c00c6dd3d9e3" - ] - ] - }, { "id": "c1c3f4ed8532fb41", "type": "ui_switch", @@ -3210,21 +2555,223 @@ "wires": [] }, { - "id": "247b448bf9282116", - "type": "debug", + "id": "c79265e016d12310", + "type": "mqtt in", "z": "8e9c7f123e3fa72b", - "name": "debug 1", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1360, - "y": 2160, + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE1", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2520, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "c1113c6a5d0e3596", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/CD", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 2460, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "521f784956d95632", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2580, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "6e4ae55e35c6e79d", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE3", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2640, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "87fdd7ab519e84b8", + "type": "function", + "z": "8e9c7f123e3fa72b", + "name": "ButtonCtrl", + "func": "if (msg.topic != topic_tx_request)\n{\n // Inputs \n if (debug_input) node.warn(\"Topic = \" + msg.topic)\n /*\n * POWER\n */\n if (msg.topic == topic_power)\n {\n if (debug_input) node.warn(\"Received Power signal = \" + msg.payload)\n state_power = msg.payload\n }\n /*\n * SOURCE CD\n */\n if (msg.topic == topic_cd)\n {\n if (debug_input) node.warn(\"Received source to CD\")\n state_changed |= state_source != \"cd\"\n state_source = \"cd\"\n }\n /*\n * SOURCE AG03\n */\n if (msg.topic == topic_ag03)\n {\n if (debug_input) node.warn(\"Received source to AG03\")\n state_changed |= state_source != \"ag03\"\n state_source = \"ag03\"\n }\n /*\n * SOURCE RASPI\n */\n if (msg.topic == topic_raspi)\n {\n if (debug_input) node.warn(\"Received source to RASPI\")\n state_changed |= state_source != \"raspi\"\n state_source = \"raspi\"\n }\n /*\n * SOURCE PHONO\n */\n if (msg.topic == topic_phono)\n {\n if (debug_input) node.warn(\"Received source to PHONO\")\n state_changed |= state_source != \"phono\"\n state_source = \"phono\"\n }\n}\nelse\n{\n /*\n * Enabled\n */\n if (!state_power)\n {\n state_changed |= state_enabled \n state_enabled = false\n tm = null\n }\n else\n {\n if (tm == null)\n {\n tm = msg.payload\n }\n if (msg.payload - tm > 1000)\n {\n state_changed |= !state_enabled \n state_enabled = true\n }\n }\n \n if (state_changed){\n if (debug_tx) node.error(\"State is changed. Sending out messages\")\n if (debug_tx) node.warn(\"Power = \" + state_power)\n if (debug_tx) node.warn(\"Source = \" + state_source)\n state_changed = false\n /*\n * Uncolored Buttons\n */\n var msg_other = { topic: \"other\", enabled: state_enabled };\n /*\n * CD\n */\n if (state_source == \"cd\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_cd = { topic: \"cd\", enabled: state_enabled, background: background };\n /*\n * RASPI\n */\n if (state_source == \"raspi\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_raspi = { topic: \"raspi\", enabled: state_enabled, background: background };\n /*\n * PHONO\n */\n if (state_source == \"phono\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_phono = { topic: \"phono\", enabled: state_enabled, background: background };\n /*\n * AG03\n */\n if (state_source == \"ag03\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_ag03 = { topic: \"ag03\", enabled: state_enabled, background: background };\n //\n return [msg_other, msg_cd, msg_raspi, msg_phono, msg_ag03];\n }\n}", + "outputs": 5, + "timeout": 0, + "noerr": 0, + "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\ndebug_input = false\ndebug_tx = false\n//\ntopic_power = \"my_apps/gfw/dirk/powerplug/output/1\"\ntopic_cd = \"my_apps/gfw/dirk/remote_ctrl/RAS5/CD\"\ntopic_raspi = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE1\"\ntopic_phono = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2\"\ntopic_ag03 = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE3\"\ntopic_tx_request = \"tx_request\"\n//\nstate_power = false\nstate_enabled = false\nstate_source = \"\"\nstate_changed = true\n//\ntm = null", + "finalize": "", + "libs": [], + "x": 600, + "y": 2520, + "wires": [ + [ + "82d583e20cf34448", + "5a50d77e3a43a840" + ], + [ + "c1389f9f380b0542" + ], + [ + "9e8359b1ca5e794c" + ], + [ + "fa0a223ba05e771a" + ], + [ + "a7ee780fe5879b1a" + ] + ] + }, + { + "id": "3bcf480352a8d445", + "type": "inject", + "z": "8e9c7f123e3fa72b", + "name": "", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "0.1", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "tx_request", + "payload": "", + "payloadType": "date", + "x": 160, + "y": 2800, + "wires": [ + [ + "87fdd7ab519e84b8", + "32c3dc97ebb09497" + ] + ] + }, + { + "id": "05f25fc0144f98a8", + "type": "mqtt out", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 1470, + "y": 2580, "wires": [] }, + { + "id": "fa0a223ba05e771a", + "type": "ui_button", + "z": "8e9c7f123e3fa72b", + "name": "", + "group": "8bb63e2d106e61a9", + "order": 5, + "width": "2", + "height": "1", + "passthru": false, + "label": "Phono", + "tooltip": "", + "color": "", + "bgcolor": "{{msg.background}}", + "className": "", + "icon": "", + "payload": "true", + "payloadType": "bool", + "topic": "topic", + "topicType": "msg", + "x": 1110, + "y": 2580, + "wires": [ + [ + "05f25fc0144f98a8" + ] + ] + }, + { + "id": "32c3dc97ebb09497", + "type": "function", + "z": "8e9c7f123e3fa72b", + "name": "ButtonCtrl", + "func": "if (msg.topic != topic_tx_request)\n{\n // Inputs \n if (debug_input) node.warn(\"Topic = \" + msg.topic)\n /*\n * POWER\n */\n if (msg.topic == topic_power)\n {\n if (debug_input) node.warn(\"Received Power signal = \" + msg.payload)\n state_power = msg.payload\n }\n}\nelse\n{\n /*\n * Enabled\n */\n if (!state_power)\n {\n state_changed |= state_enabled \n state_enabled = false\n tm = null\n }\n else\n {\n if (tm == null)\n {\n tm = msg.payload\n }\n if (msg.payload - tm > 1000)\n {\n state_changed |= !state_enabled \n state_enabled = true\n }\n }\n \n if (state_changed){\n if (debug_tx) node.error(\"State is changed. Sending out messages\")\n if (debug_tx) node.warn(\"Power = \" + state_power)\n state_changed = false\n /*\n * Uncolored Buttons\n */\n var msg_other = { topic: \"other\", enabled: state_enabled };\n //\n return msg_other;\n }\n}", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\ndebug_input = true\ndebug_tx = true\n//\ntopic_power = \"my_apps/gfw/dirk/powerplug/output/3\"\ntopic_tx_request = \"tx_request\"\n//\nstate_power = false\nstate_enabled = false\nstate_changed = true\n//\ntm = null", + "finalize": "", + "libs": [], + "x": 600, + "y": 2980, + "wires": [ + [ + "fe0ed22185cec253", + "20b370e467c1438a", + "8ada9701cffecf8f", + "ef494099580b898c", + "b1e58bfe996c56d3", + "1c4167983bda6925" + ] + ] + }, { "id": "3261d3bb95b50d09", "type": "comment", @@ -6143,7 +5690,6 @@ "id": "2290c1b5e14ba664", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "c5f87828f0888a6f", "order": 5, @@ -6327,7 +5873,6 @@ "id": "5fc9f02303bb391c", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "36ba0c088930c9ea", "order": 5, @@ -6800,7 +6345,6 @@ "id": "ad594a58a14a533e", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "2d8cc5990c1886e5", "order": 5, @@ -7143,7 +6687,6 @@ "id": "a6d310b51f76c3e3", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "6048820d9f2e4c06", "order": 5, @@ -7737,7 +7280,6 @@ "id": "275a854a15aeeff2", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "310658633f5b9c9c", "order": 4, @@ -8138,7 +7680,6 @@ "id": "05de1078dfa86a74", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "1fd324daac2dcbe8", "order": 4, @@ -8539,7 +8080,6 @@ "id": "02e3af123b5a8ab6", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "8b7175856c5dc2bc", "order": 4, @@ -8940,7 +8480,6 @@ "id": "61e5770ac7fba408", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "f44c10be6990386a", "order": 7, @@ -9369,7 +8908,6 @@ "id": "c4c482c4da1e7867", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "91179f0029b4efaf", "order": 4, @@ -9994,7 +9532,6 @@ "id": "c7a0883cefe27eb5", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "b5812a591e37c885", "order": 4, @@ -13660,5 +13197,91 @@ "x": 90, "y": 200, "wires": [] + }, + { + "id": "70039c89dcf2eaf6", + "type": "mqtt out", + "z": "98d0499ebd4be017", + "name": "", + "topic": "zigbee_gfw/stw/groundfloor/motion_sensor", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 850, + "y": 140, + "wires": [] + }, + { + "id": "c78627b5148c5dbc", + "type": "inject", + "z": "98d0499ebd4be017", + "name": "Reset Motion Groundfloor", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"occupancy\": false}", + "payloadType": "json", + "x": 310, + "y": 140, + "wires": [ + [ + "70039c89dcf2eaf6" + ] + ] + }, + { + "id": "2e38c00186ef7f38", + "type": "mqtt out", + "z": "98d0499ebd4be017", + "name": "", + "topic": "zigbee_ffe/stw/firstfloor/motion_sensor", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 830, + "y": 200, + "wires": [] + }, + { + "id": "c38cd75574f141c3", + "type": "inject", + "z": "98d0499ebd4be017", + "name": "Reset Motion Firstfloor", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"occupancy\": false}", + "payloadType": "json", + "x": 300, + "y": 200, + "wires": [ + [ + "2e38c00186ef7f38" + ] + ] } ] \ No newline at end of file diff --git a/flows.json b/flows.json index 1e10cb7..6fe2736 100644 --- a/flows.json +++ b/flows.json @@ -1,4 +1,12 @@ [ + { + "id": "98d0499ebd4be017", + "type": "tab", + "label": "Injections", + "disabled": false, + "info": "", + "env": [] + }, { "id": "8e9c7f123e3fa72b", "type": "tab", @@ -409,7 +417,7 @@ "type": "ui_group", "name": "Wohnzimmer", "tab": "9aa02c6c3d38d60f", - "order": 5, + "order": 3, "disp": true, "width": "6", "collapse": false, @@ -449,9 +457,9 @@ { "id": "36ba0c088930c9ea", "type": "ui_group", - "name": "Dirk", - "tab": "9aa02c6c3d38d60f", - "order": 2, + "name": "Heizung", + "tab": "fab7f104a06c62b1", + "order": 7, "disp": true, "width": "6", "collapse": false, @@ -592,7 +600,7 @@ "type": "ui_group", "name": "Schlafzimmer", "tab": "9aa02c6c3d38d60f", - "order": 4, + "order": 2, "disp": true, "width": "6", "collapse": false, @@ -621,8 +629,8 @@ { "id": "2d8cc5990c1886e5", "type": "ui_group", - "name": "Marion", - "tab": "9aa02c6c3d38d60f", + "name": "Heizung", + "tab": "a367626eff648c1b", "order": 3, "disp": true, "width": "6", @@ -634,7 +642,7 @@ "type": "ui_group", "name": "Bath", "tab": "9aa02c6c3d38d60f", - "order": 8, + "order": 6, "disp": true, "width": "6", "collapse": false, @@ -676,7 +684,7 @@ "type": "ui_group", "name": "Esszimmer", "tab": "9aa02c6c3d38d60f", - "order": 6, + "order": 4, "disp": true, "width": "6", "collapse": false, @@ -687,7 +695,7 @@ "type": "ui_group", "name": "Julian", "tab": "9aa02c6c3d38d60f", - "order": 9, + "order": 7, "disp": true, "width": "6", "collapse": false, @@ -698,7 +706,7 @@ "type": "ui_group", "name": "Schlafzimmer Mika", "tab": "9aa02c6c3d38d60f", - "order": 10, + "order": 8, "disp": true, "width": "6", "collapse": false, @@ -709,7 +717,7 @@ "type": "ui_group", "name": "Küche", "tab": "9aa02c6c3d38d60f", - "order": 7, + "order": 5, "disp": true, "width": "6", "collapse": false, @@ -740,7 +748,7 @@ "type": "ui_group", "name": "Wohnzimmer Mika", "tab": "9aa02c6c3d38d60f", - "order": 11, + "order": 9, "disp": true, "width": "6", "collapse": false, @@ -755,17 +763,6 @@ "disabled": false, "hidden": false }, - { - "id": "936f87c326e33511", - "type": "ui_group", - "name": "BT-Audio", - "tab": "fab7f104a06c62b1", - "order": 7, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, { "id": "63f764e445c01db5", "type": "ui_group", @@ -788,6 +785,92 @@ "collapse": false, "className": "" }, + { + "id": "70039c89dcf2eaf6", + "type": "mqtt out", + "z": "98d0499ebd4be017", + "name": "", + "topic": "zigbee_gfw/stw/groundfloor/motion_sensor", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 850, + "y": 140, + "wires": [] + }, + { + "id": "c78627b5148c5dbc", + "type": "inject", + "z": "98d0499ebd4be017", + "name": "Reset Motion Groundfloor", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"occupancy\": false}", + "payloadType": "json", + "x": 310, + "y": 140, + "wires": [ + [ + "70039c89dcf2eaf6" + ] + ] + }, + { + "id": "2e38c00186ef7f38", + "type": "mqtt out", + "z": "98d0499ebd4be017", + "name": "", + "topic": "zigbee_ffe/stw/firstfloor/motion_sensor", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 830, + "y": 200, + "wires": [] + }, + { + "id": "c38cd75574f141c3", + "type": "inject", + "z": "98d0499ebd4be017", + "name": "Reset Motion Firstfloor", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"occupancy\": false}", + "payloadType": "json", + "x": 300, + "y": 200, + "wires": [ + [ + "2e38c00186ef7f38" + ] + ] + }, { "id": "e3d908c71ec3e2b1", "type": "mqtt in", @@ -1134,7 +1217,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1470, - "y": 2260, + "y": 2520, "wires": [] }, { @@ -1151,10 +1234,10 @@ "rh": 0, "inputs": 0, "x": 190, - "y": 2440, + "y": 2340, "wires": [ [ - "edd7c6fba27133b9" + "87fdd7ab519e84b8" ] ] }, @@ -1183,7 +1266,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1460, - "y": 2320, + "y": 2460, "wires": [] }, { @@ -1201,7 +1284,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1470, - "y": 2380, + "y": 2640, "wires": [] }, { @@ -1217,19 +1300,18 @@ "label": "Raspi", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2260, + "y": 2520, "wires": [ [ - "83b318af46e9726a", - "247b448bf9282116" + "83b318af46e9726a" ] ] }, @@ -1246,19 +1328,18 @@ "label": "CD", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2320, + "y": 2460, "wires": [ [ - "ff46549cc7d67863", - "247b448bf9282116" + "ff46549cc7d67863" ] ] }, @@ -1275,15 +1356,15 @@ "label": "AG03", "tooltip": "", "color": "", - "bgcolor": "", + "bgcolor": "{{msg.background}}", "className": "", "icon": "", - "payload": "", - "payloadType": "str", + "payload": "true", + "payloadType": "bool", "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2380, + "y": 2640, "wires": [ [ "b88196a880cf812a" @@ -1305,7 +1386,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1470, - "y": 2440, + "y": 2340, "wires": [] }, { @@ -1314,8 +1395,8 @@ "z": "8e9c7f123e3fa72b", "name": "", "group": "8bb63e2d106e61a9", - "order": 6, - "width": "2", + "order": 7, + "width": "4", "height": "1", "passthru": false, "label": "", @@ -1329,44 +1410,13 @@ "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2440, + "y": 2340, "wires": [ [ "ddcd537e8fcfa244" ] ] }, - { - "id": "7c9b55b69296dda1", - "type": "delay", - "z": "8e9c7f123e3fa72b", - "name": "", - "pauseType": "delay", - "timeout": "1", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 860, - "y": 2260, - "wires": [ - [ - "9e8359b1ca5e794c", - "c1389f9f380b0542", - "a7ee780fe5879b1a", - "5a50d77e3a43a840", - "cbe87d4bcae3956c", - "58dd64a73de47edd", - "82d583e20cf34448" - ] - ] - }, { "id": "676453a59928c5c3", "type": "comment", @@ -1374,7 +1424,7 @@ "name": "Remote CD", "info": "", "x": 110, - "y": 2720, + "y": 2920, "wires": [] }, { @@ -1391,40 +1441,10 @@ "rh": 0, "inputs": 0, "x": 190, - "y": 2860, + "y": 2980, "wires": [ [ - "dd2ddbacc8285a33" - ] - ] - }, - { - "id": "ad497b400e60edda", - "type": "delay", - "z": "8e9c7f123e3fa72b", - "name": "", - "pauseType": "delay", - "timeout": "1", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 840, - "y": 2780, - "wires": [ - [ - "ef494099580b898c", - "b1e58bfe996c56d3", - "1c4167983bda6925", - "8ada9701cffecf8f", - "fe0ed22185cec253", - "20b370e467c1438a" + "32c3dc97ebb09497" ] ] }, @@ -1443,7 +1463,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1490, - "y": 2900, + "y": 3100, "wires": [] }, { @@ -1466,8 +1486,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2900, + "x": 1110, + "y": 3100, "wires": [ [ "90a1fbb9306b7b3d" @@ -1489,7 +1509,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1490, - "y": 2960, + "y": 3160, "wires": [] }, { @@ -1512,8 +1532,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2960, + "x": 1110, + "y": 3160, "wires": [ [ "14db89a9fbde98fb" @@ -1535,7 +1555,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1480, - "y": 3020, + "y": 3220, "wires": [] }, { @@ -1558,8 +1578,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 3020, + "x": 1110, + "y": 3220, "wires": [ [ "eb54a9ee2b67177c" @@ -1581,7 +1601,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1510, - "y": 2840, + "y": 3040, "wires": [] }, { @@ -1604,8 +1624,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2840, + "x": 1110, + "y": 3040, "wires": [ [ "76856a2722b2d2fd" @@ -1627,7 +1647,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1510, - "y": 3080, + "y": 3280, "wires": [] }, { @@ -1650,8 +1670,8 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 3080, + "x": 1110, + "y": 3280, "wires": [ [ "b3a9dfc6d43ace42" @@ -1673,7 +1693,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1510, - "y": 2780, + "y": 2980, "wires": [] }, { @@ -1696,96 +1716,14 @@ "payloadType": "str", "topic": "topic", "topicType": "msg", - "x": 1070, - "y": 2780, + "x": 1110, + "y": 2980, "wires": [ [ "a803f31163813e6c" ] ] }, - { - "id": "cbe87d4bcae3956c", - "type": "ui_template", - "z": "8e9c7f123e3fa72b", - "group": "8bb63e2d106e61a9", - "name": "", - "order": 7, - "width": "2", - "height": "1", - "format": "", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 1100, - "y": 2500, - "wires": [ - [ - "12b5c0ac03168588" - ] - ] - }, - { - "id": "12b5c0ac03168588", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/VOLUP", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1470, - "y": 2500, - "wires": [] - }, - { - "id": "58dd64a73de47edd", - "type": "ui_template", - "z": "8e9c7f123e3fa72b", - "group": "8bb63e2d106e61a9", - "name": "", - "order": 5, - "width": "2", - "height": "1", - "format": "", - "storeOutMessages": true, - "fwdInMessages": true, - "resendOnRefresh": true, - "templateScope": "local", - "className": "", - "x": 1100, - "y": 2560, - "wires": [ - [ - "c2f1852a3f8ac00d" - ] - ] - }, - { - "id": "c2f1852a3f8ac00d", - "type": "mqtt out", - "z": "8e9c7f123e3fa72b", - "name": "", - "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/VOLDOWN", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "f6f673e95e75873d", - "x": 1480, - "y": 2560, - "wires": [] - }, { "id": "084e729f2517cc93", "type": "mqtt out", @@ -1801,7 +1739,7 @@ "expiry": "", "broker": "f6f673e95e75873d", "x": 1470, - "y": 2620, + "y": 2400, "wires": [] }, { @@ -1825,192 +1763,13 @@ "topic": "topic", "topicType": "msg", "x": 1110, - "y": 2620, + "y": 2400, "wires": [ [ "084e729f2517cc93" ] ] }, - { - "id": "dd2ddbacc8285a33", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "enable", - "rules": [ - { - "t": "move", - "p": "payload", - "pt": "msg", - "to": "enabled", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 450, - "y": 2860, - "wires": [ - [ - "0f8f1b5a181b561d" - ] - ] - }, - { - "id": "edd7c6fba27133b9", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "enable", - "rules": [ - { - "t": "move", - "p": "payload", - "pt": "msg", - "to": "enabled", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 470, - "y": 2440, - "wires": [ - [ - "82ca242fd7b8cf4b" - ] - ] - }, - { - "id": "0f8f1b5a181b561d", - "type": "switch", - "z": "8e9c7f123e3fa72b", - "name": "true_false", - "property": "enabled", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "false" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 620, - "y": 2860, - "wires": [ - [ - "ad497b400e60edda" - ], - [ - "20b370e467c1438a", - "8ada9701cffecf8f", - "ef494099580b898c", - "b1e58bfe996c56d3", - "1c4167983bda6925", - "fe0ed22185cec253", - "0a7f97c9915f5e4b" - ] - ] - }, - { - "id": "82ca242fd7b8cf4b", - "type": "switch", - "z": "8e9c7f123e3fa72b", - "name": "true_false", - "property": "enabled", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "false" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 640, - "y": 2440, - "wires": [ - [ - "7c9b55b69296dda1" - ], - [ - "9e8359b1ca5e794c", - "c1389f9f380b0542", - "a7ee780fe5879b1a", - "5a50d77e3a43a840", - "cbe87d4bcae3956c", - "58dd64a73de47edd", - "82d583e20cf34448", - "4e0612dc2d3303e4" - ] - ] - }, - { - "id": "4e0612dc2d3303e4", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 650, - "y": 2260, - "wires": [ - [ - "7c9b55b69296dda1" - ] - ] - }, - { - "id": "0a7f97c9915f5e4b", - "type": "change", - "z": "8e9c7f123e3fa72b", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 630, - "y": 2780, - "wires": [ - [ - "ad497b400e60edda" - ] - ] - }, { "id": "a2f6fd63e69752c5", "type": "ui_led", @@ -2108,6 +1867,7 @@ "id": "537d9c8f0a6b511c", "type": "ui_led", "z": "8e9c7f123e3fa72b", + "d": true, "order": 3, "group": "fdf81fd80a36f0f7", "width": 0, @@ -2881,21 +2641,223 @@ "wires": [] }, { - "id": "247b448bf9282116", - "type": "debug", + "id": "c79265e016d12310", + "type": "mqtt in", "z": "8e9c7f123e3fa72b", - "name": "debug 1", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1360, - "y": 2160, + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE1", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2520, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "c1113c6a5d0e3596", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/CD", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 2460, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "521f784956d95632", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2580, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "6e4ae55e35c6e79d", + "type": "mqtt in", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE3", + "qos": "2", + "datatype": "json", + "broker": "f6f673e95e75873d", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 2640, + "wires": [ + [ + "87fdd7ab519e84b8" + ] + ] + }, + { + "id": "87fdd7ab519e84b8", + "type": "function", + "z": "8e9c7f123e3fa72b", + "name": "ButtonCtrl", + "func": "if (msg.topic != topic_tx_request)\n{\n // Inputs \n if (debug_input) node.warn(\"Topic = \" + msg.topic)\n /*\n * POWER\n */\n if (msg.topic == topic_power)\n {\n if (debug_input) node.warn(\"Received Power signal = \" + msg.payload)\n state_power = msg.payload\n }\n /*\n * SOURCE CD\n */\n if (msg.topic == topic_cd)\n {\n if (debug_input) node.warn(\"Received source to CD\")\n state_changed |= state_source != \"cd\"\n state_source = \"cd\"\n }\n /*\n * SOURCE AG03\n */\n if (msg.topic == topic_ag03)\n {\n if (debug_input) node.warn(\"Received source to AG03\")\n state_changed |= state_source != \"ag03\"\n state_source = \"ag03\"\n }\n /*\n * SOURCE RASPI\n */\n if (msg.topic == topic_raspi)\n {\n if (debug_input) node.warn(\"Received source to RASPI\")\n state_changed |= state_source != \"raspi\"\n state_source = \"raspi\"\n }\n /*\n * SOURCE PHONO\n */\n if (msg.topic == topic_phono)\n {\n if (debug_input) node.warn(\"Received source to PHONO\")\n state_changed |= state_source != \"phono\"\n state_source = \"phono\"\n }\n}\nelse\n{\n /*\n * Enabled\n */\n if (!state_power)\n {\n state_changed |= state_enabled \n state_enabled = false\n tm = null\n }\n else\n {\n if (tm == null)\n {\n tm = msg.payload\n }\n if (msg.payload - tm > 1000)\n {\n state_changed |= !state_enabled \n state_enabled = true\n }\n }\n \n if (state_changed){\n if (debug_tx) node.error(\"State is changed. Sending out messages\")\n if (debug_tx) node.warn(\"Power = \" + state_power)\n if (debug_tx) node.warn(\"Source = \" + state_source)\n state_changed = false\n /*\n * Uncolored Buttons\n */\n var msg_other = { topic: \"other\", enabled: state_enabled };\n /*\n * CD\n */\n if (state_source == \"cd\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_cd = { topic: \"cd\", enabled: state_enabled, background: background };\n /*\n * RASPI\n */\n if (state_source == \"raspi\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_raspi = { topic: \"raspi\", enabled: state_enabled, background: background };\n /*\n * PHONO\n */\n if (state_source == \"phono\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_phono = { topic: \"phono\", enabled: state_enabled, background: background };\n /*\n * AG03\n */\n if (state_source == \"ag03\")\n {\n background = \"#257ce0\"\n }\n else\n {\n background = \"#007b6d\"\n \n }\n var msg_ag03 = { topic: \"ag03\", enabled: state_enabled, background: background };\n //\n return [msg_other, msg_cd, msg_raspi, msg_phono, msg_ag03];\n }\n}", + "outputs": 5, + "timeout": 0, + "noerr": 0, + "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\ndebug_input = false\ndebug_tx = false\n//\ntopic_power = \"my_apps/gfw/dirk/powerplug/output/1\"\ntopic_cd = \"my_apps/gfw/dirk/remote_ctrl/RAS5/CD\"\ntopic_raspi = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE1\"\ntopic_phono = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2\"\ntopic_ag03 = \"my_apps/gfw/dirk/remote_ctrl/RAS5/LINE3\"\ntopic_tx_request = \"tx_request\"\n//\nstate_power = false\nstate_enabled = false\nstate_source = \"\"\nstate_changed = true\n//\ntm = null", + "finalize": "", + "libs": [], + "x": 600, + "y": 2520, + "wires": [ + [ + "82d583e20cf34448", + "5a50d77e3a43a840" + ], + [ + "c1389f9f380b0542" + ], + [ + "9e8359b1ca5e794c" + ], + [ + "fa0a223ba05e771a" + ], + [ + "a7ee780fe5879b1a" + ] + ] + }, + { + "id": "3bcf480352a8d445", + "type": "inject", + "z": "8e9c7f123e3fa72b", + "name": "", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "0.1", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "tx_request", + "payload": "", + "payloadType": "date", + "x": 160, + "y": 2800, + "wires": [ + [ + "87fdd7ab519e84b8", + "32c3dc97ebb09497" + ] + ] + }, + { + "id": "05f25fc0144f98a8", + "type": "mqtt out", + "z": "8e9c7f123e3fa72b", + "name": "", + "topic": "my_apps/gfw/dirk/remote_ctrl/RAS5/LINE2", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "f6f673e95e75873d", + "x": 1470, + "y": 2580, "wires": [] }, + { + "id": "fa0a223ba05e771a", + "type": "ui_button", + "z": "8e9c7f123e3fa72b", + "name": "", + "group": "8bb63e2d106e61a9", + "order": 5, + "width": "2", + "height": "1", + "passthru": false, + "label": "Phono", + "tooltip": "", + "color": "", + "bgcolor": "{{msg.background}}", + "className": "", + "icon": "", + "payload": "true", + "payloadType": "bool", + "topic": "topic", + "topicType": "msg", + "x": 1110, + "y": 2580, + "wires": [ + [ + "05f25fc0144f98a8" + ] + ] + }, + { + "id": "32c3dc97ebb09497", + "type": "function", + "z": "8e9c7f123e3fa72b", + "name": "ButtonCtrl", + "func": "if (msg.topic != topic_tx_request)\n{\n // Inputs \n if (debug_input) node.warn(\"Topic = \" + msg.topic)\n /*\n * POWER\n */\n if (msg.topic == topic_power)\n {\n if (debug_input) node.warn(\"Received Power signal = \" + msg.payload)\n state_power = msg.payload\n }\n}\nelse\n{\n /*\n * Enabled\n */\n if (!state_power)\n {\n state_changed |= state_enabled \n state_enabled = false\n tm = null\n }\n else\n {\n if (tm == null)\n {\n tm = msg.payload\n }\n if (msg.payload - tm > 1000)\n {\n state_changed |= !state_enabled \n state_enabled = true\n }\n }\n \n if (state_changed){\n if (debug_tx) node.error(\"State is changed. Sending out messages\")\n if (debug_tx) node.warn(\"Power = \" + state_power)\n state_changed = false\n /*\n * Uncolored Buttons\n */\n var msg_other = { topic: \"other\", enabled: state_enabled };\n //\n return msg_other;\n }\n}", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\ndebug_input = true\ndebug_tx = true\n//\ntopic_power = \"my_apps/gfw/dirk/powerplug/output/3\"\ntopic_tx_request = \"tx_request\"\n//\nstate_power = false\nstate_enabled = false\nstate_changed = true\n//\ntm = null", + "finalize": "", + "libs": [], + "x": 600, + "y": 2980, + "wires": [ + [ + "fe0ed22185cec253", + "20b370e467c1438a", + "8ada9701cffecf8f", + "ef494099580b898c", + "b1e58bfe996c56d3", + "1c4167983bda6925" + ] + ] + }, { "id": "3261d3bb95b50d09", "type": "comment", @@ -5814,7 +5776,6 @@ "id": "2290c1b5e14ba664", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "c5f87828f0888a6f", "order": 5, @@ -5998,7 +5959,6 @@ "id": "5fc9f02303bb391c", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "36ba0c088930c9ea", "order": 5, @@ -6471,7 +6431,6 @@ "id": "ad594a58a14a533e", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "2d8cc5990c1886e5", "order": 5, @@ -6814,7 +6773,6 @@ "id": "a6d310b51f76c3e3", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "6048820d9f2e4c06", "order": 5, @@ -7408,7 +7366,6 @@ "id": "275a854a15aeeff2", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "310658633f5b9c9c", "order": 4, @@ -7809,7 +7766,6 @@ "id": "05de1078dfa86a74", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "1fd324daac2dcbe8", "order": 4, @@ -8210,7 +8166,6 @@ "id": "02e3af123b5a8ab6", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "8b7175856c5dc2bc", "order": 4, @@ -8611,7 +8566,6 @@ "id": "61e5770ac7fba408", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "f44c10be6990386a", "order": 7, @@ -9040,7 +8994,6 @@ "id": "c4c482c4da1e7867", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "91179f0029b4efaf", "order": 4, @@ -9665,7 +9618,6 @@ "id": "c7a0883cefe27eb5", "type": "ui_button", "z": "4526d61e20635824", - "d": true, "name": "", "group": "b5812a591e37c885", "order": 4,