From 553e322c48b2a31c08a5ba85439d90db23c57fff Mon Sep 17 00:00:00 2001 From: JcDenis Date: Sat, 27 Apr 2024 14:52:59 +0200 Subject: [PATCH] add flowfuse nodered dashboard 2 ui --- README.md | 1 + config-nodes.json | 111 + flow-manager-nodes-order.json | 2 +- flows/K.Room.json | 1208 +++ flows/K.Translate.json | 1380 ++++ flows/Kernel.json | 13126 ++++++++++++++++---------------- flows/R.Config.json | 1456 ++++ flows/R.Home.json | 240 + package.json | 3 +- 9 files changed, 10970 insertions(+), 6557 deletions(-) create mode 100644 flows/K.Room.json create mode 100644 flows/K.Translate.json create mode 100644 flows/R.Config.json create mode 100644 flows/R.Home.json diff --git a/README.md b/README.md index bddf45b..183e64b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Flows are written under Node-red v3.1.9 with following packages : * node-red-contrib-queue-gate 1.5.5 * node-red-contrib-simple-gate 0.5.2 * node-red-contrib-stackhero-influxdb-v2 1.0.4 +* @flowfuse/node-red-dashboard 1.8.1 (nodered dashboard 2) Flows also required a working MQTT broker and a InfluxDB database. It additionnaly uses some Unifi and Amazon Alexa stuff. diff --git a/config-nodes.json b/config-nodes.json index 0a8b8ee..65f43c8 100644 --- a/config-nodes.json +++ b/config-nodes.json @@ -221,5 +221,116 @@ "willMsg": {}, "userProps": "", "sessionExpiry": "" + }, + { + "id": "2a41126e36225675", + "type": "ui-page", + "name": "Configuration", + "ui": "2d75e4809d2a6fbf", + "path": "/config", + "icon": "tune", + "layout": "flex", + "theme": "0e53487482752cfe", + "order": 6, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "fcf92ce9c73cd90d", + "type": "ui-page", + "name": "Pièces", + "ui": "2d75e4809d2a6fbf", + "path": "/pieces", + "icon": "door", + "layout": "flex", + "theme": "0e53487482752cfe", + "order": 3, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "d464a60fe4e4c421", + "type": "ui-group", + "name": "Tableau de bord", + "page": "2a41126e36225675", + "width": "6", + "height": "1", + "order": 3, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "36396f5285df476c", + "type": "ui-group", + "name": "Pièce", + "page": "fcf92ce9c73cd90d", + "width": "6", + "height": "5", + "order": 1, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "0e53487482752cfe", + "type": "ui-theme", + "name": "home theme", + "colors": { + "surface": "#ffffff", + "primary": "#aebd84", + "bgPage": "#eeeeee", + "groupBg": "#fafafa", + "groupOutline": "#cccccc" + }, + "sizes": { + "pagePadding": "10px", + "groupGap": "10px", + "groupBorderRadius": "4px", + "widgetGap": "10px" + } + }, + { + "id": "2d75e4809d2a6fbf", + "type": "ui-base", + "name": "home", + "path": "/dashboard", + "includeClientData": true, + "acceptsClientConfig": [ + "ui-notification", + "ui-control" + ], + "showPathInSidebar": false, + "navigationStyle": "icon" + }, + { + "id": "018c8ded1126b49a", + "type": "ui-group", + "name": "Noyau", + "page": "2a41126e36225675", + "width": "6", + "height": "3", + "order": 8, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "88a7ce8d8fd7e72b", + "type": "ui-group", + "name": "Suppression de metric", + "page": "2a41126e36225675", + "width": "6", + "height": "1", + "order": 6, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false" } ] \ No newline at end of file diff --git a/flow-manager-nodes-order.json b/flow-manager-nodes-order.json index 381f924..40c6e10 100644 --- a/flow-manager-nodes-order.json +++ b/flow-manager-nodes-order.json @@ -1 +1 @@ -["ab51b1e8cad7b700","bcb4426f5301b9f2","ae92592138b2c924","eefe7f96cf64784b","a0496edd95de60f3","3a98a00afc60d7cd","50456628f56ade66","96d8990f6a4978cc","656a3398842092de","648d078d534a93be","818a8590288d6409","29b883f9654391c8","1efacea0cfc080e2","414cdce0186b98d1","e9594aa2f7507ac5","4c2fd374879bcc62","1f31199c6478bed6","5a56612ef35c5fd3","3110fe9246e63b1e","63149b5b57a97c5b","a8dc4fab59fdefb4","f67a857ae75d906f","a762a7a552cb9f03","17a8ab0a21c7790b","a3c29b70c82234cc","72988ccecf802b11","b9a706d9e4980c1e","c7f0e1480df909e9","6c3162f93343ce7e","93fb3d4a50d16da0","bc29c56f900c8d36","3e71b89d61df9fd3","6386e9a459469b53","e9bd98a0b6e0d58c","20b116b788ef3f27","3711bd3352570a6c","bbf7bb18989048e1","9ea365cc69a1f2bf","cf7f82b8517f3250","d9548e9b1a2e6f36","874075d44d19869a","266f4436dc45ce89","3be00f677c6457bd","4937527cddd45b61","bd21a8b1786d3ed2","234feecbe12db6fa","a23c2aa7e24eb8f7","b5e2408a7d09537d","1e687cd4c0cc0ece","24eae452ebf32be6","cf382d5398b6de43","0bf16a20b9656c59","fee31a77e542b203","b40a3b0d2d310907","518b634fa908a4aa","ae4487a0bf7f922f","3ab6bcaac666ddc4","c706245ab487b7e2","d1b208e623179a25","22dd0707e6d3a364","51fc92ba27d12eaa","cdd708cca8782382","8b2a4e4f622431e7","d6ba6007b1901314","ef0a4a5a649e056f","0bd651126b27aac6","442ad702808e3c66","69041daa92bc0a8b","9262e99e20e0e654","d318afa2a81e4ff9","b2ccb6a2a248015d","9c89a41128573752","89d2eebcaafb5013","e93e8daa30075ae6","f61f5fe80ddf6ff1","637b84024e725f38","282bb73eb4892ab9","a2d25db2ace537ae","a4e3db9cc35fc9eb","7d45ca7ad7f363fe","70ae9d85820c14fb","6140ca98749acd85","bb1e8e34559c5a7f","83e8a9fa324dd4b9","51b002c497ad57cd","0b32686fe74c253f","5e3cb9bb3266089b","06581753b7673f83","14a0a0839924964f","411b13dfb3e989f0","4908c2284e498338","5891781e4a61525a","aa275d99ba85bee2","d34f38f155583ff7","5460a158225a328b","24058eec92534b27","1ceced58d0c32e85","ac4653be6ea01477","30220f4fe07e35a4","ba77500cd9f7f6da","b08802b0dbd9a58b","8f4503a19f2f639e","561aaceffe076a5d","0ff47b07b863d0ae","e6d11d0438e20b80","80459ca7317cce90","3e1b4213132404be","546f190f3ec0c90d","7f1a03ba2d4eb5d1","c3d88e1872a9789b","d85fe6335a6eae7b","d02f1b2f2c3a2a30","28b6c3fdb407e73b","7f76434616f622dc","eed8990163b1ca81","840c05ce502e7fdd","f02b4584af0d800c","1b98c37b3b7502e4","33f7a250a7341c43","ca442e58e65b32f8","c367834c9cccbe38","412878f8c488a0f4","7fa17301839c0fa6","764da2d0527c1ef6","d4146047c079ac62","074a67bf0fcf09ad","287d719de575c01f","004bb30c27c94fb4","867a71b7dae9c844","722c773f6314dd40","caa3c5097468f133","d8b85eb94b57b81f","4db395b3e8fa404f","4cfd419f66b58eda","d07502e0620ed3d9","da4da5b15f106b4a","6d6bcbb7ce10198f","9518f42686aaf99c","af3082ef59725979","3eda424ef17379e9","81b03b89f507e5ce","a6b8c9c223ea5942","82908fcfdf7f599a","62dd3e8d6c87a0f9","92d0d0a5798c06cf","247945a0f503ac90","341bc94dee8e9f96","1d8f71c67df6cec9","3738b065c50a0cac","ebdbee7baef678a6","3eb59215b6fb19e2","1052950934d566bf","a411175648a9f14e","55db3023ac9ae3c1","d4252f4120129d32","e60cbfea876d91e7","11a6de1c96795b4d","be2acafce4c2c74d","c8d1b777a117ee56","85c0a8032c692a9a","c73c3b488741b764","7a6db5a28141b284","a7e18f888c96ad05","5d53068f8b9e6936","b0b2d9829230be99","a34aeb4c51bcf655","fa2acb5ac9bb8c8c","3423fd727184042c","ca7f0d58c55a1358","b491f7eb02575108","c16f1ae420f44fb5","08f26275ef69e598","3398dde44269eb08","6c324b24ca028984","ac5c011465193c4e","57bd505da426547c","7b89e1d6b81feb1d","529f7e707934e514","fb76731a2064ad65","0c032c944567a64d","a3594a90f69fe537","5d0abf7735e4d38c","a39cfa7867f1affb","f0991abcca9403bc","de0c34e8104574b0","a4f8287c851b1796","03eacf7a446d906c","014d8a5287538444","735774bdb56f6be4","be945e0c2c2208b0","ed6bcbd32e72afe1","24a3e98a92c0d57d","19a5c46ec6c71456","0f1e413815ecc824","d40db95f9a154c3a","630dfeb0e033a476","56d93c268a656fc4","2cc2cdcf0b1f710e","b961d989c357e6d6","af148bf44b019b35","0a4c943dc3a06f0d","e12bb3f8258f4439","a19b9fbac3e9f89c","0aca727fc835e615","afd6a49ad55de215","432e8063fae7039e","dfb4b5350a9383c9","9d4a1f539c9bf58c","43c695b9490f5104","44308739c0f759ad","be0beee97ed2d572","5205205461f48680","2356f963725e84c6","d3064571c2fde064","ede79ed6b82aa804","b1e2b474e4c77892","faeff76a4321bee2","4163673982458b27","4280a1f889505f0c","27e3bd6cada7b554","7c75b6b921f30409","a98fde87c6b47e6e","61b310386916497a","b43439c6ab36fbfc","e287e4f4d7f3a174","ec2704a8e18114ea","14a5f0183ce7ec8d","5c4a3b8ce0220dd9","58359ad51f36d68e","c5465d5f64db4b45","1cbff7f3a7317c5b","4176c5d5bc97709c","1102208726a88a10","b425ab40ef97a294","592483f2183c6711","c5dc4f8c357a596f","074313bb4e48de6f","a441e9df790a0c3c","285c9ffa2f524440","234620fe148e1dca","5a49d1f4b12618a7","e4e85a27e4775ac9","e6a4e861a99b196c","12f02c43a82b46f9","68ad3074767eb2c3","56d131373d4e2f78","3a4c72588bb27ab4","357c6d106dec5efd","8bbf418d277b4df7","e2ef5706b35de7b0","c15d0c66ed5af79f","4264ed01f3943e2f","031a6afd8300356a","206c1fb4a48067df","d7f0ba2534f27b82","ca80e5fe27609a11","6466ac9bacd083e2","4689a4035be0c82e","895db12fd6d94a67","82229e46e51f94f5","fc88fb69cac1e5a5","0d78bebcc5541e02","3c3fe996c199516b","c785aed10e83430a","9f055c7cccb634c1","b90652e7f7d28f66","ae5e8ae05adac7fd","0831bd7e7daa4915","dd79805b7971cbbb","582f8e6b17a9d9d1","6473c46ecd9304c7","3743db17cb401840","1e908b6060a584ea","eca0e6f3657f0564","7cd303d0aadd1433","a974cddec777bd94","8fdb5986494986cc","baaac9a301ef150a","85ea82a3282907b1","19dc49123e66ac71","1eea209368626bc1","149401230ed2ed4c","2ba23548e87b0292","3cd44612df58e32f","8413c966166387ab","92f76d0a8a4f1178","ee66fb38bde2fdf4","cd2ac560f85327a9","94c79b8f52f0b6ba","bfa594bf1f876c92","2dedf503efee73c8","e5f9a77af592fc78","35c936be0ce55676","c1d2a5b213c6568a","6d65af0eaae695a3","d3ac50a83c871cc8","fabb645e0d88c91c","e68b067b48b94ca2","acd42b52bd581740","d74bb73a0966b4bd","92dac97dfb662f2d","b0f54ce6c23c6da6","011c5e62deb510bb","4bab6cfef1e2c932","df1059b56622c582","7c98833082d48029","25445f5a9b787a0a","cb09b67a37901112","3e652e3da2c711ec","f7b2d28d9c7d66ae","464bfd100a5740b8","324b4e5e9a9419cc","eebbf361272ea85b","d248a5e5ab11c9d7","d9b8f97fb0897586","d49116054bd5cd56","797eac89000183db","afcaa4289efc76f2","af147f11a3d4d652","577298e83998f6d7","e5ceb5335c3b0d43","ce0256824b38971d","6a5bccc5dc98def6","f54479dc5f66620e","71e189afd8659a2d","b6d241198242a6e5","0e0adba49a29f70f","7662aba4a1cc9dd0","99e1c9e8654a9f81","4f02d67d81a83e86","e7ac1f9f3c8ae78c","ba9d70c1045cb088","6f7e7a5d7ebd031d","d40b223a978b9a1e","5070cadd19aa3954","f9f49c8d382ee23d","bc396dcc308c42ee","73a136cc319902eb","d84b5b147f5fa7a4","6ec40cadb83543dd","b6f0d1b534279a98","0414c3f0d95341ac","91841d3915124c8e","e112327c4a55aa35","c2532fc6bfffd154","31b42964ff3deb4f","4b32e84f6c624568","2e643b1746a93b44","c213314798c4a9be","bd6f2717b2f30241","825837a029db8ec5","45647475dad51f30","ef13c93a34fcab87","b75da43db9ea9e7e","a72b20551a3b1f8c","0385dd3208b83d41","2467c6c0b11061b2","20617e4a877c8fc3","73d23bc533cf4217","2623529da72f4fab"] +["ab51b1e8cad7b700","bcb4426f5301b9f2","bac2b08cd7c2e421","e19f53e3dc7ab928","aab0c030de7df5cc","c2bfa0fea66ef080","ae92592138b2c924","eefe7f96cf64784b","a0496edd95de60f3","3a98a00afc60d7cd","50456628f56ade66","96d8990f6a4978cc","656a3398842092de","648d078d534a93be","818a8590288d6409","29b883f9654391c8","1efacea0cfc080e2","414cdce0186b98d1","e9594aa2f7507ac5","4c2fd374879bcc62","1f31199c6478bed6","5a56612ef35c5fd3","3110fe9246e63b1e","63149b5b57a97c5b","a8dc4fab59fdefb4","f67a857ae75d906f","a762a7a552cb9f03","17a8ab0a21c7790b","a3c29b70c82234cc","72988ccecf802b11","b9a706d9e4980c1e","c7f0e1480df909e9","6c3162f93343ce7e","93fb3d4a50d16da0","bc29c56f900c8d36","3e71b89d61df9fd3","6386e9a459469b53","e9bd98a0b6e0d58c","20b116b788ef3f27","3711bd3352570a6c","bbf7bb18989048e1","9ea365cc69a1f2bf","cf7f82b8517f3250","d9548e9b1a2e6f36","874075d44d19869a","266f4436dc45ce89","3be00f677c6457bd","4937527cddd45b61","bd21a8b1786d3ed2","234feecbe12db6fa","a23c2aa7e24eb8f7","b5e2408a7d09537d","1e687cd4c0cc0ece","24eae452ebf32be6","cf382d5398b6de43","0bf16a20b9656c59","fee31a77e542b203","b40a3b0d2d310907","518b634fa908a4aa","ae4487a0bf7f922f","3ab6bcaac666ddc4","c706245ab487b7e2","d1b208e623179a25","0aeb80f7dfc7025e","287e49684dc25aac","f6132c9f3c5a2911","8ebd43deda9d56d4","b64c96e257072f51","0bdefb56ee5ef918","fedaeb34f9bc97e4","2af6505c256f006d","507cfaf8503b2019","a0476b1a7ec53d40","dad2ac027d4f9f24","dd003c121420d45a","5465922c8e3555e3","c25adeeb66986f83","e6f586ce062979fb","2b5e040737ce3d94","c76679b82b664526","22dd0707e6d3a364","51fc92ba27d12eaa","cdd708cca8782382","8b2a4e4f622431e7","d6ba6007b1901314","ef0a4a5a649e056f","0bd651126b27aac6","442ad702808e3c66","2a41126e36225675","fcf92ce9c73cd90d","d464a60fe4e4c421","36396f5285df476c","0e53487482752cfe","2d75e4809d2a6fbf","018c8ded1126b49a","88a7ce8d8fd7e72b","69041daa92bc0a8b","9262e99e20e0e654","d318afa2a81e4ff9","b2ccb6a2a248015d","9c89a41128573752","89d2eebcaafb5013","e93e8daa30075ae6","f61f5fe80ddf6ff1","637b84024e725f38","282bb73eb4892ab9","a2d25db2ace537ae","a4e3db9cc35fc9eb","7d45ca7ad7f363fe","70ae9d85820c14fb","6140ca98749acd85","bb1e8e34559c5a7f","83e8a9fa324dd4b9","51b002c497ad57cd","0b32686fe74c253f","5e3cb9bb3266089b","06581753b7673f83","14a0a0839924964f","411b13dfb3e989f0","4908c2284e498338","5891781e4a61525a","aa275d99ba85bee2","d34f38f155583ff7","5460a158225a328b","24058eec92534b27","1ceced58d0c32e85","ac4653be6ea01477","30220f4fe07e35a4","ba77500cd9f7f6da","b08802b0dbd9a58b","8f4503a19f2f639e","561aaceffe076a5d","0ff47b07b863d0ae","e6d11d0438e20b80","80459ca7317cce90","3e1b4213132404be","546f190f3ec0c90d","7f1a03ba2d4eb5d1","c3d88e1872a9789b","d85fe6335a6eae7b","d02f1b2f2c3a2a30","28b6c3fdb407e73b","7f76434616f622dc","eed8990163b1ca81","840c05ce502e7fdd","f02b4584af0d800c","1b98c37b3b7502e4","33f7a250a7341c43","ca442e58e65b32f8","c367834c9cccbe38","412878f8c488a0f4","7fa17301839c0fa6","764da2d0527c1ef6","d4146047c079ac62","074a67bf0fcf09ad","287d719de575c01f","004bb30c27c94fb4","867a71b7dae9c844","722c773f6314dd40","caa3c5097468f133","d8b85eb94b57b81f","4db395b3e8fa404f","4cfd419f66b58eda","d07502e0620ed3d9","da4da5b15f106b4a","6d6bcbb7ce10198f","9518f42686aaf99c","af3082ef59725979","3eda424ef17379e9","81b03b89f507e5ce","a6b8c9c223ea5942","82908fcfdf7f599a","62dd3e8d6c87a0f9","92d0d0a5798c06cf","247945a0f503ac90","341bc94dee8e9f96","1d8f71c67df6cec9","3738b065c50a0cac","ebdbee7baef678a6","3eb59215b6fb19e2","1052950934d566bf","a411175648a9f14e","55db3023ac9ae3c1","d4252f4120129d32","e60cbfea876d91e7","11a6de1c96795b4d","be2acafce4c2c74d","c8d1b777a117ee56","85c0a8032c692a9a","c73c3b488741b764","7a6db5a28141b284","a7e18f888c96ad05","5d53068f8b9e6936","b0b2d9829230be99","a34aeb4c51bcf655","fa2acb5ac9bb8c8c","3423fd727184042c","ca7f0d58c55a1358","b491f7eb02575108","c16f1ae420f44fb5","08f26275ef69e598","3398dde44269eb08","6c324b24ca028984","ac5c011465193c4e","57bd505da426547c","7b89e1d6b81feb1d","529f7e707934e514","fb76731a2064ad65","0c032c944567a64d","a3594a90f69fe537","5d0abf7735e4d38c","a39cfa7867f1affb","f0991abcca9403bc","de0c34e8104574b0","a4f8287c851b1796","03eacf7a446d906c","014d8a5287538444","735774bdb56f6be4","be945e0c2c2208b0","ed6bcbd32e72afe1","24a3e98a92c0d57d","19a5c46ec6c71456","0f1e413815ecc824","d40db95f9a154c3a","630dfeb0e033a476","56d93c268a656fc4","2cc2cdcf0b1f710e","b961d989c357e6d6","af148bf44b019b35","0a4c943dc3a06f0d","e12bb3f8258f4439","a19b9fbac3e9f89c","0aca727fc835e615","afd6a49ad55de215","432e8063fae7039e","dfb4b5350a9383c9","9d4a1f539c9bf58c","43c695b9490f5104","44308739c0f759ad","be0beee97ed2d572","5205205461f48680","2356f963725e84c6","d3064571c2fde064","ede79ed6b82aa804","b1e2b474e4c77892","faeff76a4321bee2","4163673982458b27","4280a1f889505f0c","27e3bd6cada7b554","7c75b6b921f30409","a98fde87c6b47e6e","61b310386916497a","b43439c6ab36fbfc","e287e4f4d7f3a174","ec2704a8e18114ea","14a5f0183ce7ec8d","5c4a3b8ce0220dd9","58359ad51f36d68e","c5465d5f64db4b45","1cbff7f3a7317c5b","4176c5d5bc97709c","1102208726a88a10","b425ab40ef97a294","592483f2183c6711","c5dc4f8c357a596f","074313bb4e48de6f","a441e9df790a0c3c","285c9ffa2f524440","234620fe148e1dca","5a49d1f4b12618a7","e4e85a27e4775ac9","e6a4e861a99b196c","12f02c43a82b46f9","68ad3074767eb2c3","56d131373d4e2f78","3a4c72588bb27ab4","357c6d106dec5efd","8bbf418d277b4df7","e2ef5706b35de7b0","c15d0c66ed5af79f","4264ed01f3943e2f","031a6afd8300356a","206c1fb4a48067df","d7f0ba2534f27b82","ca80e5fe27609a11","6466ac9bacd083e2","4689a4035be0c82e","895db12fd6d94a67","82229e46e51f94f5","fc88fb69cac1e5a5","0d78bebcc5541e02","3c3fe996c199516b","c785aed10e83430a","9f055c7cccb634c1","b90652e7f7d28f66","ae5e8ae05adac7fd","0831bd7e7daa4915","dd79805b7971cbbb","582f8e6b17a9d9d1","6473c46ecd9304c7","3743db17cb401840","1e908b6060a584ea","eca0e6f3657f0564","7cd303d0aadd1433","a974cddec777bd94","8fdb5986494986cc","baaac9a301ef150a","85ea82a3282907b1","19dc49123e66ac71","1eea209368626bc1","149401230ed2ed4c","2ba23548e87b0292","3cd44612df58e32f","8413c966166387ab","92f76d0a8a4f1178","ee66fb38bde2fdf4","cd2ac560f85327a9","94c79b8f52f0b6ba","bfa594bf1f876c92","2dedf503efee73c8","e5f9a77af592fc78","35c936be0ce55676","c1d2a5b213c6568a","6d65af0eaae695a3","d3ac50a83c871cc8","fabb645e0d88c91c","e68b067b48b94ca2","acd42b52bd581740","d74bb73a0966b4bd","92dac97dfb662f2d","b0f54ce6c23c6da6","011c5e62deb510bb","4bab6cfef1e2c932","df1059b56622c582","7c98833082d48029","25445f5a9b787a0a","cb09b67a37901112","3e652e3da2c711ec","f7b2d28d9c7d66ae","464bfd100a5740b8","324b4e5e9a9419cc","eebbf361272ea85b","d248a5e5ab11c9d7","d9b8f97fb0897586","d49116054bd5cd56","797eac89000183db","afcaa4289efc76f2","af147f11a3d4d652","577298e83998f6d7","e5ceb5335c3b0d43","ce0256824b38971d","6a5bccc5dc98def6","f54479dc5f66620e","71e189afd8659a2d","b6d241198242a6e5","0e0adba49a29f70f","7662aba4a1cc9dd0","99e1c9e8654a9f81","4f02d67d81a83e86","e7ac1f9f3c8ae78c","ba9d70c1045cb088","6f7e7a5d7ebd031d","d40b223a978b9a1e","5070cadd19aa3954","f9f49c8d382ee23d","bc396dcc308c42ee","73a136cc319902eb","d84b5b147f5fa7a4","6ec40cadb83543dd","b6f0d1b534279a98","0414c3f0d95341ac","91841d3915124c8e","e112327c4a55aa35","c2532fc6bfffd154","31b42964ff3deb4f","4b32e84f6c624568","2e643b1746a93b44","c213314798c4a9be","bd6f2717b2f30241","825837a029db8ec5","45647475dad51f30","ef13c93a34fcab87","b75da43db9ea9e7e","a72b20551a3b1f8c","0385dd3208b83d41","2467c6c0b11061b2","20617e4a877c8fc3","73d23bc533cf4217","2623529da72f4fab","57308f5a0cd3a19c","1193f5bfb9ed605e","c5bc483a2486391a","0649e79192cac511","d927741265d14171","d5d8c4715ec0a26e","2e5308d0d41d8f45","f0b254fe1c4498b4","71a537d09616f957","35482cea99bb8930","85c266f81afb8149","b1e3b8733a9b07d9","dfefeb84f19b0cdd","fb3656f3f703f806","9f8ed7d17fa2563e","b7220c5a5cc8839a","82a875cf6cbcd593","a78013f03326b7de","27363d8813e65608","a0ce1bcf4f05582e","55370ee6ac50747e","56b664a04bf746c4","25831aff94551d94","3df11a07928c3384","166a810ac9fa6788","4ebc8d54a2d607e3","3a386aa44264e024","5a20016530ef7456","f0b35e8721d6f54d","80cea71f7ecda2ce","8c963cf6be9b3705","224f8c1a9118c6b3","5bea31636c590d4d","8c512f9aad968692","1f0ebd92466c4bf2","32a9b240b25a2502","11f433c750eb1ef0","6d85ed8e8c797a61","882064c17728eabc","d210ac6cc3e866c0","ef0d3b8996ec469c","fb0afb89fb191395","e32bfa4021bdd7a5","8a4cad272a925665","d1f40d903ba49ae7","c32288ec6571a37f","32eb12f106b8c786","606f3caa9058900f","4e6003732b266fe2","68c4344a4704c54f","4ba5de5239f9fc87","1c06cdf0f784558b","116de42631d4b17a","f138e16b633d9429","2690f4e06626ebda","177aee50c214945c","ca620b08c9922bd0","8d6827df412a4059","b6c03b0d5a9952c9","9a20f95447f8ddfd","d4f555ae99a41fee","48ee82efe7b41570","290e5853a51cb170","e15462f85288d3c0","66835e34ae95f3f0","9ee5e12567650c9d","3b74b2448cdb18a9","b2e5e7af716d4ec6","aa39991b7847c574","1dd86a8b8b446749","3ec4a86ec9ec37f6","ef424db05e8a1103","1c55a9cf641c38ba","4ed33d50e1b4ebc9","656d1866a8ae8cf8","9e4bfee0db3051d4","74172837e07ab80d","1be6ca3c2b8615a2","06976c9133796ab8","3d2ea19ae9c4b9d2","9043871af737eb1a","b6323e1460f6f50c","b375ca01bb8f1e43","dc4343f890e4a3e1","57e1a96c1bf54302","cd4ebdd2c6d86368","eed5df5df9eb8030","68823f1adeca7d61","4bec446170e0294c","065cece9562e787b","0c2ac00fd2259ffd","0e565e95e63c3654","6c9ecc5fe46a02a5","1c80c2edc1e21840","68a233d0b60bf782","8c2ef16fb2ddd993","1ceb6708c71a814b","aa2c3406c988ef4b","b0da73a9ef6b358d","8820bdb5b422a686","90eddf07569aadc0","5b6c97eb42f7b833","417badba7b8593d3","cfd1c312affb0a45","aaba9cf674e8cfe0","4eb13f33c92436a9","a103f8cc78fc5ad7","61464b0778183fdb","9cd19202a5858a27","9401ba1506c0d201","f59d0b8138fa7525","43b5266fef6d73b9","55366488e4c7e9c3","649a5ab3d32438c5","5c6b98d2f2d16291","e9341386035b1f2c","d274c198b7d6186e","41f5791b1f5773f4","d5741bb4d825808f","608c1dd85cfe7947","385e81d9be142966","3737a5a641de4ed0","acda966a000b4e22","d4e3490de6550eea","b15ee9861786845f","eeff7c0a47ecf9ee","5a86c32a699d6a2e","1ff5fd68e1799ae5","2a90b9bd2e0a777c","7a76fc8d520b5b9e","772791bd8b527740","34f9df4fdd3bd8df","2302782a6ca41102","a69d70a155c21ef3"] diff --git a/flows/K.Room.json b/flows/K.Room.json new file mode 100644 index 0000000..c1ca995 --- /dev/null +++ b/flows/K.Room.json @@ -0,0 +1,1208 @@ +[ + { + "id": "aab0c030de7df5cc", + "type": "tab", + "label": "K.Room", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "0aeb80f7dfc7025e", + "type": "group", + "z": "aab0c030de7df5cc", + "name": "room - bucket", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true, + "stroke": "#ffC000" + }, + "nodes": [ + "606f3caa9058900f", + "4e6003732b266fe2", + "68c4344a4704c54f" + ], + "x": 94, + "y": 19, + "w": 342, + "h": 82 + }, + { + "id": "287e49684dc25aac", + "type": "group", + "z": "aab0c030de7df5cc", + "name": "room - catch", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "4ba5de5239f9fc87", + "1c06cdf0f784558b" + ], + "x": 534, + "y": 19, + "w": 432, + "h": 82 + }, + { + "id": "f6132c9f3c5a2911", + "type": "group", + "z": "aab0c030de7df5cc", + "name": "room - metric", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "116de42631d4b17a", + "f138e16b633d9429", + "2690f4e06626ebda" + ], + "x": 1054, + "y": 19, + "w": 342, + "h": 82 + }, + { + "id": "8ebd43deda9d56d4", + "type": "group", + "z": "aab0c030de7df5cc", + "name": "room - config", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "0bdefb56ee5ef918", + "fedaeb34f9bc97e4" + ], + "x": 68, + "y": 173, + "w": 1454, + "h": 194 + }, + { + "id": "b64c96e257072f51", + "type": "group", + "z": "aab0c030de7df5cc", + "name": "room - selection", + "style": { + "fill": "#92d04f", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "66835e34ae95f3f0", + "9ee5e12567650c9d", + "3b74b2448cdb18a9", + "b2e5e7af716d4ec6", + "aa39991b7847c574", + "1dd86a8b8b446749", + "3ec4a86ec9ec37f6", + "ef424db05e8a1103", + "1c55a9cf641c38ba", + "4ed33d50e1b4ebc9", + "656d1866a8ae8cf8", + "9e4bfee0db3051d4", + "74172837e07ab80d", + "1be6ca3c2b8615a2", + "06976c9133796ab8", + "3d2ea19ae9c4b9d2", + "9043871af737eb1a", + "b6323e1460f6f50c", + "eed5df5df9eb8030", + "b375ca01bb8f1e43", + "dc4343f890e4a3e1", + "57e1a96c1bf54302" + ], + "x": 94, + "y": 439, + "w": 1432, + "h": 442 + }, + { + "id": "0bdefb56ee5ef918", + "type": "group", + "z": "aab0c030de7df5cc", + "g": "8ebd43deda9d56d4", + "name": "room - config - device", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "177aee50c214945c", + "ca620b08c9922bd0", + "8d6827df412a4059" + ], + "x": 94, + "y": 199, + "w": 502, + "h": 82 + }, + { + "id": "fedaeb34f9bc97e4", + "type": "group", + "z": "aab0c030de7df5cc", + "g": "8ebd43deda9d56d4", + "name": "room - config - ui", + "style": { + "fill": "#6f2fa0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "b6c03b0d5a9952c9", + "9a20f95447f8ddfd", + "d4f555ae99a41fee", + "cd4ebdd2c6d86368", + "48ee82efe7b41570", + "290e5853a51cb170", + "e15462f85288d3c0" + ], + "x": 694, + "y": 199, + "w": 802, + "h": 142 + }, + { + "id": "606f3caa9058900f", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "0aeb80f7dfc7025e", + "name": "bucket", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "room", + "tot": "str" + }, + { + "t": "set", + "p": "bucket", + "pt": "flow", + "to": "bucket", + "tot": "msg" + }, + { + "t": "set", + "p": "room", + "pt": "flow", + "to": "", + "tot": "str" + }, + { + "t": "set", + "p": "index", + "pt": "flow", + "to": "{}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 60, + "wires": [ + [ + "68c4344a4704c54f" + ] + ] + }, + { + "id": "4e6003732b266fe2", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "0aeb80f7dfc7025e", + "name": "room - bucket", + "links": [ + "25445f5a9b787a0a" + ], + "x": 135, + "y": 60, + "wires": [ + [ + "606f3caa9058900f" + ] + ] + }, + { + "id": "68c4344a4704c54f", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "0aeb80f7dfc7025e", + "name": "room - bucket", + "mode": "link", + "links": [ + "177aee50c214945c" + ], + "x": 395, + "y": 60, + "wires": [] + }, + { + "id": "4ba5de5239f9fc87", + "type": "catch", + "z": "aab0c030de7df5cc", + "g": "287e49684dc25aac", + "name": "catch error", + "scope": null, + "uncaught": false, + "x": 620, + "y": 60, + "wires": [ + [ + "1c06cdf0f784558b" + ] + ] + }, + { + "id": "1c06cdf0f784558b", + "type": "debug", + "z": "aab0c030de7df5cc", + "g": "287e49684dc25aac", + "name": "room - catch error", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 830, + "y": 60, + "wires": [] + }, + { + "id": "116de42631d4b17a", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "f6132c9f3c5a2911", + "name": "room - metric", + "mode": "link", + "links": [ + "206c1fb4a48067df" + ], + "x": 1355, + "y": 60, + "wires": [] + }, + { + "id": "f138e16b633d9429", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "f6132c9f3c5a2911", + "name": "set metric", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "room", + "tot": "flow" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "topic", + "tot": "msg" + }, + { + "t": "set", + "p": "repeat", + "pt": "msg", + "to": "true", + "tot": "bool" + }, + { + "t": "delete", + "p": "path", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1220, + "y": 60, + "wires": [ + [ + "116de42631d4b17a" + ] + ] + }, + { + "id": "2690f4e06626ebda", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "f6132c9f3c5a2911", + "name": "room - metric", + "links": [], + "x": 1095, + "y": 60, + "wires": [ + [ + "f138e16b633d9429" + ] + ] + }, + { + "id": "177aee50c214945c", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "0bdefb56ee5ef918", + "name": "room - config - device", + "links": [ + "68c4344a4704c54f" + ], + "x": 135, + "y": 240, + "wires": [ + [ + "ca620b08c9922bd0" + ] + ] + }, + { + "id": "ca620b08c9922bd0", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "0bdefb56ee5ef918", + "name": "config / reset timer / number / 5", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "config", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "reset timer", + "tot": "str" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "number", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "5", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 350, + "y": 240, + "wires": [ + [ + "8d6827df412a4059" + ] + ] + }, + { + "id": "8d6827df412a4059", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "0bdefb56ee5ef918", + "name": "room - config - device", + "mode": "link", + "links": [ + "bfa594bf1f876c92" + ], + "x": 555, + "y": 240, + "wires": [] + }, + { + "id": "b6c03b0d5a9952c9", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "room - config - ui - metric", + "links": [ + "031a6afd8300356a" + ], + "x": 735, + "y": 240, + "wires": [ + [ + "d4f555ae99a41fee" + ] + ] + }, + { + "id": "9a20f95447f8ddfd", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "room - config - ui - metric", + "mode": "link", + "links": [ + "206c1fb4a48067df" + ], + "x": 1455, + "y": 300, + "wires": [] + }, + { + "id": "d4f555ae99a41fee", + "type": "switch", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "check path", + "property": "path", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "room/config/reset timer", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 890, + "y": 240, + "wires": [ + [ + "cd4ebdd2c6d86368" + ] + ] + }, + { + "id": "48ee82efe7b41570", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "set metric", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "config", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "topic", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1320, + "y": 300, + "wires": [ + [ + "9a20f95447f8ddfd" + ] + ] + }, + { + "id": "290e5853a51cb170", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "room - config - ui - load", + "links": [ + "94c79b8f52f0b6ba" + ], + "x": 735, + "y": 300, + "wires": [ + [ + "e15462f85288d3c0" + ] + ] + }, + { + "id": "e15462f85288d3c0", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "name": "from global metrics", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "metrics[msg.bucket]config['reset timer']", + "tot": "global" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 910, + "y": 300, + "wires": [ + [ + "cd4ebdd2c6d86368" + ] + ] + }, + { + "id": "66835e34ae95f3f0", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "set room", + "rules": [ + { + "t": "set", + "p": "room", + "pt": "flow", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "page_title", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "metrics[msg.payload]", + "tot": "global" + }, + { + "t": "set", + "p": "index", + "pt": "flow", + "to": "{}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 280, + "y": 720, + "wires": [ + [ + "3b74b2448cdb18a9", + "b375ca01bb8f1e43" + ] + ] + }, + { + "id": "9ee5e12567650c9d", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "enabled metric", + "rules": [ + { + "t": "set", + "p": "enabled", + "pt": "msg", + "to": "true", + "tot": "bool" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1100, + "y": 840, + "wires": [ + [ + "dc4343f890e4a3e1" + ] + ] + }, + { + "id": "3b74b2448cdb18a9", + "type": "split", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "split bucket", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "measurement", + "x": 470, + "y": 780, + "wires": [ + [ + "b2e5e7af716d4ec6" + ] + ] + }, + { + "id": "b2e5e7af716d4ec6", + "type": "split", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "split measurement", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "field", + "x": 690, + "y": 780, + "wires": [ + [ + "aa39991b7847c574" + ] + ] + }, + { + "id": "aa39991b7847c574", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "cleanup", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "room", + "tot": "flow" + }, + { + "t": "delete", + "p": "parts", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 900, + "y": 780, + "wires": [ + [ + "9ee5e12567650c9d" + ] + ] + }, + { + "id": "1dd86a8b8b446749", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "disabled elements", + "rules": [ + { + "t": "set", + "p": "enabled", + "pt": "msg", + "to": "false", + "tot": "bool" + }, + { + "t": "set", + "p": "room", + "pt": "msg", + "to": "", + "tot": "str" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "remove", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1270, + "y": 660, + "wires": [ + [ + "9e4bfee0db3051d4" + ] + ] + }, + { + "id": "3ec4a86ec9ec37f6", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - selection - metric", + "links": [ + "031a6afd8300356a" + ], + "x": 135, + "y": 840, + "wires": [ + [ + "ef424db05e8a1103" + ] + ] + }, + { + "id": "ef424db05e8a1103", + "type": "switch", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "check bucket", + "property": "bucket", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "room", + "vt": "flow" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 290, + "y": 840, + "wires": [ + [ + "9ee5e12567650c9d" + ] + ] + }, + { + "id": "1c55a9cf641c38ba", + "type": "trigger", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "wait delay then reset visibility", + "op1": "", + "op2": "", + "op1type": "nul", + "op2type": "str", + "duration": "30", + "extend": true, + "overrideDelay": true, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 580, + "y": 540, + "wires": [ + [ + "4ed33d50e1b4ebc9" + ] + ] + }, + { + "id": "4ed33d50e1b4ebc9", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "unset room", + "rules": [ + { + "t": "set", + "p": "room", + "pt": "flow", + "to": "", + "tot": "str" + }, + { + "t": "set", + "p": "room", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 830, + "y": 480, + "wires": [ + [ + "9043871af737eb1a" + ] + ] + }, + { + "id": "656d1866a8ae8cf8", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "set visibility delay", + "rules": [ + { + "t": "set", + "p": "delay", + "pt": "msg", + "to": "metrics.room.config['reset timer']", + "tot": "global" + }, + { + "t": "set", + "p": "delay", + "pt": "msg", + "to": "msg.delay*60000", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 310, + "y": 540, + "wires": [ + [ + "1c55a9cf641c38ba" + ] + ] + }, + { + "id": "9e4bfee0db3051d4", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - selection - reset", + "mode": "link", + "links": [], + "x": 1435, + "y": 660, + "wires": [] + }, + { + "id": "74172837e07ab80d", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - seletion - select", + "mode": "link", + "links": [], + "x": 1395, + "y": 600, + "wires": [] + }, + { + "id": "1be6ca3c2b8615a2", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - selection - select", + "links": [], + "x": 135, + "y": 660, + "wires": [ + [ + "1dd86a8b8b446749", + "656d1866a8ae8cf8", + "66835e34ae95f3f0", + "3d2ea19ae9c4b9d2" + ] + ] + }, + { + "id": "06976c9133796ab8", + "type": "link in", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - selection - reset", + "links": [ + "94c79b8f52f0b6ba" + ], + "x": 135, + "y": 480, + "wires": [ + [ + "4ed33d50e1b4ebc9" + ] + ] + }, + { + "id": "3d2ea19ae9c4b9d2", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "payload to room", + "rules": [ + { + "t": "set", + "p": "room", + "pt": "msg", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 300, + "y": 600, + "wires": [ + [ + "74172837e07ab80d" + ] + ] + }, + { + "id": "9043871af737eb1a", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "reset menu title", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "", + "tot": "str" + }, + { + "t": "set", + "p": "page_title", + "pt": "msg", + "to": "Selectionner une pièce", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 480, + "wires": [ + [ + "b375ca01bb8f1e43", + "57e1a96c1bf54302", + "1dd86a8b8b446749" + ] + ] + }, + { + "id": "b6323e1460f6f50c", + "type": "link out", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "room - selection - metric", + "mode": "link", + "links": [], + "x": 1415, + "y": 840, + "wires": [] + }, + { + "id": "b375ca01bb8f1e43", + "type": "change", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "format payload", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$uppercase(msg.page_title)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1260, + "y": 720, + "wires": [ + [ + "eed5df5df9eb8030" + ] + ] + }, + { + "id": "dc4343f890e4a3e1", + "type": "delay", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "50 ms", + "pauseType": "delay", + "timeout": "50", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 1290, + "y": 840, + "wires": [ + [ + "b6323e1460f6f50c" + ] + ] + }, + { + "id": "57e1a96c1bf54302", + "type": "delay", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "name": "wait 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 1250, + "y": 540, + "wires": [ + [ + "74172837e07ab80d" + ] + ] + }, + { + "id": "cd4ebdd2c6d86368", + "type": "ui-slider", + "z": "aab0c030de7df5cc", + "g": "fedaeb34f9bc97e4", + "group": "d464a60fe4e4c421", + "name": "reset delay", + "label": "Délai de remise à zéro", + "tooltip": "", + "order": 0, + "width": "6", + "height": "1", + "passthru": false, + "outs": "end", + "topic": "reset timer", + "topicType": "str", + "thumbLabel": true, + "min": "1", + "max": "30", + "step": "0.5", + "className": "", + "x": 1130, + "y": 300, + "wires": [ + [ + "48ee82efe7b41570" + ] + ] + }, + { + "id": "eed5df5df9eb8030", + "type": "ui-text", + "z": "aab0c030de7df5cc", + "g": "b64c96e257072f51", + "group": "36396f5285df476c", + "order": 1, + "width": "6", + "height": "1", + "name": "Pièce", + "label": "", + "format": "{{msg.payload}}", + "layout": "row-center", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "className": "", + "x": 1450, + "y": 720, + "wires": [] + } +] \ No newline at end of file diff --git a/flows/K.Translate.json b/flows/K.Translate.json new file mode 100644 index 0000000..78e4f3b --- /dev/null +++ b/flows/K.Translate.json @@ -0,0 +1,1380 @@ +[ + { + "id": "bac2b08cd7c2e421", + "type": "tab", + "label": "K.Translate", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "5465922c8e3555e3", + "type": "group", + "z": "bac2b08cd7c2e421", + "name": "translate - catch", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "57308f5a0cd3a19c", + "1193f5bfb9ed605e" + ], + "x": 534, + "y": 19, + "w": 452, + "h": 82 + }, + { + "id": "c25adeeb66986f83", + "type": "group", + "z": "bac2b08cd7c2e421", + "name": "translate - en to fr", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "c5bc483a2486391a", + "0649e79192cac511", + "d927741265d14171", + "d5d8c4715ec0a26e", + "2e5308d0d41d8f45", + "f0b254fe1c4498b4", + "71a537d09616f957", + "35482cea99bb8930", + "85c266f81afb8149", + "b1e3b8733a9b07d9", + "dfefeb84f19b0cdd", + "fb3656f3f703f806", + "9f8ed7d17fa2563e", + "b7220c5a5cc8839a", + "82a875cf6cbcd593", + "a78013f03326b7de", + "27363d8813e65608", + "a0ce1bcf4f05582e", + "55370ee6ac50747e", + "56b664a04bf746c4", + "25831aff94551d94", + "3df11a07928c3384", + "166a810ac9fa6788", + "4ebc8d54a2d607e3", + "3a386aa44264e024", + "5a20016530ef7456", + "f0b35e8721d6f54d", + "80cea71f7ecda2ce", + "8c963cf6be9b3705", + "224f8c1a9118c6b3", + "5bea31636c590d4d", + "8c512f9aad968692", + "1f0ebd92466c4bf2", + "32a9b240b25a2502", + "11f433c750eb1ef0", + "6d85ed8e8c797a61", + "882064c17728eabc" + ], + "x": 94, + "y": 199, + "w": 762, + "h": 1402 + }, + { + "id": "57308f5a0cd3a19c", + "type": "catch", + "z": "bac2b08cd7c2e421", + "g": "5465922c8e3555e3", + "name": "catch error", + "scope": null, + "uncaught": false, + "x": 620, + "y": 60, + "wires": [ + [ + "1193f5bfb9ed605e" + ] + ] + }, + { + "id": "1193f5bfb9ed605e", + "type": "debug", + "z": "bac2b08cd7c2e421", + "g": "5465922c8e3555e3", + "name": "translate - catch error", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 840, + "y": 60, + "wires": [] + }, + { + "id": "c5bc483a2486391a", + "type": "link in", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "translate - en to fr", + "links": [], + "x": 135, + "y": 500, + "wires": [ + [ + "0649e79192cac511" + ] + ] + }, + { + "id": "0649e79192cac511", + "type": "switch", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "check field", + "property": "field", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "string", + "vt": "string" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 290, + "y": 500, + "wires": [ + [ + "d927741265d14171" + ] + ] + }, + { + "id": "d927741265d14171", + "type": "switch", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "select word", + "property": "field", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "detector", + "vt": "str" + }, + { + "t": "eq", + "v": "sensor", + "vt": "str" + }, + { + "t": "eq", + "v": "sensor 2", + "vt": "str" + }, + { + "t": "eq", + "v": "probe", + "vt": "str" + }, + { + "t": "eq", + "v": "ceiling", + "vt": "str" + }, + { + "t": "eq", + "v": "lamp", + "vt": "str" + }, + { + "t": "eq", + "v": "socket", + "vt": "str" + }, + { + "t": "eq", + "v": "socket 1", + "vt": "str" + }, + { + "t": "eq", + "v": "socket 2", + "vt": "str" + }, + { + "t": "eq", + "v": "door", + "vt": "str" + }, + { + "t": "eq", + "v": "window", + "vt": "str" + }, + { + "t": "eq", + "v": "right bay", + "vt": "str" + }, + { + "t": "eq", + "v": "left bay", + "vt": "str" + }, + { + "t": "eq", + "v": "box", + "vt": "str" + }, + { + "t": "eq", + "v": "balloon", + "vt": "str" + }, + { + "t": "eq", + "v": "speaker", + "vt": "str" + }, + { + "t": "eq", + "v": "desk", + "vt": "str" + }, + { + "t": "eq", + "v": "fire", + "vt": "str" + }, + { + "t": "eq", + "v": "remote", + "vt": "str" + }, + { + "t": "eq", + "v": "shutter", + "vt": "str" + }, + { + "t": "eq", + "v": "stopped", + "vt": "str" + }, + { + "t": "eq", + "v": "offloaded", + "vt": "str" + }, + { + "t": "eq", + "v": "suspended", + "vt": "str" + }, + { + "t": "eq", + "v": "powered", + "vt": "str" + }, + { + "t": "eq", + "v": "reached", + "vt": "str" + }, + { + "t": "eq", + "v": "pilot", + "vt": "str" + }, + { + "t": "eq", + "v": "bedside", + "vt": "str" + }, + { + "t": "eq", + "v": "bedside jc", + "vt": "str" + }, + { + "t": "eq", + "v": "bedside flo", + "vt": "str" + }, + { + "t": "eq", + "v": "remote jc", + "vt": "str" + }, + { + "t": "eq", + "v": "remote flo", + "vt": "str" + }, + { + "t": "eq", + "v": "airflow", + "vt": "str" + }, + { + "t": "eq", + "v": "cmv", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 34, + "x": 490, + "y": 500, + "wires": [ + [ + "d5d8c4715ec0a26e" + ], + [ + "2e5308d0d41d8f45" + ], + [ + "f0b35e8721d6f54d" + ], + [ + "f0b254fe1c4498b4" + ], + [ + "35482cea99bb8930" + ], + [], + [ + "5a20016530ef7456" + ], + [ + "32a9b240b25a2502" + ], + [ + "11f433c750eb1ef0" + ], + [ + "b7220c5a5cc8839a" + ], + [ + "82a875cf6cbcd593" + ], + [ + "25831aff94551d94" + ], + [ + "3df11a07928c3384" + ], + [ + "166a810ac9fa6788" + ], + [ + "80cea71f7ecda2ce" + ], + [ + "85c266f81afb8149" + ], + [ + "3a386aa44264e024" + ], + [ + "dfefeb84f19b0cdd" + ], + [ + "fb3656f3f703f806" + ], + [ + "9f8ed7d17fa2563e" + ], + [ + "a78013f03326b7de" + ], + [ + "27363d8813e65608" + ], + [ + "a0ce1bcf4f05582e" + ], + [ + "55370ee6ac50747e" + ], + [ + "56b664a04bf746c4" + ], + [ + "4ebc8d54a2d607e3" + ], + [ + "1f0ebd92466c4bf2" + ], + [ + "8c963cf6be9b3705" + ], + [ + "224f8c1a9118c6b3" + ], + [ + "5bea31636c590d4d" + ], + [ + "8c512f9aad968692" + ], + [ + "6d85ed8e8c797a61" + ], + [ + "882064c17728eabc" + ], + [ + "b1e3b8733a9b07d9" + ] + ] + }, + { + "id": "d5d8c4715ec0a26e", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "detector", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "detecteur", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 240, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "2e5308d0d41d8f45", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "sensor", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "capteur", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 280, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "f0b254fe1c4498b4", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "probe", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "sonde", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 360, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "71a537d09616f957", + "type": "link out", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "translate - en to fr", + "mode": "return", + "links": [], + "x": 815, + "y": 500, + "wires": [] + }, + { + "id": "35482cea99bb8930", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "ceiling", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "plafonnier", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 400, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "85c266f81afb8149", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "speaker", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "haut parleur", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 840, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "b1e3b8733a9b07d9", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "unknow", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "field", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1560, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "dfefeb84f19b0cdd", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "fire", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "incendie", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 920, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "fb3656f3f703f806", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "remote", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "télécommande", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 960, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "9f8ed7d17fa2563e", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "shutter", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "volet", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 1000, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "b7220c5a5cc8839a", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "door", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "porte", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 600, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "82a875cf6cbcd593", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "window", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "fenêtre", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 640, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "a78013f03326b7de", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "stopped", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "Arrêté", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1040, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "27363d8813e65608", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "offloaded", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "Délesté", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1080, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "a0ce1bcf4f05582e", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "suspended", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "Suspendu", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 690, + "y": 1120, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "55370ee6ac50747e", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "powered", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "Allumé", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1160, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "56b664a04bf746c4", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "reached", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "Atteint", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1200, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "25831aff94551d94", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "right bay", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "baie droite", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 680, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "3df11a07928c3384", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "left bay", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "baie gauche", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 720, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "166a810ac9fa6788", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "box", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "trappe", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 760, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "4ebc8d54a2d607e3", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "pilot", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "pilote", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 1240, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "3a386aa44264e024", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "desk", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "bureau", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 880, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "5a20016530ef7456", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "socket", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "pc", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 480, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "f0b35e8721d6f54d", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "sensor 2", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "capteur 2", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 320, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "80cea71f7ecda2ce", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "balloon", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "ballon", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 800, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "8c963cf6be9b3705", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "bedside jc", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "chevet jc", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1320, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "224f8c1a9118c6b3", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "bedside flo", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "chevet flo", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 690, + "y": 1360, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "5bea31636c590d4d", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "remote jc", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "telecommande jc", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1400, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "8c512f9aad968692", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "remote flo", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "telecommande flo", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1440, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "1f0ebd92466c4bf2", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "bedside", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "chevet", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 1280, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "32a9b240b25a2502", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "socket 1", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "pc 1", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 520, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "11f433c750eb1ef0", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "socket 2", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "pc 2", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 560, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "6d85ed8e8c797a61", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "airflow", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "ventilation", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 1480, + "wires": [ + [ + "71a537d09616f957" + ] + ] + }, + { + "id": "882064c17728eabc", + "type": "change", + "z": "bac2b08cd7c2e421", + "g": "c25adeeb66986f83", + "name": "cmv", + "rules": [ + { + "t": "set", + "p": "trans", + "pt": "msg", + "to": "vmc", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 1520, + "wires": [ + [ + "71a537d09616f957" + ] + ] + } +] \ No newline at end of file diff --git a/flows/Kernel.json b/flows/Kernel.json index 8425ec0..ac8ab39 100644 --- a/flows/Kernel.json +++ b/flows/Kernel.json @@ -7,6 +7,116 @@ "info": "", "env": [] }, + { + "id": "3a98a00afc60d7cd", + "type": "group", + "z": "ab51b1e8cad7b700", + "name": "auto - device", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "63149b5b57a97c5b", + "3110fe9246e63b1e", + "5a56612ef35c5fd3" + ], + "x": 42, + "y": 4707, + "w": 6886, + "h": 366 + }, + { + "id": "50456628f56ade66", + "type": "group", + "z": "ab51b1e8cad7b700", + "name": "device - system kernel version", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "f67a857ae75d906f", + "a8dc4fab59fdefb4" + ], + "x": 68, + "y": 5153, + "w": 1094, + "h": 134, + "info": "this is a fake device for kernel boot (ensure that one device is registered)" + }, + { + "id": "96d8990f6a4978cc", + "type": "group", + "z": "ab51b1e8cad7b700", + "name": "kernel", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "a762a7a552cb9f03", + "bc29c56f900c8d36", + "3e71b89d61df9fd3", + "6386e9a459469b53", + "e9bd98a0b6e0d58c", + "20b116b788ef3f27", + "3711bd3352570a6c", + "bbf7bb18989048e1", + "cf7f82b8517f3250", + "9ea365cc69a1f2bf" + ], + "x": 68, + "y": 173, + "w": 5194, + "h": 2654 + }, + { + "id": "656a3398842092de", + "type": "group", + "z": "ab51b1e8cad7b700", + "name": "mqtt", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "93fb3d4a50d16da0", + "6c3162f93343ce7e", + "c7f0e1480df909e9", + "b9a706d9e4980c1e", + "72988ccecf802b11", + "a3c29b70c82234cc", + "17a8ab0a21c7790b" + ], + "x": 42, + "y": 2967, + "w": 1816, + "h": 1686 + }, + { + "id": "648d078d534a93be", + "type": "group", + "z": "ab51b1e8cad7b700", + "name": "kernel - catch", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "d248a5e5ab11c9d7", + "eebbf361272ea85b" + ], + "x": 534, + "y": 19, + "w": 432, + "h": 82 + }, { "id": "818a8590288d6409", "type": "group", @@ -28,134 +138,399 @@ "h": 82 }, { - "id": "648d078d534a93be", + "id": "5a56612ef35c5fd3", "type": "group", "z": "ab51b1e8cad7b700", - "name": "kernel - catch", + "g": "3a98a00afc60d7cd", + "name": "", "style": { - "fill": "#ff0000", + "fill": "#ffffff", + "label": true, + "stroke": "#92d04f", + "fill-opacity": "0.5" + }, + "nodes": [ + "874075d44d19869a", + "d9548e9b1a2e6f36" + ], + "x": 5108, + "y": 4793, + "w": 1794, + "h": 254 + }, + { + "id": "3110fe9246e63b1e", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "3a98a00afc60d7cd", + "name": "", + "style": { + "fill": "#ffffff", + "label": true, + "stroke": "#0070c0", + "fill-opacity": "0.5" + }, + "nodes": [ + "3be00f677c6457bd", + "266f4436dc45ce89" + ], + "x": 1768, + "y": 4793, + "w": 3294, + "h": 254 + }, + { + "id": "63149b5b57a97c5b", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "3a98a00afc60d7cd", + "name": "", + "style": { + "fill": "#ffffff", + "label": true, + "stroke": "#ffC000", + "fill-opacity": "0.5" + }, + "nodes": [ + "bd21a8b1786d3ed2", + "4937527cddd45b61" + ], + "x": 68, + "y": 4733, + "w": 1664, + "h": 314 + }, + { + "id": "a8dc4fab59fdefb4", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "50456628f56ade66", + "name": "", + "style": { + "fill": "#ffC000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "d248a5e5ab11c9d7", - "eebbf361272ea85b" + "840c05ce502e7fdd", + "eed8990163b1ca81", + "7f76434616f622dc" ], - "x": 534, - "y": 19, - "w": 432, + "x": 94, + "y": 5179, + "w": 542, "h": 82 }, { - "id": "cf7f82b8517f3250", + "id": "f67a857ae75d906f", "type": "group", "z": "ab51b1e8cad7b700", - "g": "96d8990f6a4978cc", - "name": "kernel - boot", + "g": "50456628f56ade66", + "name": "", "style": { - "fill": "#ff0000", + "fill": "#0070c0", "fill-opacity": "0.05", "label": true }, "nodes": [ - "464bfd100a5740b8", - "f7b2d28d9c7d66ae", - "3e652e3da2c711ec", - "cb09b67a37901112", - "25445f5a9b787a0a", - "7c98833082d48029", - "4bab6cfef1e2c932", - "011c5e62deb510bb", - "b0f54ce6c23c6da6", - "92dac97dfb662f2d", - "d74bb73a0966b4bd" + "33f7a250a7341c43", + "1b98c37b3b7502e4", + "f02b4584af0d800c" ], - "x": 94, - "y": 439, - "w": 2022, - "h": 202, - "info": "when flow start, this part launch all sub flows\r\ndevices registration must be called from this part output" + "x": 674, + "y": 5179, + "w": 462, + "h": 82 }, { - "id": "9ea365cc69a1f2bf", + "id": "a762a7a552cb9f03", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kernel - automate", + "name": "kernel - cron", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "df1059b56622c582", - "acd42b52bd581740", - "324b4e5e9a9419cc", - "e68b067b48b94ca2", - "cd2ac560f85327a9", - "ee66fb38bde2fdf4", - "92f76d0a8a4f1178", - "8413c966166387ab", - "3cd44612df58e32f" + "caa3c5097468f133", + "722c773f6314dd40", + "867a71b7dae9c844", + "004bb30c27c94fb4", + "287d719de575c01f", + "074a67bf0fcf09ad", + "d4146047c079ac62", + "764da2d0527c1ef6", + "7fa17301839c0fa6", + "412878f8c488a0f4", + "c367834c9cccbe38", + "ca442e58e65b32f8" ], "x": 94, - "y": 199, - "w": 792, + "y": 2539, + "w": 652, + "h": 262, + "info": "cron minute = every minutes from flow start\r\ncron hour = every hours from flow start\r\ncron day = every day at 3 am" + }, + { + "id": "17a8ab0a21c7790b", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for rhasspy", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "a23c2aa7e24eb8f7", + "234feecbe12db6fa" + ], + "x": 68, + "y": 4433, + "w": 1764, + "h": 194 + }, + { + "id": "a3c29b70c82234cc", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for zwave", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "1e687cd4c0cc0ece", + "b5e2408a7d09537d" + ], + "x": 68, + "y": 4193, + "w": 1744, + "h": 194 + }, + { + "id": "72988ccecf802b11", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for bluetooth", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "cf382d5398b6de43", + "24eae452ebf32be6" + ], + "x": 68, + "y": 3953, + "w": 1764, + "h": 194 + }, + { + "id": "b9a706d9e4980c1e", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for teleinfo", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "fee31a77e542b203", + "0bf16a20b9656c59" + ], + "x": 68, + "y": 3713, + "w": 1764, + "h": 194 + }, + { + "id": "c7f0e1480df909e9", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for zigbee", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "518b634fa908a4aa", + "b40a3b0d2d310907" + ], + "x": 68, + "y": 3473, + "w": 1764, + "h": 194 + }, + { + "id": "6c3162f93343ce7e", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for rfxcom", + "style": { + "fill": "#ffffff", + "fill-opacity": "0.5", + "label": true, + "stroke": "#0070c0" + }, + "nodes": [ + "3ab6bcaac666ddc4", + "ae4487a0bf7f922f" + ], + "x": 68, + "y": 3233, + "w": 1764, + "h": 194 + }, + { + "id": "93fb3d4a50d16da0", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "656a3398842092de", + "name": "mqtt server for nodered", + "style": { + "label": true, + "fill": "#ffffff", + "fill-opacity": "0.5", + "stroke": "#0070c0" + }, + "nodes": [ + "d1b208e623179a25", + "c706245ab487b7e2" + ], + "x": 68, + "y": 2993, + "w": 1764, + "h": 194 + }, + { + "id": "bc29c56f900c8d36", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "96d8990f6a4978cc", + "name": "kernel - read and write to file", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "b1e2b474e4c77892", + "ede79ed6b82aa804", + "d3064571c2fde064", + "2356f963725e84c6", + "5205205461f48680", + "be0beee97ed2d572", + "44308739c0f759ad", + "43c695b9490f5104", + "9d4a1f539c9bf58c", + "dfb4b5350a9383c9", + "432e8063fae7039e", + "afd6a49ad55de215" + ], + "x": 94, + "y": 2359, + "w": 1242, + "h": 142 + }, + { + "id": "3e71b89d61df9fd3", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "96d8990f6a4978cc", + "name": "kernel - write to InluxDB", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "58359ad51f36d68e", + "0aca727fc835e615", + "5c4a3b8ce0220dd9", + "14a5f0183ce7ec8d", + "ec2704a8e18114ea", + "e287e4f4d7f3a174", + "b43439c6ab36fbfc", + "61b310386916497a", + "a98fde87c6b47e6e", + "7c75b6b921f30409", + "27e3bd6cada7b554", + "4280a1f889505f0c", + "4163673982458b27", + "faeff76a4321bee2", + "28b6c3fdb407e73b" + ], + "x": 94, + "y": 2119, + "w": 2452, "h": 202 }, { - "id": "bbf7bb18989048e1", + "id": "6386e9a459469b53", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kernel - device", + "name": "kernel - write to MQTT", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "fabb645e0d88c91c", - "d3ac50a83c871cc8", - "6d65af0eaae695a3", - "c1d2a5b213c6568a", - "35c936be0ce55676", - "e5f9a77af592fc78", - "2dedf503efee73c8", - "bfa594bf1f876c92", - "94c79b8f52f0b6ba", - "2ba23548e87b0292" + "b425ab40ef97a294", + "1102208726a88a10", + "4176c5d5bc97709c", + "1cbff7f3a7317c5b", + "c5465d5f64db4b45" ], "x": 94, - "y": 679, - "w": 1412, - "h": 202, - "info": "devices must register their definitions to this part input" + "y": 1939, + "w": 792, + "h": 142 }, { - "id": "3711bd3352570a6c", + "id": "e9bd98a0b6e0d58c", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kenel - gate", + "name": "kernel - write to journal", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "149401230ed2ed4c", - "1eea209368626bc1", - "19dc49123e66ac71", - "85ea82a3282907b1", - "baaac9a301ef150a", - "8fdb5986494986cc" + "e4e85a27e4775ac9", + "5a49d1f4b12618a7", + "234620fe148e1dca", + "285c9ffa2f524440", + "a441e9df790a0c3c", + "074313bb4e48de6f", + "c5dc4f8c357a596f", + "592483f2183c6711" ], "x": 94, - "y": 919, + "y": 1639, "w": 1072, - "h": 202, - "info": "gate can be opened or closed\r\nWhen closed, all messages are stopped from MQTT links and kernel" + "h": 262 }, { "id": "20b116b788ef3f27", @@ -210,862 +585,191 @@ "h": 442 }, { - "id": "e9bd98a0b6e0d58c", + "id": "3711bd3352570a6c", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kernel - write to journal", + "name": "kenel - gate", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "e4e85a27e4775ac9", - "5a49d1f4b12618a7", - "234620fe148e1dca", - "285c9ffa2f524440", - "a441e9df790a0c3c", - "074313bb4e48de6f", - "c5dc4f8c357a596f", - "592483f2183c6711" + "149401230ed2ed4c", + "1eea209368626bc1", + "19dc49123e66ac71", + "85ea82a3282907b1", + "baaac9a301ef150a", + "8fdb5986494986cc" ], "x": 94, - "y": 1639, + "y": 919, "w": 1072, - "h": 262 + "h": 202, + "info": "gate can be opened or closed\r\nWhen closed, all messages are stopped from MQTT links and kernel" }, { - "id": "6386e9a459469b53", + "id": "bbf7bb18989048e1", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kernel - write to MQTT", + "name": "kernel - device", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "b425ab40ef97a294", - "1102208726a88a10", - "4176c5d5bc97709c", - "1cbff7f3a7317c5b", - "c5465d5f64db4b45" + "fabb645e0d88c91c", + "d3ac50a83c871cc8", + "6d65af0eaae695a3", + "c1d2a5b213c6568a", + "35c936be0ce55676", + "e5f9a77af592fc78", + "2dedf503efee73c8", + "bfa594bf1f876c92", + "94c79b8f52f0b6ba", + "2ba23548e87b0292" ], "x": 94, - "y": 1939, + "y": 679, + "w": 1412, + "h": 202, + "info": "devices must register their definitions to this part input" + }, + { + "id": "9ea365cc69a1f2bf", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "96d8990f6a4978cc", + "name": "kernel - automate", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "df1059b56622c582", + "acd42b52bd581740", + "324b4e5e9a9419cc", + "e68b067b48b94ca2", + "cd2ac560f85327a9", + "ee66fb38bde2fdf4", + "92f76d0a8a4f1178", + "8413c966166387ab", + "3cd44612df58e32f" + ], + "x": 94, + "y": 199, "w": 792, - "h": 142 - }, - { - "id": "3e71b89d61df9fd3", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "96d8990f6a4978cc", - "name": "kernel - write to InluxDB", - "style": { - "fill": "#ff0000", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "58359ad51f36d68e", - "0aca727fc835e615", - "5c4a3b8ce0220dd9", - "14a5f0183ce7ec8d", - "ec2704a8e18114ea", - "e287e4f4d7f3a174", - "b43439c6ab36fbfc", - "61b310386916497a", - "a98fde87c6b47e6e", - "7c75b6b921f30409", - "27e3bd6cada7b554", - "4280a1f889505f0c", - "4163673982458b27", - "faeff76a4321bee2", - "28b6c3fdb407e73b" - ], - "x": 94, - "y": 2119, - "w": 2452, "h": 202 }, { - "id": "bc29c56f900c8d36", + "id": "cf7f82b8517f3250", "type": "group", "z": "ab51b1e8cad7b700", "g": "96d8990f6a4978cc", - "name": "kernel - read and write to file", + "name": "kernel - boot", "style": { "fill": "#ff0000", "fill-opacity": "0.05", "label": true }, "nodes": [ - "b1e2b474e4c77892", - "ede79ed6b82aa804", - "d3064571c2fde064", - "2356f963725e84c6", - "5205205461f48680", - "be0beee97ed2d572", - "44308739c0f759ad", - "43c695b9490f5104", - "9d4a1f539c9bf58c", - "dfb4b5350a9383c9", - "432e8063fae7039e", - "afd6a49ad55de215" + "464bfd100a5740b8", + "f7b2d28d9c7d66ae", + "3e652e3da2c711ec", + "cb09b67a37901112", + "25445f5a9b787a0a", + "7c98833082d48029", + "4bab6cfef1e2c932", + "011c5e62deb510bb", + "b0f54ce6c23c6da6", + "92dac97dfb662f2d", + "d74bb73a0966b4bd" ], "x": 94, - "y": 2359, - "w": 1242, - "h": 142 + "y": 439, + "w": 2022, + "h": 202, + "info": "when flow start, this part launch all sub flows\r\ndevices registration must be called from this part output" }, { - "id": "656a3398842092de", + "id": "d9548e9b1a2e6f36", "type": "group", "z": "ab51b1e8cad7b700", - "name": "mqtt", + "g": "5a56612ef35c5fd3", + "name": "auto - metric - out", "style": { - "fill": "#777777", + "fill": "#92d04f", "fill-opacity": "0.05", "label": true }, "nodes": [ - "93fb3d4a50d16da0", - "6c3162f93343ce7e", - "c7f0e1480df909e9", - "b9a706d9e4980c1e", - "72988ccecf802b11", - "a3c29b70c82234cc", - "17a8ab0a21c7790b" + "e93e8daa30075ae6", + "89d2eebcaafb5013", + "9c89a41128573752", + "b2ccb6a2a248015d", + "d318afa2a81e4ff9", + "9262e99e20e0e654", + "69041daa92bc0a8b" ], - "x": 42, - "y": 2967, - "w": 1816, - "h": 1686 - }, - { - "id": "93fb3d4a50d16da0", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for nodered", - "style": { - "label": true, - "fill": "#ffffff", - "fill-opacity": "0.5", - "stroke": "#0070c0" - }, - "nodes": [ - "d1b208e623179a25", - "c706245ab487b7e2" - ], - "x": 68, - "y": 2993, - "w": 1764, - "h": 194 - }, - { - "id": "6c3162f93343ce7e", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for rfxcom", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "3ab6bcaac666ddc4", - "ae4487a0bf7f922f" - ], - "x": 68, - "y": 3233, - "w": 1764, - "h": 194 - }, - { - "id": "c7f0e1480df909e9", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for zigbee", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "518b634fa908a4aa", - "b40a3b0d2d310907" - ], - "x": 68, - "y": 3473, - "w": 1764, - "h": 194 - }, - { - "id": "b9a706d9e4980c1e", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for teleinfo", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "fee31a77e542b203", - "0bf16a20b9656c59" - ], - "x": 68, - "y": 3713, - "w": 1764, - "h": 194 - }, - { - "id": "72988ccecf802b11", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for bluetooth", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "cf382d5398b6de43", - "24eae452ebf32be6" - ], - "x": 68, - "y": 3953, - "w": 1764, - "h": 194 - }, - { - "id": "a3c29b70c82234cc", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for zwave", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "1e687cd4c0cc0ece", - "b5e2408a7d09537d" - ], - "x": 68, - "y": 4193, - "w": 1744, - "h": 194 - }, - { - "id": "17a8ab0a21c7790b", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "656a3398842092de", - "name": "mqtt server for rhasspy", - "style": { - "fill": "#ffffff", - "fill-opacity": "0.5", - "label": true, - "stroke": "#0070c0" - }, - "nodes": [ - "a23c2aa7e24eb8f7", - "234feecbe12db6fa" - ], - "x": 68, - "y": 4433, - "w": 1764, - "h": 194 - }, - { - "id": "d1b208e623179a25", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "93fb3d4a50d16da0", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "a19b9fbac3e9f89c", - "e12bb3f8258f4439", - "0a4c943dc3a06f0d", - "af148bf44b019b35", - "b961d989c357e6d6", - "2cc2cdcf0b1f710e", - "56d93c268a656fc4", - "d02f1b2f2c3a2a30" - ], - "x": 94, - "y": 3019, - "w": 1162, - "h": 142 - }, - { - "id": "c706245ab487b7e2", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "93fb3d4a50d16da0", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "630dfeb0e033a476", - "d40db95f9a154c3a", - "0f1e413815ecc824", - "19a5c46ec6c71456" - ], - "x": 1294, - "y": 3019, - "w": 512, - "h": 142 - }, - { - "id": "3ab6bcaac666ddc4", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "6c3162f93343ce7e", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "24a3e98a92c0d57d", - "ed6bcbd32e72afe1", - "be945e0c2c2208b0", - "735774bdb56f6be4", - "014d8a5287538444", - "03eacf7a446d906c" - ], - "x": 94, - "y": 3259, - "w": 1162, - "h": 142 - }, - { - "id": "ae4487a0bf7f922f", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "6c3162f93343ce7e", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "a4f8287c851b1796", - "de0c34e8104574b0", - "f0991abcca9403bc", - "a39cfa7867f1affb" - ], - "x": 1294, - "y": 3259, - "w": 512, - "h": 142 - }, - { - "id": "518b634fa908a4aa", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "c7f0e1480df909e9", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "5d0abf7735e4d38c", - "a3594a90f69fe537", - "0c032c944567a64d", - "fb76731a2064ad65", - "529f7e707934e514", - "7b89e1d6b81feb1d", - "57bd505da426547c" - ], - "x": 94, - "y": 3499, - "w": 1162, - "h": 142 - }, - { - "id": "b40a3b0d2d310907", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "c7f0e1480df909e9", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "ac5c011465193c4e", - "6c324b24ca028984", - "3398dde44269eb08", - "08f26275ef69e598" - ], - "x": 1294, - "y": 3499, - "w": 512, - "h": 142 - }, - { - "id": "fee31a77e542b203", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "b9a706d9e4980c1e", - "name": "devices teleinfo", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "c16f1ae420f44fb5", - "b491f7eb02575108", - "ca7f0d58c55a1358", - "3423fd727184042c", - "fa2acb5ac9bb8c8c", - "a34aeb4c51bcf655" - ], - "x": 94, - "y": 3739, - "w": 1162, - "h": 142 - }, - { - "id": "0bf16a20b9656c59", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "b9a706d9e4980c1e", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "b0b2d9829230be99", - "5d53068f8b9e6936", - "a7e18f888c96ad05", - "7a6db5a28141b284" - ], - "x": 1294, - "y": 3739, - "w": 512, - "h": 142 - }, - { - "id": "cf382d5398b6de43", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "72988ccecf802b11", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "c73c3b488741b764", - "85c0a8032c692a9a", - "c8d1b777a117ee56", - "be2acafce4c2c74d", - "11a6de1c96795b4d", - "e60cbfea876d91e7" - ], - "x": 94, - "y": 3979, - "w": 1162, - "h": 142 - }, - { - "id": "24eae452ebf32be6", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "72988ccecf802b11", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "d4252f4120129d32", - "55db3023ac9ae3c1", - "a411175648a9f14e", - "1052950934d566bf" - ], - "x": 1294, - "y": 3979, - "w": 512, - "h": 142 - }, - { - "id": "1e687cd4c0cc0ece", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "a3c29b70c82234cc", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "3eb59215b6fb19e2", - "ebdbee7baef678a6", - "3738b065c50a0cac", - "1d8f71c67df6cec9", - "341bc94dee8e9f96", - "247945a0f503ac90" - ], - "x": 94, - "y": 4219, - "w": 1162, - "h": 142 - }, - { - "id": "b5e2408a7d09537d", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "a3c29b70c82234cc", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "92d0d0a5798c06cf", - "62dd3e8d6c87a0f9", - "82908fcfdf7f599a", - "a6b8c9c223ea5942" - ], - "x": 1294, - "y": 4219, - "w": 492, - "h": 142 - }, - { - "id": "a23c2aa7e24eb8f7", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "17a8ab0a21c7790b", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "81b03b89f507e5ce", - "3eda424ef17379e9", - "af3082ef59725979", - "9518f42686aaf99c", - "6d6bcbb7ce10198f", - "da4da5b15f106b4a" - ], - "x": 94, - "y": 4459, - "w": 1162, - "h": 142 - }, - { - "id": "234feecbe12db6fa", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "17a8ab0a21c7790b", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "d07502e0620ed3d9", - "4cfd419f66b58eda", - "4db395b3e8fa404f", - "d8b85eb94b57b81f" - ], - "x": 1294, - "y": 4459, - "w": 512, - "h": 142 - }, - { - "id": "a762a7a552cb9f03", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "96d8990f6a4978cc", - "name": "kernel - cron", - "style": { - "fill": "#ff0000", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "caa3c5097468f133", - "722c773f6314dd40", - "867a71b7dae9c844", - "004bb30c27c94fb4", - "287d719de575c01f", - "074a67bf0fcf09ad", - "d4146047c079ac62", - "764da2d0527c1ef6", - "7fa17301839c0fa6", - "412878f8c488a0f4", - "c367834c9cccbe38", - "ca442e58e65b32f8" - ], - "x": 94, - "y": 2539, - "w": 652, - "h": 262, - "info": "cron minute = every minutes from flow start\r\ncron hour = every hours from flow start\r\ncron day = every day at 3 am" - }, - { - "id": "96d8990f6a4978cc", - "type": "group", - "z": "ab51b1e8cad7b700", - "name": "kernel", - "style": { - "fill": "#777777", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "a762a7a552cb9f03", - "bc29c56f900c8d36", - "3e71b89d61df9fd3", - "6386e9a459469b53", - "e9bd98a0b6e0d58c", - "20b116b788ef3f27", - "3711bd3352570a6c", - "bbf7bb18989048e1", - "cf7f82b8517f3250", - "9ea365cc69a1f2bf" - ], - "x": 68, - "y": 173, - "w": 5194, - "h": 2654 - }, - { - "id": "50456628f56ade66", - "type": "group", - "z": "ab51b1e8cad7b700", - "name": "device - system kernel version", - "style": { - "fill": "#777777", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "f67a857ae75d906f", - "a8dc4fab59fdefb4" - ], - "x": 68, - "y": 5153, - "w": 1094, - "h": 134, - "info": "this is a fake device for kernel boot (ensure that one device is registered)" - }, - { - "id": "f67a857ae75d906f", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "50456628f56ade66", - "name": "", - "style": { - "fill": "#0070c0", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "33f7a250a7341c43", - "1b98c37b3b7502e4", - "f02b4584af0d800c" - ], - "x": 674, - "y": 5179, - "w": 462, - "h": 82 - }, - { - "id": "a8dc4fab59fdefb4", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "50456628f56ade66", - "name": "", - "style": { - "fill": "#ffC000", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "840c05ce502e7fdd", - "eed8990163b1ca81", - "7f76434616f622dc" - ], - "x": 94, - "y": 5179, - "w": 542, - "h": 82 - }, - { - "id": "3a98a00afc60d7cd", - "type": "group", - "z": "ab51b1e8cad7b700", - "name": "auto - device", - "style": { - "fill": "#777777", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "63149b5b57a97c5b", - "3110fe9246e63b1e", - "5a56612ef35c5fd3" - ], - "x": 42, - "y": 4707, - "w": 6886, - "h": 366 - }, - { - "id": "63149b5b57a97c5b", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "3a98a00afc60d7cd", - "name": "", - "style": { - "fill": "#ffffff", - "label": true, - "stroke": "#ffC000", - "fill-opacity": "0.5" - }, - "nodes": [ - "bd21a8b1786d3ed2", - "4937527cddd45b61" - ], - "x": 68, - "y": 4733, - "w": 1664, - "h": 314 - }, - { - "id": "3110fe9246e63b1e", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "3a98a00afc60d7cd", - "name": "", - "style": { - "fill": "#ffffff", - "label": true, - "stroke": "#0070c0", - "fill-opacity": "0.5" - }, - "nodes": [ - "3be00f677c6457bd", - "266f4436dc45ce89" - ], - "x": 1768, - "y": 4793, - "w": 3294, - "h": 254 - }, - { - "id": "5a56612ef35c5fd3", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "3a98a00afc60d7cd", - "name": "", - "style": { - "fill": "#ffffff", - "label": true, - "stroke": "#92d04f", - "fill-opacity": "0.5" - }, - "nodes": [ - "874075d44d19869a", - "d9548e9b1a2e6f36" - ], - "x": 5108, - "y": 4793, - "w": 1794, - "h": 254 - }, - { - "id": "bd21a8b1786d3ed2", - "type": "group", - "z": "ab51b1e8cad7b700", - "g": "63149b5b57a97c5b", - "name": "auto - device - in", - "style": { - "fill": "#ffC000", - "fill-opacity": "0.05", - "label": true - }, - "nodes": [ - "d85fe6335a6eae7b", - "c3d88e1872a9789b", - "7f1a03ba2d4eb5d1", - "546f190f3ec0c90d" - ], - "x": 94, + "x": 6114, "y": 4819, - "w": 612, - "h": 142 + "w": 762, + "h": 202 }, { - "id": "4937527cddd45b61", + "id": "874075d44d19869a", "type": "group", "z": "ab51b1e8cad7b700", - "g": "63149b5b57a97c5b", - "name": "auto - device - out", + "g": "5a56612ef35c5fd3", + "name": "auto - metric - in", "style": { - "fill": "#ffC000", + "fill": "#92d04f", "fill-opacity": "0.05", "label": true }, "nodes": [ - "3e1b4213132404be", - "80459ca7317cce90", - "e6d11d0438e20b80", - "0ff47b07b863d0ae", - "561aaceffe076a5d", - "8f4503a19f2f639e", - "b08802b0dbd9a58b" + "7d45ca7ad7f363fe", + "a4e3db9cc35fc9eb", + "a2d25db2ace537ae", + "282bb73eb4892ab9", + "637b84024e725f38", + "f61f5fe80ddf6ff1" ], - "x": 734, - "y": 4759, - "w": 972, - "h": 262 + "x": 5134, + "y": 4819, + "w": 882, + "h": 82 + }, + { + "id": "266f4436dc45ce89", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "3110fe9246e63b1e", + "name": "auto - source - out", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "14a0a0839924964f", + "06581753b7673f83", + "5e3cb9bb3266089b", + "0b32686fe74c253f", + "51b002c497ad57cd", + "83e8a9fa324dd4b9", + "bb1e8e34559c5a7f", + "6140ca98749acd85", + "70ae9d85820c14fb" + ], + "x": 3394, + "y": 4819, + "w": 1642, + "h": 202 }, { "id": "3be00f677c6457bd", @@ -1097,5090 +801,389 @@ "h": 202 }, { - "id": "266f4436dc45ce89", + "id": "4937527cddd45b61", "type": "group", "z": "ab51b1e8cad7b700", - "g": "3110fe9246e63b1e", - "name": "auto - source - out", + "g": "63149b5b57a97c5b", + "name": "auto - device - out", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "3e1b4213132404be", + "80459ca7317cce90", + "e6d11d0438e20b80", + "0ff47b07b863d0ae", + "561aaceffe076a5d", + "8f4503a19f2f639e", + "b08802b0dbd9a58b" + ], + "x": 734, + "y": 4759, + "w": 972, + "h": 262 + }, + { + "id": "bd21a8b1786d3ed2", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "63149b5b57a97c5b", + "name": "auto - device - in", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "d85fe6335a6eae7b", + "c3d88e1872a9789b", + "7f1a03ba2d4eb5d1", + "546f190f3ec0c90d" + ], + "x": 94, + "y": 4819, + "w": 612, + "h": 142 + }, + { + "id": "234feecbe12db6fa", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "17a8ab0a21c7790b", + "name": "", "style": { "fill": "#0070c0", "fill-opacity": "0.05", "label": true }, "nodes": [ - "14a0a0839924964f", - "06581753b7673f83", - "5e3cb9bb3266089b", - "0b32686fe74c253f", - "51b002c497ad57cd", - "83e8a9fa324dd4b9", - "bb1e8e34559c5a7f", - "6140ca98749acd85", - "70ae9d85820c14fb" + "d07502e0620ed3d9", + "4cfd419f66b58eda", + "4db395b3e8fa404f", + "d8b85eb94b57b81f" ], - "x": 3394, - "y": 4819, - "w": 1642, - "h": 202 + "x": 1294, + "y": 4459, + "w": 512, + "h": 142 }, { - "id": "874075d44d19869a", + "id": "a23c2aa7e24eb8f7", "type": "group", "z": "ab51b1e8cad7b700", - "g": "5a56612ef35c5fd3", - "name": "auto - metric - in", + "g": "17a8ab0a21c7790b", + "name": "", "style": { - "fill": "#92d04f", + "fill": "#0070c0", "fill-opacity": "0.05", "label": true }, "nodes": [ - "7d45ca7ad7f363fe", - "a4e3db9cc35fc9eb", - "a2d25db2ace537ae", - "282bb73eb4892ab9", - "637b84024e725f38", - "f61f5fe80ddf6ff1" + "81b03b89f507e5ce", + "3eda424ef17379e9", + "af3082ef59725979", + "9518f42686aaf99c", + "6d6bcbb7ce10198f", + "da4da5b15f106b4a" ], - "x": 5134, - "y": 4819, - "w": 882, - "h": 82 + "x": 94, + "y": 4459, + "w": 1162, + "h": 142 }, { - "id": "d9548e9b1a2e6f36", + "id": "b5e2408a7d09537d", "type": "group", "z": "ab51b1e8cad7b700", - "g": "5a56612ef35c5fd3", - "name": "auto - metric - out", + "g": "a3c29b70c82234cc", + "name": "", "style": { - "fill": "#92d04f", + "fill": "#0070c0", "fill-opacity": "0.05", "label": true }, "nodes": [ - "e93e8daa30075ae6", - "89d2eebcaafb5013", - "9c89a41128573752", - "b2ccb6a2a248015d", - "d318afa2a81e4ff9", - "9262e99e20e0e654", - "69041daa92bc0a8b" + "92d0d0a5798c06cf", + "62dd3e8d6c87a0f9", + "82908fcfdf7f599a", + "a6b8c9c223ea5942" ], - "x": 6114, - "y": 4819, - "w": 762, - "h": 202 + "x": 1294, + "y": 4219, + "w": 492, + "h": 142 }, { - "id": "797eac89000183db", - "type": "link in", + "id": "1e687cd4c0cc0ece", + "type": "group", "z": "ab51b1e8cad7b700", - "g": "818a8590288d6409", - "name": "kernel - about", - "links": [], - "x": 135, - "y": 60, - "wires": [ - [ - "d9b8f97fb0897586" - ] - ] - }, - { - "id": "d49116054bd5cd56", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "818a8590288d6409", - "name": "kernel - about", - "mode": "return", - "links": [], - "x": 395, - "y": 60, - "wires": [] - }, - { - "id": "d9b8f97fb0897586", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "818a8590288d6409", - "name": "about", - "rules": [ - { - "t": "set", - "p": "about", - "pt": "global", - "to": "{\t 'automate':'iotredloop',\t 'version':'0.0.1',\t 'author':'Jean-Christian Paul Denis'\t}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 270, - "y": 60, - "wires": [ - [ - "d49116054bd5cd56" - ] - ] - }, - { - "id": "d248a5e5ab11c9d7", - "type": "catch", - "z": "ab51b1e8cad7b700", - "g": "648d078d534a93be", - "name": "catch error", - "scope": null, - "uncaught": false, - "x": 620, - "y": 60, - "wires": [ - [ - "eebbf361272ea85b" - ] - ] - }, - { - "id": "eebbf361272ea85b", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "648d078d534a93be", - "name": "kernel - catch error", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 830, - "y": 60, - "wires": [] - }, - { - "id": "324b4e5e9a9419cc", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "automate start", - "props": [], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "x": 220, - "y": 300, - "wires": [ - [ - "e68b067b48b94ca2" - ] - ] - }, - { - "id": "464bfd100a5740b8", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "check if global metrics exists", - "property": "metrics", - "propertyType": "global", - "rules": [ - { - "t": "null" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 340, - "y": 540, - "wires": [ - [ - "f7b2d28d9c7d66ae" - ], - [ - "4bab6cfef1e2c932" - ] - ] - }, - { - "id": "f7b2d28d9c7d66ae", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "define global metrics", - "rules": [ - { - "t": "set", - "p": "metrics", - "pt": "global", - "to": "{}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 620, - "y": 480, - "wires": [ - [ - "4bab6cfef1e2c932" - ] - ] - }, - { - "id": "3e652e3da2c711ec", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "initialize global variables", - "rules": [ - { - "t": "set", - "p": "devices", - "pt": "global", - "to": "{}", - "tot": "jsonata" - }, - { - "t": "set", - "p": "protocols", - "pt": "global", - "to": "{}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1110, - "y": 540, - "wires": [ - [ - "011c5e62deb510bb" - ] - ] - }, - { - "id": "cb09b67a37901112", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "set boot time topic", - "rules": [ - { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "boot", - "tot": "str" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "", - "tot": "date" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1910, - "y": 540, - "wires": [ - [ - "25445f5a9b787a0a" - ] - ] - }, - { - "id": "25445f5a9b787a0a", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "kernel - boot", - "mode": "link", - "links": [ - "eed8990163b1ca81" - ], - "x": 2075, - "y": 600, - "wires": [] - }, - { - "id": "7c98833082d48029", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "kernel - boot - load", - "links": [ - "ee66fb38bde2fdf4", - "afd6a49ad55de215" - ], - "x": 135, - "y": 600, - "wires": [ - [ - "25445f5a9b787a0a" - ] - ] - }, - { - "id": "df1059b56622c582", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "automate reset", - "props": [], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "x": 220, - "y": 240, - "wires": [ - [ - "acd42b52bd581740" - ] - ] - }, - { - "id": "4bab6cfef1e2c932", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", + "g": "a3c29b70c82234cc", "name": "", - "links": [ - "797eac89000183db" - ], - "linkType": "static", - "timeout": "30", - "x": 860, - "y": 540, - "wires": [ - [ - "3e652e3da2c711ec" - ] - ] - }, - { - "id": "011c5e62deb510bb", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "check if global timers exists", - "property": "timers", - "propertyType": "global", - "rules": [ - { - "t": "null" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1400, - "y": 540, - "wires": [ - [ - "b0f54ce6c23c6da6" - ], - [ - "cb09b67a37901112" - ] - ] - }, - { - "id": "b0f54ce6c23c6da6", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "define global timers", - "rules": [ - { - "t": "set", - "p": "timers", - "pt": "global", - "to": "{}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1670, - "y": 480, - "wires": [ - [ - "cb09b67a37901112" - ] - ] - }, - { - "id": "92dac97dfb662f2d", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "kernel - boot - start", - "links": [ - "e68b067b48b94ca2" - ], - "x": 135, - "y": 540, - "wires": [ - [ - "464bfd100a5740b8" - ] - ] - }, - { - "id": "d74bb73a0966b4bd", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "cf7f82b8517f3250", - "name": "kernel - boot - reset", - "links": [ - "acd42b52bd581740" - ], - "x": 135, - "y": 480, - "wires": [ - [ - "f7b2d28d9c7d66ae" - ] - ] - }, - { - "id": "acd42b52bd581740", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "kernel - automate reset", - "mode": "link", - "links": [ - "d74bb73a0966b4bd" - ], - "x": 375, - "y": 240, - "wires": [] - }, - { - "id": "e68b067b48b94ca2", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "kernel - automate start", - "mode": "link", - "links": [ - "92dac97dfb662f2d" - ], - "x": 375, - "y": 300, - "wires": [] - }, - { - "id": "fabb645e0d88c91c", - "type": "function", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "check device", - "func": "// Check and recreate clean message of device description\n// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// no message\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check possible var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined' ||\n typeof msg.format === 'undefined' ||\n typeof msg.default === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'format': msg.format,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.default,\n\n 'protocol': typeof msg.protocol === 'undefined' ? '' : msg.protocol,\n 'model': typeof msg.model === 'undefined' ? '' : msg.model,\n 'id': typeof msg.id === 'undefined' ? '' : msg.id,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];", - "outputs": 2, - "timeout": "", - "noerr": 0, - "initialize": "\n", - "finalize": "\n", - "libs": [], - "x": 290, - "y": 780, - "wires": [ - [ - "6d65af0eaae695a3" - ], - [ - "d3ac50a83c871cc8" - ] - ] - }, - { - "id": "d3ac50a83c871cc8", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "register device to global devices", - "rules": [ - { - "t": "set", - "p": "devices[msg.bucket][msg.measurement][msg.field]", - "pt": "global", - "to": "{\t 'default':msg.payload,\t 'format':msg.format,\t 'protocol':msg.protocol,\t 'model':msg.model,\t 'option':msg.option,\t 'id':msg.id\t}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 550, - "y": 780, - "wires": [ - [ - "c1d2a5b213c6568a", - "e5f9a77af592fc78" - ] - ] - }, - { - "id": "6d65af0eaae695a3", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "kernel - device uncomplete", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 540, - "y": 720, - "wires": [] - }, - { - "id": "c1d2a5b213c6568a", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "check if device exists in global metrics", - "property": "metrics[msg.bucket][msg.measurement][msg.field]", - "propertyType": "global", - "rules": [ - { - "t": "null" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 890, - "y": 840, - "wires": [ - [ - "35c936be0ce55676" - ] - ] - }, - { - "id": "35c936be0ce55676", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "register device to global metrics", - "rules": [ - { - "t": "set", - "p": "metrics[msg.bucket][msg.measurement][msg.field]", - "pt": "global", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1230, - "y": 840, - "wires": [ - [] - ] - }, - { - "id": "e5f9a77af592fc78", - "type": "trigger", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "wait for all devices registration", - "op1": "", - "op2": "true", - "op1type": "nul", - "op2type": "bool", - "duration": "50", - "extend": true, - "overrideDelay": false, - "units": "ms", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 870, - "y": 780, - "wires": [ - [ - "2ba23548e87b0292" - ] - ] - }, - { - "id": "2dedf503efee73c8", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "kernel - device", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 1380, - "y": 720, - "wires": [] - }, - { - "id": "bfa594bf1f876c92", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "kernel - device", - "links": [ - "7f76434616f622dc", - "80459ca7317cce90" - ], - "x": 135, - "y": 780, - "wires": [ - [ - "fabb645e0d88c91c" - ] - ] - }, - { - "id": "94c79b8f52f0b6ba", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "kernel - device", - "mode": "link", - "links": [ - "baaac9a301ef150a", - "33f7a250a7341c43" - ], - "x": 1315, - "y": 780, - "wires": [] - }, - { - "id": "cd2ac560f85327a9", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "automate load", - "props": [], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "x": 210, - "y": 360, - "wires": [ - [ - "ee66fb38bde2fdf4" - ] - ] - }, - { - "id": "ee66fb38bde2fdf4", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "kernel - automate load", - "mode": "link", - "links": [ - "7c98833082d48029" - ], - "x": 375, - "y": 360, - "wires": [] - }, - { - "id": "92f76d0a8a4f1178", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "reset all global variables and launch complete cycle", - "info": "", - "x": 670, - "y": 240, - "wires": [] - }, - { - "id": "8413c966166387ab", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "launch complete cycle", - "info": "", - "x": 580, - "y": 300, - "wires": [] - }, - { - "id": "3cd44612df58e32f", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "9ea365cc69a1f2bf", - "name": "launch devices configuration cycle", - "info": "", - "x": 620, - "y": 360, - "wires": [] - }, - { - "id": "2ba23548e87b0292", - "type": "function", - "z": "ab51b1e8cad7b700", - "g": "bbf7bb18989048e1", - "name": "set gate message", - "func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload':'open'\n};\n\nreturn newmsg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "\n", - "finalize": "\n", - "libs": [], - "x": 1150, - "y": 780, - "wires": [ - [ - "2dedf503efee73c8", - "94c79b8f52f0b6ba" - ] - ] - }, - { - "id": "149401230ed2ed4c", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "check gate topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "gate", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 300, - "y": 1020, - "wires": [ - [ - "19dc49123e66ac71" - ] - ] - }, - { - "id": "1eea209368626bc1", - "type": "trigger", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "freeze gate for 10 secondes", - "op1": "close", - "op2": "open", - "op1type": "str", - "op2type": "str", - "duration": "10", - "extend": true, - "overrideDelay": false, - "units": "s", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 800, - "y": 1080, - "wires": [ - [ - "85ea82a3282907b1", - "8fdb5986494986cc" - ] - ] - }, - { - "id": "19dc49123e66ac71", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "check gate payload", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "open|close", - "vt": "str", - "case": false - }, - { - "t": "eq", - "v": "freeze", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 530, - "y": 1020, - "wires": [ - [ - "85ea82a3282907b1", - "8fdb5986494986cc" - ], - [ - "1eea209368626bc1" - ] - ] - }, - { - "id": "85ea82a3282907b1", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "kernel - gate", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 1050, - "y": 960, - "wires": [] - }, - { - "id": "baaac9a301ef150a", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "kernel - gate", - "links": [ - "94c79b8f52f0b6ba", - "c15d0c66ed5af79f" - ], - "x": 135, - "y": 1020, - "wires": [ - [ - "149401230ed2ed4c" - ] - ] - }, - { - "id": "8fdb5986494986cc", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "3711bd3352570a6c", - "name": "kernel - gate", - "mode": "link", - "links": [ - "206c1fb4a48067df", - "af148bf44b019b35", - "735774bdb56f6be4", - "fb76731a2064ad65", - "3423fd727184042c", - "be2acafce4c2c74d", - "1d8f71c67df6cec9", - "af3082ef59725979" - ], - "x": 995, - "y": 1020, - "wires": [] - }, - { - "id": "a974cddec777bd94", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check if global devices has metric", - "property": "devices[msg.bucket][msg.measurement][msg.field]", - "propertyType": "global", - "rules": [ - { - "t": "null" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 920, - "y": 1260, - "wires": [ - [ - "eca0e6f3657f0564" - ], - [ - "1e908b6060a584ea" - ] - ] - }, - { - "id": "7cd303d0aadd1433", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric uncomplete", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 900, - "y": 1200, - "wires": [] - }, - { - "id": "eca0e6f3657f0564", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric undefined", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 1230, - "y": 1200, - "wires": [] - }, - { - "id": "1e908b6060a584ea", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "select metric format", - "property": "devices[msg.bucket][msg.measurement][msg.field]format", - "propertyType": "global", - "rules": [ - { - "t": "eq", - "v": "text", - "vt": "str" - }, - { - "t": "eq", - "v": "boolean", - "vt": "str" - }, - { - "t": "eq", - "v": "dimmer", - "vt": "str" - }, - { - "t": "eq", - "v": "percent", - "vt": "str" - }, - { - "t": "eq", - "v": "number", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 5, - "x": 1210, - "y": 1320, - "wires": [ - [ - "3743db17cb401840" - ], - [ - "e2ef5706b35de7b0" - ], - [ - "3a4c72588bb27ab4" - ], - [ - "357c6d106dec5efd" - ], - [ - "8bbf418d277b4df7" - ] - ] - }, - { - "id": "3743db17cb401840", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "select source", - "property": "source", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "loop", - "vt": "str" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1930, - "y": 1260, - "wires": [ - [ - "895db12fd6d94a67" - ], - [ - "6473c46ecd9304c7" - ] - ] - }, - { - "id": "6473c46ecd9304c7", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check if value is different from global metric", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "metrics[msg.bucket][msg.measurement][msg.field]", - "vt": "global" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 2230, - "y": 1320, - "wires": [ - [ - "582f8e6b17a9d9d1" - ], - [ - "dd79805b7971cbbb" - ] - ] - }, - { - "id": "582f8e6b17a9d9d1", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "set metric to global metrics", - "rules": [ - { - "t": "set", - "p": "metrics[msg.bucket][msg.measurement][msg.field]", - "pt": "global", - "to": "payload", - "tot": "msg" - }, - { - "t": "set", - "p": "timestamps[msg.bucket][msg.measurement][msg.field]", - "pt": "flow", - "to": "$millis()", - "tot": "jsonata" - }, - { - "t": "delete", - "p": "repeat", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 3560, - "y": 1320, - "wires": [ - [ - "68ad3074767eb2c3", - "9f055c7cccb634c1" - ] - ] - }, - { - "id": "dd79805b7971cbbb", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "select \"cible\" measurment", - "property": "measurement", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "cible", - "vt": "str" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 2570, - "y": 1380, - "wires": [ - [ - "0831bd7e7daa4915" - ], - [ - "ae5e8ae05adac7fd" - ] - ] - }, - { - "id": "0831bd7e7daa4915", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check mode automate", - "property": "metrics.systeme.mode.automate", - "propertyType": "global", - "rules": [ - { - "t": "neq", - "v": "off", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 2840, - "y": 1380, - "wires": [ - [ - "582f8e6b17a9d9d1" - ] - ] - }, - { - "id": "ae5e8ae05adac7fd", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check request repeat", - "property": "repeat", - "propertyType": "msg", - "rules": [ - { - "t": "true" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 2840, - "y": 1440, - "wires": [ - [ - "582f8e6b17a9d9d1" - ], - [ - "3c3fe996c199516b" - ] - ] - }, - { - "id": "b90652e7f7d28f66", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "compare timestamp", - "property": "#:(memoryOnly)::timestamps[msg.bucket][msg.measurement][msg.field]", - "propertyType": "flow", - "rules": [ - { - "t": "lt", - "v": "$millis() - 3600000", - "vt": "jsonata" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 3290, - "y": 1440, - "wires": [ - [ - "582f8e6b17a9d9d1" - ] - ] - }, - { - "id": "9f055c7cccb634c1", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "limit 12 msg / s", - "pauseType": "rate", - "timeout": "250", - "timeoutUnits": "milliseconds", - "rate": "12", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 5040, - "y": 1320, - "wires": [ - [ - "4264ed01f3943e2f" - ] - ] - }, - { - "id": "c785aed10e83430a", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check speed limit of 12 msg/s", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "gt", - "v": "12", - "vt": "num" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 4130, - "y": 1440, - "wires": [ - [ - "ca80e5fe27609a11" - ], - [ - "6466ac9bacd083e2" - ] - ] - }, - { - "id": "3c3fe996c199516b", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "delay 50 ms", - "pauseType": "delay", - "timeout": "50", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 3070, - "y": 1440, - "wires": [ - [ - "b90652e7f7d28f66" - ] - ] - }, - { - "id": "0d78bebcc5541e02", - "type": "trigger", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "set gate payload", - "op1": "close", - "op2": "open", - "op1type": "str", - "op2type": "str", - "duration": "1", - "extend": true, - "overrideDelay": false, - "units": "s", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 4800, - "y": 1440, - "wires": [ - [ - "e6a4e861a99b196c" - ] - ] - }, - { - "id": "fc88fb69cac1e5a5", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "limit 1 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": true, - "allowrate": false, - "outputs": 1, - "x": 4080, - "y": 1380, - "wires": [ - [ - "e6a4e861a99b196c" - ] - ] - }, - { - "id": "82229e46e51f94f5", - "type": "function", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "check metric", - "func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// try if msg.topic is a path\nif (typeof msg.topic === 'string' &&\n typeof msg.bucket === 'undefined' &&\n typeof msg.measurement === 'undefined' &&\n typeof msg.field === 'undefined'\n) {\n const device = msg.topic.split('/');\n if (typeof device[1] === 'string' &&\n typeof device[2] === 'string' &&\n typeof device[3] === 'string'\n ) {\n msg.source = device[0];\n msg.bucket = device[1];\n msg.measurement = device[2];\n msg.field = device[3];\n\n }\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'topic': 'metric',\n 'source': typeof msg.source === 'string' ? msg.source : 'unknow',\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.payload,\n 'repeat': typeof msg.repeat === 'boolean' ? msg.repeat : false\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.source + ' : ' + newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];", - "outputs": 2, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 650, - "y": 1260, - "wires": [ - [ - "7cd303d0aadd1433" - ], - [ - "a974cddec777bd94" - ] - ] - }, - { - "id": "895db12fd6d94a67", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "remove source", - "rules": [ - { - "t": "delete", - "p": "source", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 5040, - "y": 1260, - "wires": [ - [ - "031a6afd8300356a" - ] - ] - }, - { - "id": "4689a4035be0c82e", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "set source", - "rules": [ - { - "t": "set", - "p": "automate", - "pt": "msg", - "to": "about.automate", - "tot": "global" - }, - { - "t": "set", - "p": "source", - "pt": "msg", - "to": "msg.source=msg.automate?msg.source:\"loop\"", - "tot": "jsonata" - }, - { - "t": "delete", - "p": "automate", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 450, - "y": 1260, - "wires": [ - [ - "82229e46e51f94f5" - ] - ] - }, - { - "id": "6466ac9bacd083e2", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "reset", - "rules": [ - { - "t": "set", - "p": "reset", - "pt": "msg", - "to": "true", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 4370, - "y": 1500, - "wires": [ - [ - "ca80e5fe27609a11" - ] - ] - }, - { - "id": "ca80e5fe27609a11", - "type": "trigger", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "wait 4 s then true", - "op1": "", - "op2": "true", - "op1type": "nul", - "op2type": "bool", - "duration": "4", - "extend": false, - "overrideDelay": false, - "units": "s", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 4570, - "y": 1440, - "wires": [ - [ - "0d78bebcc5541e02" - ] - ] - }, - { - "id": "d7f0ba2534f27b82", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "Si plus de 12 messages par seconde pendant 4 secondes alors bloque le kernel pendant 1 seconde", - "info": "", - "x": 4380, - "y": 1560, - "wires": [] - }, - { - "id": "206c1fb4a48067df", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric", - "links": [ - "8fdb5986494986cc", - "e12bb3f8258f4439", - "f02b4584af0d800c", - "06581753b7673f83" - ], - "x": 135, - "y": 1260, - "wires": [ - [ - "12f02c43a82b46f9" - ] - ] - }, - { - "id": "031a6afd8300356a", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric - loop", - "mode": "link", - "links": [ - "7d45ca7ad7f363fe" - ], - "x": 5195, - "y": 1260, - "wires": [] - }, - { - "id": "4264ed01f3943e2f", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric - write", - "mode": "link", - "links": [ - "c5dc4f8c357a596f", - "1cbff7f3a7317c5b", - "4280a1f889505f0c" - ], - "x": 5195, - "y": 1320, - "wires": [] - }, - { - "id": "c15d0c66ed5af79f", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "kernel - metric - rate", - "mode": "link", - "links": [ - "baaac9a301ef150a" - ], - "x": 5195, - "y": 1380, - "wires": [] - }, - { - "id": "e2ef5706b35de7b0", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "links": [ - "a72b20551a3b1f8c" - ], - "linkType": "static", - "timeout": "30", - "x": 1450, - "y": 1320, - "wires": [ - [ - "3743db17cb401840" - ] - ] - }, - { - "id": "8bbf418d277b4df7", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "links": [ - "e112327c4a55aa35" - ], - "linkType": "static", - "timeout": "30", - "x": 1450, - "y": 1500, - "wires": [ - [ - "56d131373d4e2f78" - ] - ] - }, - { - "id": "357c6d106dec5efd", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "links": [ - "bc396dcc308c42ee" - ], - "linkType": "static", - "timeout": "30", - "x": 1450, - "y": 1440, - "wires": [ - [ - "56d131373d4e2f78" - ] - ] - }, - { - "id": "3a4c72588bb27ab4", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "links": [ - "4f02d67d81a83e86" - ], - "linkType": "static", - "timeout": "30", - "x": 1450, - "y": 1380, - "wires": [ - [ - "3743db17cb401840" - ] - ] - }, - { - "id": "56d131373d4e2f78", - "type": "link call", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "links": [ - "7662aba4a1cc9dd0" - ], - "linkType": "static", - "timeout": "30", - "x": 1700, - "y": 1440, - "wires": [ - [ - "3743db17cb401840" - ] - ] - }, - { - "id": "68ad3074767eb2c3", - "type": "msg-speed", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "read msg speed", - "frequency": "sec", - "interval": 1, - "estimation": false, - "ignore": false, - "pauseAtStartup": false, - "topicDependent": false, - "x": 3820, - "y": 1380, - "wires": [ - [ - "c785aed10e83430a", - "fc88fb69cac1e5a5" - ], - [] - ] - }, - { - "id": "12f02c43a82b46f9", - "type": "gate", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "", - "controlTopic": "gate", - "defaultState": "closed", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "defaultCmd": "default", - "statusCmd": "status", - "persist": false, - "storeName": "default", - "x": 270, - "y": 1260, - "wires": [ - [ - "4689a4035be0c82e" - ] - ] - }, - { - "id": "e6a4e861a99b196c", - "type": "function", - "z": "ab51b1e8cad7b700", - "g": "20b116b788ef3f27", - "name": "set gate message", - "func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload': msg.payload\n};\n\nreturn newmsg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "\n", - "finalize": "\n", - "libs": [], - "x": 5030, - "y": 1380, - "wires": [ - [ - "c15d0c66ed5af79f" - ] - ] - }, - { - "id": "e4e85a27e4775ac9", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "set human readable payload", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "msg.bucket & ' > ' & msg.measurement & ' > ' & msg.field & ' = ' & $string(msg.payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 340, - "y": 1680, - "wires": [ - [ - "5a49d1f4b12618a7", - "592483f2183c6711" - ] - ] - }, - { - "id": "5a49d1f4b12618a7", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "select measurement", - "property": "measurement", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^(power|linky)$", - "vt": "str", - "case": false - }, - { - "t": "eq", - "v": "thermostat", - "vt": "str" - }, - { - "t": "eq", - "v": "seen", - "vt": "str" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 4, - "x": 620, - "y": 1740, - "wires": [ - [ - "234620fe148e1dca" - ], - [ - "a441e9df790a0c3c" - ], - [ - "074313bb4e48de6f" - ], - [ - "285c9ffa2f524440" - ] - ] - }, - { - "id": "234620fe148e1dca", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "journal console only linky and power", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 970, - "y": 1680, - "wires": [] - }, - { - "id": "285c9ffa2f524440", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "journal console others", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 920, - "y": 1860, - "wires": [] - }, - { - "id": "a441e9df790a0c3c", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "journal console only thermostat", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 950, - "y": 1740, - "wires": [] - }, - { - "id": "074313bb4e48de6f", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "journal console only seen", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 930, - "y": 1800, - "wires": [] - }, - { - "id": "c5dc4f8c357a596f", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "kernel - write to journal", - "links": [ - "4264ed01f3943e2f" - ], - "x": 135, - "y": 1680, - "wires": [ - [ - "e4e85a27e4775ac9" - ] - ] - }, - { - "id": "592483f2183c6711", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "e9bd98a0b6e0d58c", - "name": "kernel - write to journal", - "mode": "link", - "links": [], - "x": 535, - "y": 1680, - "wires": [] - }, - { - "id": "b425ab40ef97a294", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "6386e9a459469b53", - "name": "set MQTT topic", - "rules": [ - { - "t": "set", - "p": "automate", - "pt": "msg", - "to": "about.automate", - "tot": "global" - }, - { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "msg.automate&\"/\"&msg.bucket&\"/\"&msg.measurement&\"/\"&msg.field", - "tot": "jsonata" - }, - { - "t": "delete", - "p": "automate", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 300, - "y": 2040, - "wires": [ - [ - "4176c5d5bc97709c" - ] - ] - }, - { - "id": "1102208726a88a10", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "6386e9a459469b53", - "name": "kernel - write to MQTT", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 740, - "y": 1980, - "wires": [] - }, - { - "id": "4176c5d5bc97709c", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "6386e9a459469b53", - "name": "delay 5 ms", - "pauseType": "delay", - "timeout": "5", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 510, - "y": 2040, - "wires": [ - [ - "1102208726a88a10", - "c5465d5f64db4b45" - ] - ] - }, - { - "id": "1cbff7f3a7317c5b", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "6386e9a459469b53", - "name": "kernel - write to MQTT", - "links": [ - "4264ed01f3943e2f" - ], - "x": 135, - "y": 2040, - "wires": [ - [ - "b425ab40ef97a294" - ] - ] - }, - { - "id": "c5465d5f64db4b45", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "6386e9a459469b53", - "name": "Kernel - write to MQTT", - "mode": "link", - "links": [ - "d40db95f9a154c3a" - ], - "x": 655, - "y": 2040, - "wires": [] - }, - { - "id": "58359ad51f36d68e", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "by field", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\t 'bucket': msg.bucket,\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.field : msg.state\t }\t }\t ]\t}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1540, - "y": 2280, - "wires": [ - [ - "b43439c6ab36fbfc" - ] - ] - }, - { - "id": "5c4a3b8ce0220dd9", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "by room", - "rules": [ - { - "t": "set", - "p": "roomfield", - "pt": "msg", - "to": "msg.bucket&' '&msg.field", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\t 'bucket': 'resume',\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.roomfield : msg.state\t }\t }\t ]\t}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1960, - "y": 2220, - "wires": [ - [ - "b43439c6ab36fbfc" - ] - ] - }, - { - "id": "14a5f0183ce7ec8d", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "select measurements", - "property": "measurement", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^(mode|clock|lighting|jarvis|thermostat|heating|shading|cumulus|airflow|linky)$", - "vt": "str", - "case": false - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1580, - "y": 2220, - "wires": [ - [ - "a98fde87c6b47e6e" - ], - [ - "5c4a3b8ce0220dd9" - ] - ] - }, - { - "id": "ec2704a8e18114ea", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "is boolean", - "property": "state", - "propertyType": "msg", - "rules": [ - { - "t": "istype", - "v": "boolean", - "vt": "boolean" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1070, - "y": 2220, - "wires": [ - [ - "7c75b6b921f30409" - ], - [ - "58359ad51f36d68e", - "14a5f0183ce7ec8d" - ] - ] - }, - { - "id": "e287e4f4d7f3a174", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "payload to state", - "rules": [ - { - "t": "set", - "p": "state", - "pt": "msg", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 860, - "y": 2220, - "wires": [ - [ - "ec2704a8e18114ea" - ] - ] - }, - { - "id": "b43439c6ab36fbfc", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "delay 5 ms", - "pauseType": "delay", - "timeout": "5", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 2150, - "y": 2280, - "wires": [ - [ - "61b310386916497a", - "0aca727fc835e615", - "4163673982458b27" - ] - ] - }, - { - "id": "61b310386916497a", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "kernel - write to influxdb", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 2390, - "y": 2160, - "wires": [] - }, - { - "id": "a98fde87c6b47e6e", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "select field", - "property": "field", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "pilot", - "vt": "str" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1770, - "y": 2160, - "wires": [ - [ - "5c4a3b8ce0220dd9" - ], - [] - ] - }, - { - "id": "7c75b6b921f30409", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "format boolean to dimmer", - "rules": [ - { - "t": "set", - "p": "state", - "pt": "msg", - "to": "$number($boolean(msg.state))=0?0:99", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1310, - "y": 2160, - "wires": [ - [ - "58359ad51f36d68e", - "14a5f0183ce7ec8d" - ] - ] - }, - { - "id": "27e3bd6cada7b554", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "remove some measurements", - "property": "measurement", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "config", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 600, - "y": 2220, - "wires": [ - [ - "e287e4f4d7f3a174" - ] - ] - }, - { - "id": "4280a1f889505f0c", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "kernel - write to InfluxDB", - "links": [ - "4264ed01f3943e2f" - ], - "x": 135, - "y": 2220, - "wires": [ - [ - "faeff76a4321bee2" - ] - ] - }, - { - "id": "4163673982458b27", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "kernel - wrtie to InfluxDB", - "mode": "link", - "links": [], - "x": 2295, - "y": 2280, - "wires": [] - }, - { - "id": "faeff76a4321bee2", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "remove some buckets", - "property": "bucket", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "agenda", - "vt": "str" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 320, - "y": 2220, - "wires": [ - [ - "27e3bd6cada7b554" - ] - ] - }, - { - "id": "b1e2b474e4c77892", - "type": "file", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "write file", - "filename": "filename", - "filenameType": "msg", - "appendNewline": true, - "createDir": false, - "overwriteFile": "true", - "encoding": "none", - "x": 460, - "y": 2400, - "wires": [ - [ - "ede79ed6b82aa804" - ] - ] - }, - { - "id": "ede79ed6b82aa804", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "kernel - write file", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 660, - "y": 2400, - "wires": [] - }, - { - "id": "d3064571c2fde064", - "type": "file in", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "read file", - "filename": "filename", - "filenameType": "msg", - "format": "utf8", - "chunk": false, - "sendError": false, - "encoding": "none", - "allProps": false, - "x": 460, - "y": 2460, - "wires": [ - [ - "2356f963725e84c6" - ] - ] - }, - { - "id": "2356f963725e84c6", - "type": "json", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "", - "property": "payload", - "action": "", - "pretty": false, - "x": 630, - "y": 2460, - "wires": [ - [ - "5205205461f48680" - ] - ] - }, - { - "id": "5205205461f48680", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "write file contents to global metrics", - "rules": [ - { - "t": "set", - "p": "metrics", - "pt": "global", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 880, - "y": 2460, - "wires": [ - [ - "be0beee97ed2d572", - "43c695b9490f5104" - ] - ] - }, - { - "id": "be0beee97ed2d572", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "kernel - read file", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 1160, - "y": 2400, - "wires": [] - }, - { - "id": "44308739c0f759ad", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "filename", - "rules": [ - { - "t": "set", - "p": "automate", - "pt": "msg", - "to": "about.automate", - "tot": "global" - }, - { - "t": "set", - "p": "filename", - "pt": "msg", - "to": "'/data/'&msg.automate&'_metrics.bk'", - "tot": "jsonata" - }, - { - "t": "delete", - "p": "automate", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 280, - "y": 2460, - "wires": [ - [ - "d3064571c2fde064" - ] - ] - }, - { - "id": "43c695b9490f5104", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "delay 100 ms", - "pauseType": "delay", - "timeout": "100", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1150, - "y": 2460, - "wires": [ - [ - "afd6a49ad55de215" - ] - ] - }, - { - "id": "9d4a1f539c9bf58c", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "filename", - "rules": [ - { - "t": "set", - "p": "automate", - "pt": "msg", - "to": "about.automate", - "tot": "global" - }, - { - "t": "set", - "p": "filename", - "pt": "msg", - "to": "'/data/'&msg.automate&'_metrics.bk'", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "metrics", - "tot": "global" - }, - { - "t": "delete", - "p": "automate", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 280, - "y": 2400, - "wires": [ - [ - "b1e2b474e4c77892" - ] - ] - }, - { - "id": "dfb4b5350a9383c9", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "kernel - read from file", - "links": [], - "x": 135, - "y": 2460, - "wires": [ - [ - "44308739c0f759ad" - ] - ] - }, - { - "id": "432e8063fae7039e", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "kernel - write to file", - "links": [], - "x": 135, - "y": 2400, - "wires": [ - [ - "9d4a1f539c9bf58c" - ] - ] - }, - { - "id": "afd6a49ad55de215", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "bc29c56f900c8d36", - "name": "kernel - read file", - "mode": "link", - "links": [ - "7c98833082d48029" - ], - "x": 1295, - "y": 2460, - "wires": [] - }, - { - "id": "0aca727fc835e615", - "type": "Stackhero-InfluxDB-v2-write", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "server": "22dd0707e6d3a364", - "name": "influxdb", - "x": 2340, - "y": 2220, - "wires": [ - [] - ] - }, - { - "id": "a19b9fbac3e9f89c", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "MQTT nodered", - "topic": "iotredloop/#", - "qos": "2", - "datatype": "utf8", - "broker": "51fc92ba27d12eaa", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 200, - "y": 3060, - "wires": [ - [ - "b961d989c357e6d6" - ] - ] - }, - { - "id": "e12bb3f8258f4439", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "mqtt nodered", - "mode": "link", - "links": [ - "282314c3181caba2", - "f4fed668dbff1da4", - "206c1fb4a48067df" - ], - "x": 1215, - "y": 3060, - "wires": [] - }, - { - "id": "0a4c943dc3a06f0d", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 3060, - "wires": [ - [ - "56d93c268a656fc4" - ] - ] - }, - { - "id": "af148bf44b019b35", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "mqtt nodered gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 465, - "y": 3120, - "wires": [ - [ - "0a4c943dc3a06f0d" - ] - ] - }, - { - "id": "b961d989c357e6d6", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "15 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "15", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 410, - "y": 3060, - "wires": [ - [ - "0a4c943dc3a06f0d" - ] - ] - }, - { - "id": "2cc2cdcf0b1f710e", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - }, - { - "t": "set", - "p": "source", - "pt": "msg", - "to": "iotredloop", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 3060, - "wires": [ - [ - "e12bb3f8258f4439" - ] - ] - }, - { - "id": "56d93c268a656fc4", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "ignore \"cible\" path", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "/cible/", - "vt": "str", - "case": false - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 790, - "y": 3060, - "wires": [ - [], - [ - "2cc2cdcf0b1f710e" - ] - ] - }, - { - "id": "630dfeb0e033a476", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "c706245ab487b7e2", - "name": "MQTT nodered", - "topic": "", - "qos": "1", - "retain": "true", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "51fc92ba27d12eaa", - "x": 1700, - "y": 3060, - "wires": [] - }, - { - "id": "d40db95f9a154c3a", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "c706245ab487b7e2", - "name": "mqtt nodered", - "links": [ - "e080152994978357", - "c5465d5f64db4b45" - ], - "x": 1335, - "y": 3060, - "wires": [ - [ - "19a5c46ec6c71456" - ] - ] - }, - { - "id": "0f1e413815ecc824", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "c706245ab487b7e2", - "name": "mqtt nodered output", - "mode": "link", - "links": [ - "32f2b2da5065afde", - "e942462a899825f8" - ], - "x": 1635, - "y": 3120, - "wires": [] - }, - { - "id": "19a5c46ec6c71456", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "c706245ab487b7e2", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^iotredloop", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 3060, - "wires": [ - [ - "630dfeb0e033a476", - "0f1e413815ecc824" - ] - ] - }, - { - "id": "24a3e98a92c0d57d", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "MQTT rfxcom", - "topic": "rfxcom2mqtt/devices/#", - "qos": "2", - "datatype": "auto-detect", - "broker": "cdd708cca8782382", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 190, - "y": 3300, - "wires": [ - [ - "014d8a5287538444" - ] - ] - }, - { - "id": "ed6bcbd32e72afe1", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "mqtt rfxcom", - "mode": "link", - "links": [ - "2dba8c9110e069a7", - "35e7aab1f0314355", - "5d58266f86a39f1a", - "617755f6bb1e2972", - "6390818317da9a22", - "8a3a49343040e9dd", - "92c37a3c88284082", - "aeec616505632135", - "beb26a3a88ba29ec", - "c55d2fbe9a6e0312", - "ca854a261959d5e3", - "cd0b7dc3cdbb9e58", - "dac6324a7409b4c0", - "dfe710104e247c4c", - "e6048bb9f2a4ecee", - "3256d8e9e4075f1f", - "d53118042e7346dc", - "3be6b8c3d6485c46", - "ba77500cd9f7f6da", - "bd614b03c17a2dcd", - "0e9fc0eb536659f8" - ], - "x": 1215, - "y": 3300, - "wires": [] - }, - { - "id": "be945e0c2c2208b0", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 3300, - "wires": [ - [ - "03eacf7a446d906c" - ] - ] - }, - { - "id": "735774bdb56f6be4", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "mqtt rfxcom gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 3360, - "wires": [ - [ - "be945e0c2c2208b0" - ] - ] - }, - { - "id": "014d8a5287538444", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "100 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "100", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 410, - "y": 3300, - "wires": [ - [ - "be945e0c2c2208b0" - ] - ] - }, - { - "id": "03eacf7a446d906c", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3ab6bcaac666ddc4", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 3300, - "wires": [ - [ - "ed6bcbd32e72afe1" - ] - ] - }, - { - "id": "a4f8287c851b1796", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "ae4487a0bf7f922f", - "name": "MQTT rfxcom", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "cdd708cca8782382", - "x": 1700, - "y": 3300, - "wires": [] - }, - { - "id": "de0c34e8104574b0", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "ae4487a0bf7f922f", - "name": "mqtt rfxcom", - "links": [ - "89d2eebcaafb5013" - ], - "x": 1335, - "y": 3300, - "wires": [ - [ - "a39cfa7867f1affb" - ] - ] - }, - { - "id": "f0991abcca9403bc", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "ae4487a0bf7f922f", - "name": "mqtt rfxcom output", - "mode": "link", - "links": [ - "881b1ed942ae2f5d", - "e1bd888198e8ad2b", - "4c77acdbe9fb09c9" - ], - "x": 1635, - "y": 3360, - "wires": [] - }, - { - "id": "a39cfa7867f1affb", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "ae4487a0bf7f922f", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^rfxcom2mqtt", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 3300, - "wires": [ - [ - "a4f8287c851b1796", - "f0991abcca9403bc" - ] - ] - }, - { - "id": "5d0abf7735e4d38c", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "MQTT zigbee", - "topic": "zigbee/#", - "qos": "2", - "datatype": "auto-detect", - "broker": "8b2a4e4f622431e7", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 190, - "y": 3540, - "wires": [ - [ - "529f7e707934e514" - ] - ] - }, - { - "id": "a3594a90f69fe537", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "mqtt zigbee", - "mode": "link", - "links": [ - "85491b834d936a64", - "688beab146efae13", - "b07f193a0642cf53", - "a06c81c7dbe18d43", - "3be6b8c3d6485c46", - "ba77500cd9f7f6da" - ], - "x": 1215, - "y": 3540, - "wires": [] - }, - { - "id": "0c032c944567a64d", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 3540, - "wires": [ - [ - "57bd505da426547c" - ] - ] - }, - { - "id": "fb76731a2064ad65", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "mqtt zigbee gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 3600, - "wires": [ - [ - "0c032c944567a64d" - ] - ] - }, - { - "id": "529f7e707934e514", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "50 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "50", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 390, - "y": 3540, - "wires": [ - [ - "0c032c944567a64d" - ] - ] - }, - { - "id": "7b89e1d6b81feb1d", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 3540, - "wires": [ - [ - "a3594a90f69fe537" - ] - ] - }, - { - "id": "57bd505da426547c", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "518b634fa908a4aa", - "name": "ignore \"bridge\" path", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^zigbee/bridge", - "vt": "str", - "case": false - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 790, - "y": 3540, - "wires": [ - [], - [ - "7b89e1d6b81feb1d" - ] - ] - }, - { - "id": "ac5c011465193c4e", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "b40a3b0d2d310907", - "name": "MQTT zigbee", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "8b2a4e4f622431e7", - "x": 1700, - "y": 3540, - "wires": [] - }, - { - "id": "6c324b24ca028984", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "b40a3b0d2d310907", - "name": "mqtt zigbee", - "links": [ - "89d2eebcaafb5013" - ], - "x": 1335, - "y": 3540, - "wires": [ - [ - "08f26275ef69e598" - ] - ] - }, - { - "id": "3398dde44269eb08", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "b40a3b0d2d310907", - "name": "mqtt zigbee output", - "mode": "link", - "links": [ - "c4571e81ac381f3e", - "76a866f04ab291ef" - ], - "x": 1625, - "y": 3600, - "wires": [] - }, - { - "id": "08f26275ef69e598", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "b40a3b0d2d310907", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^zigbee", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 3540, - "wires": [ - [ - "ac5c011465193c4e", - "3398dde44269eb08" - ] - ] - }, - { - "id": "c16f1ae420f44fb5", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "MQTT teleinfo", - "topic": "teleinfo/#", - "qos": "2", - "datatype": "auto-detect", - "broker": "d6ba6007b1901314", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 190, - "y": 3780, - "wires": [ - [ - "fa2acb5ac9bb8c8c" - ] - ] - }, - { - "id": "b491f7eb02575108", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "mqtt teleinfo", - "mode": "link", - "links": [ - "112f15815d373541", - "44a6b39d960c738d" - ], - "x": 1215, - "y": 3780, - "wires": [] - }, - { - "id": "ca7f0d58c55a1358", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 3780, - "wires": [ - [ - "a34aeb4c51bcf655" - ] - ] - }, - { - "id": "3423fd727184042c", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "mqtt teleinfo gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 3840, - "wires": [ - [ - "ca7f0d58c55a1358" - ] - ] - }, - { - "id": "fa2acb5ac9bb8c8c", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "20 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "20", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 390, - "y": 3780, - "wires": [ - [ - "ca7f0d58c55a1358" - ] - ] - }, - { - "id": "a34aeb4c51bcf655", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "fee31a77e542b203", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 3780, - "wires": [ - [ - "b491f7eb02575108" - ] - ] - }, - { - "id": "b0b2d9829230be99", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "0bf16a20b9656c59", - "name": "MQTT teleinfo", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "d6ba6007b1901314", - "x": 1700, - "y": 3780, - "wires": [] - }, - { - "id": "5d53068f8b9e6936", - "type": "link in", - "z": "ab51b1e8cad7b700", - "d": true, - "g": "0bf16a20b9656c59", - "name": "mqtt teleinfo", - "links": [], - "x": 1335, - "y": 3780, - "wires": [ - [ - "7a6db5a28141b284" - ] - ] - }, - { - "id": "a7e18f888c96ad05", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "0bf16a20b9656c59", - "name": "mqtt teleinfo output", - "mode": "link", - "links": [], - "x": 1635, - "y": 3840, - "wires": [] - }, - { - "id": "7a6db5a28141b284", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "0bf16a20b9656c59", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^teleinfo", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 3780, - "wires": [ - [ - "b0b2d9829230be99", - "a7e18f888c96ad05" - ] - ] - }, - { - "id": "c73c3b488741b764", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "MQTT bluetooth", - "topic": "ble/+/#", - "qos": "2", - "datatype": "auto-detect", - "broker": "ef0a4a5a649e056f", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 200, - "y": 4020, - "wires": [ - [ - "11a6de1c96795b4d" - ] - ] - }, - { - "id": "85c0a8032c692a9a", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "mqtt bluetooth", - "mode": "link", - "links": [ - "60e7ca843ea8f2e0" - ], - "x": 1215, - "y": 4020, - "wires": [] - }, - { - "id": "c8d1b777a117ee56", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 4020, - "wires": [ - [ - "e60cbfea876d91e7" - ] - ] - }, - { - "id": "be2acafce4c2c74d", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "mqtt bluetooth gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 4080, - "wires": [ - [ - "c8d1b777a117ee56" - ] - ] - }, - { - "id": "11a6de1c96795b4d", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "100 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "100", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 390, - "y": 4020, - "wires": [ - [ - "c8d1b777a117ee56" - ] - ] - }, - { - "id": "e60cbfea876d91e7", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "cf382d5398b6de43", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 4020, - "wires": [ - [ - "85c0a8032c692a9a" - ] - ] - }, - { - "id": "d4252f4120129d32", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "24eae452ebf32be6", - "name": "MQTT bluetooth", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "ef0a4a5a649e056f", - "x": 1700, - "y": 4020, - "wires": [] - }, - { - "id": "55db3023ac9ae3c1", - "type": "link in", - "z": "ab51b1e8cad7b700", - "d": true, - "g": "24eae452ebf32be6", - "name": "mqtt bluetooth", - "links": [], - "x": 1335, - "y": 4020, - "wires": [ - [ - "1052950934d566bf" - ] - ] - }, - { - "id": "a411175648a9f14e", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "24eae452ebf32be6", - "name": "mqtt bluetooth output", - "mode": "link", - "links": [ - "3ce812bf89416c2e", - "b5e020af24b6c81a" - ], - "x": 1635, - "y": 4080, - "wires": [] - }, - { - "id": "1052950934d566bf", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "24eae452ebf32be6", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^ble", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 4020, - "wires": [ - [ - "d4252f4120129d32", - "a411175648a9f14e" - ] - ] - }, - { - "id": "3eb59215b6fb19e2", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "MQTT zwave", - "topic": "zwave/#", - "qos": "2", - "datatype": "auto-detect", - "broker": "0bd651126b27aac6", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 190, - "y": 4260, - "wires": [ - [ - "341bc94dee8e9f96" - ] - ] - }, - { - "id": "ebdbee7baef678a6", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "mqtt zwave", - "mode": "link", - "links": [ - "0c42605d4e17f7c0", - "13d4b6546b6078c4", - "1674f27502adab2b", - "28bd5077f8af7155", - "3fa1505cc54c0a4a", - "6004623d39fd780d", - "60cdba59b6867a2c", - "882213638ae51376", - "8f1673c23cf67a9b", - "ae31619e220a07e2", - "b51e54b87cd8c281", - "db5ad7caf20f44e5", - "dbfdf715d2b6b0d5", - "f3685659add53893", - "21aa9d233920d3db", - "dcdb87d31c193475", - "dc42210872f30fd1", - "e21569bf7b9d08f6", - "51b478fd1f7bbfe9", - "da24d3cb7f933d8e", - "8a735409075bf432", - "9379fef014648636", - "4c78ee51560912b7", - "c634be35fddbb9e8", - "7a413720d3c10ba8", - "e2cf426558bd0b60", - "46f5b6984edcc88f", - "b4c41faf6220fb5d", - "dd07962707cadbc4", - "3be6b8c3d6485c46", - "ba77500cd9f7f6da", - "b7b008f170dcc07f" - ], - "x": 1215, - "y": 4260, - "wires": [] - }, - { - "id": "3738b065c50a0cac", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 4260, - "wires": [ - [ - "247945a0f503ac90" - ] - ] - }, - { - "id": "1d8f71c67df6cec9", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "mqtt zwave gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 4320, - "wires": [ - [ - "3738b065c50a0cac" - ] - ] - }, - { - "id": "341bc94dee8e9f96", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "50 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "50", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 390, - "y": 4260, - "wires": [ - [ - "3738b065c50a0cac" - ] - ] - }, - { - "id": "247945a0f503ac90", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "1e687cd4c0cc0ece", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 4260, - "wires": [ - [ - "ebdbee7baef678a6" - ] - ] - }, - { - "id": "92d0d0a5798c06cf", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "b5e2408a7d09537d", - "name": "MQTT zwave", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "0bd651126b27aac6", - "x": 1690, - "y": 4260, - "wires": [] - }, - { - "id": "62dd3e8d6c87a0f9", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "b5e2408a7d09537d", - "name": "mqtt zwave", - "links": [ - "a28b7b24c0ae9f8c", - "a02f78ffaedc9739", - "bccc33b4c0db9760", - "1c422d2c16125ca4", - "a06f150e72b873f2", - "eb69b7f3d6f894e3", - "f887adfd6fa075c2", - "2be05ddfe63b7313", - "648fbe7936a6e771", - "db4fcb97194bacd4", - "5ff9bf33eef6edea", - "4af3a6003798549f", - "a4f551d4cf84d1fe", - "9155daed44745330", - "9678ea31a895d9f4", - "433ea1c0deda2243", - "e96ba8b040e58218", - "41eb5aee9b16405c", - "2dfc7db2679a7eca", - "4f46e6e1244003c5", - "87b36faadc498428", - "b8e5f320e0d5e119", - "8a93f83ac805403e", - "f531075e0ccd5d1d", - "89d2eebcaafb5013", - "5f9d0ad90e63e256" - ], - "x": 1335, - "y": 4260, - "wires": [ - [ - "a6b8c9c223ea5942" - ] - ] - }, - { - "id": "82908fcfdf7f599a", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "b5e2408a7d09537d", - "name": "mqtt zwave output", - "mode": "link", - "links": [ - "ca89a4baa1806e71", - "ab63acc660e32a18" - ], - "x": 1635, - "y": 4320, - "wires": [] - }, - { - "id": "a6b8c9c223ea5942", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "b5e2408a7d09537d", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^zwave", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1490, - "y": 4260, - "wires": [ - [ - "92d0d0a5798c06cf", - "82908fcfdf7f599a" - ] - ] - }, - { - "id": "81b03b89f507e5ce", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "mqtt rhasspy", - "mode": "link", - "links": [], - "x": 1215, - "y": 4500, - "wires": [] - }, - { - "id": "3eda424ef17379e9", - "type": "q-gate", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "", - "controlTopic": "gate", - "defaultState": "queueing", - "openCmd": "open", - "closeCmd": "close", - "toggleCmd": "toggle", - "queueCmd": "close", - "defaultCmd": "default", - "triggerCmd": "trigger", - "flushCmd": "open", - "resetCmd": "reset", - "peekCmd": "peek", - "dropCmd": "drop", - "statusCmd": "status", - "maxQueueLength": "0", - "keepNewest": false, - "qToggle": false, - "persist": false, - "storeName": "default", - "x": 590, - "y": 4500, - "wires": [ - [ - "6d6bcbb7ce10198f" - ] - ] - }, - { - "id": "af3082ef59725979", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "mqtt rhasspy gate", - "links": [ - "d68d686bbf684c95", - "8fdb5986494986cc" - ], - "x": 455, - "y": 4560, - "wires": [ - [ - "3eda424ef17379e9" - ] - ] - }, - { - "id": "9518f42686aaf99c", - "type": "delay", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "50 msg / s", - "pauseType": "rate", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "50", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 390, - "y": 4500, - "wires": [ - [ - "3eda424ef17379e9" - ] - ] - }, - { - "id": "6d6bcbb7ce10198f", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "raz MQTT properties", - "rules": [ - { - "t": "delete", - "p": "qos", - "pt": "msg" - }, - { - "t": "delete", - "p": "retain", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1040, - "y": 4500, - "wires": [ - [ - "81b03b89f507e5ce" - ] - ] - }, - { - "id": "da4da5b15f106b4a", - "type": "mqtt in", - "z": "ab51b1e8cad7b700", - "g": "a23c2aa7e24eb8f7", - "name": "MQTT rhasspy", - "topic": "hermes/intent/#", - "qos": "2", - "datatype": "json", - "broker": "442ad702808e3c66", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 200, - "y": 4500, - "wires": [ - [ - "9518f42686aaf99c" - ] - ] - }, - { - "id": "d07502e0620ed3d9", - "type": "mqtt out", - "z": "ab51b1e8cad7b700", - "g": "234feecbe12db6fa", - "name": "MQTT rhasspy", - "topic": "", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "442ad702808e3c66", - "x": 1700, - "y": 4500, - "wires": [] - }, - { - "id": "4cfd419f66b58eda", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "234feecbe12db6fa", - "name": "mqtt rhasspy", - "links": [ - "10aafa2119bcdcac", - "2c561a436a935bc6" - ], - "x": 1335, - "y": 4500, - "wires": [ - [ - "d8b85eb94b57b81f" - ] - ] - }, - { - "id": "4db395b3e8fa404f", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "234feecbe12db6fa", - "name": "mqtt rhasspy output", - "mode": "link", - "links": [ - "833f9ea0770f6e5a" - ], - "x": 1635, - "y": 4560, - "wires": [] - }, - { - "id": "d8b85eb94b57b81f", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "234feecbe12db6fa", - "name": "check topic", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "^(hermes|rhasspy)", - "vt": "str", - "case": false - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 1470, - "y": 4500, - "wires": [ - [ - "d07502e0620ed3d9", - "4db395b3e8fa404f" - ] - ] - }, - { - "id": "caa3c5097468f133", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "cron minute", - "props": [], - "repeat": "60", - "crontab": "", - "once": true, - "onceDelay": "60", - "topic": "", - "x": 210, - "y": 2580, - "wires": [ - [ - "004bb30c27c94fb4" - ] - ] - }, - { - "id": "722c773f6314dd40", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "cron hour", - "props": [], - "repeat": "3600", - "crontab": "", - "once": true, - "onceDelay": "60", - "topic": "", - "x": 210, - "y": 2640, - "wires": [ - [ - "287d719de575c01f" - ] - ] - }, - { - "id": "867a71b7dae9c844", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "cron day", - "props": [], - "repeat": "", - "crontab": "00 03 * * *", - "once": true, - "onceDelay": "60", - "topic": "", - "x": 200, - "y": 2700, - "wires": [ - [ - "074a67bf0fcf09ad" - ] - ] - }, - { - "id": "004bb30c27c94fb4", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "kernel - cron minute", - "mode": "link", - "links": [], - "x": 365, - "y": 2580, - "wires": [] - }, - { - "id": "287d719de575c01f", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "kernel - cron hour", - "mode": "link", - "links": [], - "x": 365, - "y": 2640, - "wires": [] - }, - { - "id": "074a67bf0fcf09ad", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "kernel - cron day", - "mode": "link", - "links": [], - "x": 365, - "y": 2700, - "wires": [] - }, - { - "id": "d4146047c079ac62", - "type": "inject", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "cron midday", - "props": [], - "repeat": "", - "crontab": "00 12 * * *", - "once": false, - "onceDelay": "60", - "topic": "", - "x": 220, - "y": 2760, - "wires": [ - [ - "764da2d0527c1ef6" - ] - ] - }, - { - "id": "764da2d0527c1ef6", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "kernel - cron midday", - "mode": "link", - "links": [], - "x": 365, - "y": 2760, - "wires": [] - }, - { - "id": "7fa17301839c0fa6", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "60 s after boot and every day at 3am", - "info": "", - "x": 580, - "y": 2700, - "wires": [] - }, - { - "id": "412878f8c488a0f4", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "60 s after boot and every hour", - "info": "", - "x": 560, - "y": 2640, - "wires": [] - }, - { - "id": "c367834c9cccbe38", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "60 s after boot and every minute", - "info": "", - "x": 570, - "y": 2580, - "wires": [] - }, - { - "id": "ca442e58e65b32f8", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "a762a7a552cb9f03", - "name": "every day at 12am", - "info": "", - "x": 530, - "y": 2760, - "wires": [] - }, - { - "id": "33f7a250a7341c43", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "f67a857ae75d906f", - "name": "source - system kernel version", - "links": [ - "94c79b8f52f0b6ba" - ], - "x": 715, - "y": 5220, - "wires": [ - [ - "1b98c37b3b7502e4" - ] - ] - }, - { - "id": "1b98c37b3b7502e4", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "f67a857ae75d906f", - "name": "system / kernel / version", - "rules": [ - { - "t": "set", - "p": "bucket", - "pt": "msg", - "to": "system", - "tot": "str" - }, - { - "t": "set", - "p": "measurement", - "pt": "msg", - "to": "kernel", - "tot": "str" - }, - { - "t": "set", - "p": "field", - "pt": "msg", - "to": "version", - "tot": "str" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "about.version", - "tot": "global" - }, - { - "t": "delete", - "p": "topic", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 910, - "y": 5220, - "wires": [ - [ - "f02b4584af0d800c" - ] - ] - }, - { - "id": "f02b4584af0d800c", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "f67a857ae75d906f", - "name": "source - system kernel version", - "mode": "link", - "links": [ - "206c1fb4a48067df" - ], - "x": 1095, - "y": 5220, - "wires": [] - }, - { - "id": "840c05ce502e7fdd", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "a8dc4fab59fdefb4", - "name": "system / kernel / version / text / 0.0.1", - "rules": [ - { - "t": "set", - "p": "bucket", - "pt": "msg", - "to": "system", - "tot": "str" - }, - { - "t": "set", - "p": "measurement", - "pt": "msg", - "to": "kernel", - "tot": "str" - }, - { - "t": "set", - "p": "field", - "pt": "msg", - "to": "version", - "tot": "str" - }, - { - "t": "set", - "p": "default", - "pt": "msg", - "to": "0.0.1", - "tot": "str" - }, - { - "t": "set", - "p": "format", - "pt": "msg", - "to": "text", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 370, - "y": 5220, - "wires": [ - [ - "7f76434616f622dc" - ] - ] - }, - { - "id": "eed8990163b1ca81", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "a8dc4fab59fdefb4", - "name": "device - system kernel version", - "links": [ - "25445f5a9b787a0a" - ], - "x": 135, - "y": 5220, - "wires": [ - [ - "840c05ce502e7fdd" - ] - ] - }, - { - "id": "7f76434616f622dc", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "a8dc4fab59fdefb4", - "name": "device - system kernel version", - "mode": "link", - "links": [ - "bfa594bf1f876c92" - ], - "x": 595, - "y": 5220, - "wires": [] - }, - { - "id": "28b6c3fdb407e73b", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "3e71b89d61df9fd3", - "name": "influxdb must have \"resume\", \"linky\", \"system\", \"home\", \"unifi\" buckets, and one bucket per room", - "info": "", - "x": 450, - "y": 2280, - "wires": [] - }, - { - "id": "d02f1b2f2c3a2a30", - "type": "comment", - "z": "ab51b1e8cad7b700", - "g": "d1b208e623179a25", - "name": "MQTT nodered base topic must be same as automate name (default is iotredloop)", - "info": "", - "x": 820, - "y": 3120, - "wires": [] - }, - { - "id": "d85fe6335a6eae7b", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "bd21a8b1786d3ed2", - "name": "auto - device - in", - "links": [], - "x": 135, - "y": 4920, - "wires": [ - [ - "c3d88e1872a9789b" - ] - ] - }, - { - "id": "c3d88e1872a9789b", - "type": "function", - "z": "ab51b1e8cad7b700", - "g": "bd21a8b1786d3ed2", - "name": "check device", - "func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.model === 'undefined' ||\n typeof msg.id === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': typeof msg.measurement === 'undefined' ? '' : msg.measurement,\n 'field': typeof msg.field === 'undefined' ? '' : msg.field,\n 'model': msg.model,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option,\n 'id': msg.id,\n 'payload':''\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.model + ' / ' + newmsg.id });\nreturn [null,newmsg];", - "outputs": 2, - "timeout": "", - "noerr": 0, - "initialize": "\n", - "finalize": "\n", - "libs": [], - "x": 290, - "y": 4920, - "wires": [ - [ - "7f1a03ba2d4eb5d1" - ], - [ - "546f190f3ec0c90d" - ] - ] - }, - { - "id": "7f1a03ba2d4eb5d1", - "type": "debug", - "z": "ab51b1e8cad7b700", - "g": "bd21a8b1786d3ed2", - "name": "auto - device - uncomplete", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "true", - "targetType": "full", - "statusVal": "", - "statusType": "auto", - "x": 540, - "y": 4860, - "wires": [] - }, - { - "id": "546f190f3ec0c90d", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "bd21a8b1786d3ed2", - "name": "auto - device - in", - "mode": "link", - "links": [], - "x": 435, - "y": 4920, - "wires": [] - }, - { - "id": "3e1b4213132404be", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "auto - device - out", - "links": [], - "x": 775, - "y": 4980, - "wires": [ - [ - "0ff47b07b863d0ae" - ] - ] - }, - { - "id": "80459ca7317cce90", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "auto - device - out", - "mode": "link", - "links": [ - "bfa594bf1f876c92" - ], - "x": 1315, - "y": 4980, - "wires": [] - }, - { - "id": "e6d11d0438e20b80", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "register by protocols", - "rules": [ - { - "t": "set", - "p": "protocols[msg.protocol][msg.id]", - "pt": "global", - "to": "{\t 'bucket':msg.bucket,\t 'measurement':msg.measurement,\t 'field':msg.field,\t 'brand':msg.brand,\t 'model':msg.model,\t 'option':msg.option\t}", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1580, - "y": 4860, - "wires": [ - [] - ] - }, - { - "id": "0ff47b07b863d0ae", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "brand exists", - "property": "brand", - "propertyType": "msg", - "rules": [ - { - "t": "istype", - "v": "string", - "vt": "string" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 930, - "y": 4980, - "wires": [ - [ - "561aaceffe076a5d", - "8f4503a19f2f639e" - ], - [ - "80459ca7317cce90" - ] - ] - }, - { - "id": "561aaceffe076a5d", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "seen / xxx / number", - "rules": [ - { - "t": "set", - "p": "measurement", - "pt": "msg", - "to": "seen", - "tot": "str" - }, - { - "t": "set", - "p": "format", - "pt": "msg", - "to": "number", - "tot": "str" - }, - { - "t": "set", - "p": "default", - "pt": "msg", - "to": "", - "tot": "date" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1150, - "y": 4920, - "wires": [ - [ - "80459ca7317cce90" - ] - ] - }, - { - "id": "8f4503a19f2f639e", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "subid exists", - "property": "subid", - "propertyType": "msg", - "rules": [ - { - "t": "istype", - "v": "string", - "vt": "string" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1130, - "y": 4860, - "wires": [ - [ - "b08802b0dbd9a58b" - ], - [ - "e6d11d0438e20b80" - ] - ] - }, - { - "id": "b08802b0dbd9a58b", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "4937527cddd45b61", - "name": "add subid to id", - "rules": [ - { - "t": "set", - "p": "id", - "pt": "msg", - "to": "msg.id&'.'&msg.subid", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1340, - "y": 4800, - "wires": [ - [ - "e6d11d0438e20b80" - ] - ] - }, - { - "id": "ba77500cd9f7f6da", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "auto - source - in", - "links": [ - "a3594a90f69fe537", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "3eb59215b6fb19e2", "ebdbee7baef678a6", - "ed6bcbd32e72afe1" + "3738b065c50a0cac", + "1d8f71c67df6cec9", + "341bc94dee8e9f96", + "247945a0f503ac90" ], - "x": 1835, - "y": 4920, - "wires": [ - [ - "30220f4fe07e35a4" - ] - ] + "x": 94, + "y": 4219, + "w": 1162, + "h": 142 }, { - "id": "30220f4fe07e35a4", + "id": "24eae452ebf32be6", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "72988ccecf802b11", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "d4252f4120129d32", + "55db3023ac9ae3c1", + "a411175648a9f14e", + "1052950934d566bf" + ], + "x": 1294, + "y": 3979, + "w": 512, + "h": 142 + }, + { + "id": "cf382d5398b6de43", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "72988ccecf802b11", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "c73c3b488741b764", + "85c0a8032c692a9a", + "c8d1b777a117ee56", + "be2acafce4c2c74d", + "11a6de1c96795b4d", + "e60cbfea876d91e7" + ], + "x": 94, + "y": 3979, + "w": 1162, + "h": 142 + }, + { + "id": "0bf16a20b9656c59", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "b9a706d9e4980c1e", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "b0b2d9829230be99", + "5d53068f8b9e6936", + "a7e18f888c96ad05", + "7a6db5a28141b284" + ], + "x": 1294, + "y": 3739, + "w": 512, + "h": 142 + }, + { + "id": "fee31a77e542b203", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "b9a706d9e4980c1e", + "name": "devices teleinfo", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "c16f1ae420f44fb5", + "b491f7eb02575108", + "ca7f0d58c55a1358", + "3423fd727184042c", + "fa2acb5ac9bb8c8c", + "a34aeb4c51bcf655" + ], + "x": 94, + "y": 3739, + "w": 1162, + "h": 142 + }, + { + "id": "b40a3b0d2d310907", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "c7f0e1480df909e9", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "ac5c011465193c4e", + "6c324b24ca028984", + "3398dde44269eb08", + "08f26275ef69e598" + ], + "x": 1294, + "y": 3499, + "w": 512, + "h": 142 + }, + { + "id": "518b634fa908a4aa", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "c7f0e1480df909e9", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "5d0abf7735e4d38c", + "a3594a90f69fe537", + "0c032c944567a64d", + "fb76731a2064ad65", + "529f7e707934e514", + "7b89e1d6b81feb1d", + "57bd505da426547c" + ], + "x": 94, + "y": 3499, + "w": 1162, + "h": 142 + }, + { + "id": "ae4487a0bf7f922f", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "6c3162f93343ce7e", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "a4f8287c851b1796", + "de0c34e8104574b0", + "f0991abcca9403bc", + "a39cfa7867f1affb" + ], + "x": 1294, + "y": 3259, + "w": 512, + "h": 142 + }, + { + "id": "3ab6bcaac666ddc4", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "6c3162f93343ce7e", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "24a3e98a92c0d57d", + "ed6bcbd32e72afe1", + "be945e0c2c2208b0", + "735774bdb56f6be4", + "014d8a5287538444", + "03eacf7a446d906c" + ], + "x": 94, + "y": 3259, + "w": 1162, + "h": 142 + }, + { + "id": "c706245ab487b7e2", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "93fb3d4a50d16da0", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "630dfeb0e033a476", + "d40db95f9a154c3a", + "0f1e413815ecc824", + "19a5c46ec6c71456" + ], + "x": 1294, + "y": 3019, + "w": 512, + "h": 142 + }, + { + "id": "d1b208e623179a25", + "type": "group", + "z": "ab51b1e8cad7b700", + "g": "93fb3d4a50d16da0", + "name": "", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "a19b9fbac3e9f89c", + "e12bb3f8258f4439", + "0a4c943dc3a06f0d", + "af148bf44b019b35", + "b961d989c357e6d6", + "2cc2cdcf0b1f710e", + "56d93c268a656fc4", + "d02f1b2f2c3a2a30" + ], + "x": 94, + "y": 3019, + "w": 1162, + "h": 142 + }, + { + "id": "69041daa92bc0a8b", "type": "change", "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "split topic", + "g": "d9548e9b1a2e6f36", + "name": "set prefix", "rules": [ { "t": "set", - "p": "input", + "p": "prefix", "pt": "msg", - "to": "$split(msg.topic,'/')", + "to": "'rfxcom2mqtt/devices/'&msg.id", "tot": "jsonata" } ], @@ -6189,21 +1192,105 @@ "from": "", "to": "", "reg": false, - "x": 1980, - "y": 4920, + "x": 6520, + "y": 4980, "wires": [ [ - "ac4653be6ea01477" + "b2ccb6a2a248015d" ] ] }, { - "id": "ac4653be6ea01477", + "id": "9262e99e20e0e654", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "d9548e9b1a2e6f36", + "name": "set prefix", + "rules": [ + { + "t": "set", + "p": "prefix", + "pt": "msg", + "to": "'zigbee/'&msg.id", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 6520, + "y": 4920, + "wires": [ + [ + "b2ccb6a2a248015d" + ] + ] + }, + { + "id": "d318afa2a81e4ff9", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "d9548e9b1a2e6f36", + "name": "set prefix", + "rules": [ + { + "t": "set", + "p": "prefix", + "pt": "msg", + "to": "'zwave/'&msg.id", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 6520, + "y": 4860, + "wires": [ + [ + "b2ccb6a2a248015d" + ] + ] + }, + { + "id": "b2ccb6a2a248015d", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "d9548e9b1a2e6f36", + "name": "set topic", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "msg.prefix&'/'&msg.topic", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 6700, + "y": 4920, + "wires": [ + [ + "89d2eebcaafb5013" + ] + ] + }, + { + "id": "9c89a41128573752", "type": "switch", "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", + "g": "d9548e9b1a2e6f36", "name": "select protocol", - "property": "input[0]", + "property": "protocol", "propertyType": "msg", "rules": [ { @@ -6218,29 +1305,556 @@ }, { "t": "eq", - "v": "rfxcom2mqtt", + "v": "rfxcom", "vt": "str" } ], "checkall": "false", "repair": false, "outputs": 3, - "x": 2180, + "x": 6320, "y": 4920, "wires": [ [ - "1ceced58d0c32e85" + "d318afa2a81e4ff9" ], [ - "5460a158225a328b" + "9262e99e20e0e654" ], [ - "aa275d99ba85bee2" + "69041daa92bc0a8b" ] ] }, { - "id": "1ceced58d0c32e85", + "id": "89d2eebcaafb5013", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "d9548e9b1a2e6f36", + "name": "auto - metric - out", + "mode": "link", + "links": [ + "62dd3e8d6c87a0f9", + "6c324b24ca028984", + "de0c34e8104574b0" + ], + "x": 6835, + "y": 4920, + "wires": [] + }, + { + "id": "e93e8daa30075ae6", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "d9548e9b1a2e6f36", + "name": "auto - metric - out", + "links": [], + "x": 6155, + "y": 4920, + "wires": [ + [ + "9c89a41128573752" + ] + ] + }, + { + "id": "f61f5fe80ddf6ff1", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "protocol", + "property": "protocol", + "propertyType": "msg", + "rules": [ + { + "t": "nempty" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 5520, + "y": 4860, + "wires": [ + [ + "a2d25db2ace537ae" + ] + ] + }, + { + "id": "637b84024e725f38", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "auto - metric - in", + "mode": "link", + "links": [], + "x": 5975, + "y": 4860, + "wires": [] + }, + { + "id": "282bb73eb4892ab9", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "id", + "property": "id", + "propertyType": "msg", + "rules": [ + { + "t": "nempty" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 5850, + "y": 4860, + "wires": [ + [ + "637b84024e725f38" + ] + ] + }, + { + "id": "a2d25db2ace537ae", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "model", + "property": "model", + "propertyType": "msg", + "rules": [ + { + "t": "nempty" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 5690, + "y": 4860, + "wires": [ + [ + "282bb73eb4892ab9" + ] + ] + }, + { + "id": "a4e3db9cc35fc9eb", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "from device", + "rules": [ + { + "t": "set", + "p": "protocol", + "pt": "msg", + "to": "devices[msg.bucket][msg.measurement][msg.field]protocol", + "tot": "global" + }, + { + "t": "set", + "p": "model", + "pt": "msg", + "to": "devices[msg.bucket][msg.measurement][msg.field]model", + "tot": "global" + }, + { + "t": "set", + "p": "id", + "pt": "msg", + "to": "devices[msg.bucket][msg.measurement][msg.field]id", + "tot": "global" + }, + { + "t": "set", + "p": "option", + "pt": "msg", + "to": "devices[msg.bucket][msg.measurement][msg.field]option", + "tot": "global" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 5330, + "y": 4860, + "wires": [ + [ + "f61f5fe80ddf6ff1" + ] + ] + }, + { + "id": "7d45ca7ad7f363fe", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "874075d44d19869a", + "name": "auto - metric - in", + "links": [ + "031a6afd8300356a" + ], + "x": 5175, + "y": 4860, + "wires": [ + [ + "a4e3db9cc35fc9eb" + ] + ] + }, + { + "id": "70ae9d85820c14fb", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "set field", + "rules": [ + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "seen", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 3740, + "y": 4920, + "wires": [ + [ + "5e3cb9bb3266089b" + ] + ] + }, + { + "id": "6140ca98749acd85", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "seen", + "property": "seen", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "string", + "vt": "string" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 3570, + "y": 4980, + "wires": [ + [ + "70ae9d85820c14fb" + ], + [ + "5e3cb9bb3266089b" + ] + ] + }, + { + "id": "bb1e8e34559c5a7f", + "type": "trigger", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "250 ms by path", + "op1": "", + "op2": "", + "op1type": "pay", + "op2type": "nul", + "duration": "250", + "extend": true, + "overrideDelay": false, + "units": "ms", + "reset": "", + "bytopic": "topic", + "topic": "path", + "outputs": 1, + "x": 4180, + "y": 4980, + "wires": [ + [ + "83e8a9fa324dd4b9" + ] + ] + }, + { + "id": "83e8a9fa324dd4b9", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "get flow stack", + "rules": [ + { + "t": "set", + "p": "seen", + "pt": "msg", + "to": "#:(memoryOnly)::seen", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 4400, + "y": 4980, + "wires": [ + [ + "0b32686fe74c253f" + ] + ] + }, + { + "id": "51b002c497ad57cd", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "set flow stack", + "rules": [ + { + "t": "set", + "p": "#:(memoryOnly)::seen[msg.path]", + "pt": "flow", + "to": "", + "tot": "date" + }, + { + "t": "delete", + "p": "seen", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 4840, + "y": 4980, + "wires": [ + [ + "06581753b7673f83" + ] + ] + }, + { + "id": "0b32686fe74c253f", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "limit to 15 min", + "property": "seen[msg.path]", + "propertyType": "msg", + "rules": [ + { + "t": "null" + }, + { + "t": "lt", + "v": "$number(msg.payload) - 900000", + "vt": "jsonata" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 4620, + "y": 4980, + "wires": [ + [ + "51b002c497ad57cd" + ], + [ + "51b002c497ad57cd" + ] + ] + }, + { + "id": "5e3cb9bb3266089b", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "set measurement", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "seen", + "tot": "str" + }, + { + "t": "set", + "p": "path", + "pt": "msg", + "to": "msg.bucket & '/' & msg.measurement & '/' & msg.field", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "", + "tot": "date" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 3950, + "y": 4980, + "wires": [ + [ + "bb1e8e34559c5a7f" + ] + ] + }, + { + "id": "06581753b7673f83", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "auto - source - out", + "mode": "link", + "links": [ + "206c1fb4a48067df" + ], + "x": 4995, + "y": 4860, + "wires": [] + }, + { + "id": "14a0a0839924964f", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "266f4436dc45ce89", + "name": "auto - source - out", + "links": [], + "x": 3435, + "y": 4860, + "wires": [ + [ + "06581753b7673f83", + "6140ca98749acd85" + ] + ] + }, + { + "id": "411b13dfb3e989f0", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "by _id", + "rules": [ + { + "t": "set", + "p": "device", + "pt": "msg", + "to": "protocols[msg.protocol][msg.id]", + "tot": "global" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2970, + "y": 4960, + "wires": [ + [ + "d34f38f155583ff7" + ] + ] + }, + { + "id": "4908c2284e498338", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "exists", + "property": "device", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "object", + "vt": "object" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 2810, + "y": 4920, + "wires": [ + [ + "d34f38f155583ff7" + ], + [ + "411b13dfb3e989f0" + ] + ] + }, + { + "id": "5891781e4a61525a", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "by full id", + "rules": [ + { + "t": "set", + "p": "full_id", + "pt": "msg", + "to": "msg.id&'.'&msg.subid", + "tot": "jsonata" + }, + { + "t": "set", + "p": "device", + "pt": "msg", + "to": "protocols[msg.protocol][msg.full_id]", + "tot": "global" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2640, + "y": 4920, + "wires": [ + [ + "4908c2284e498338" + ] + ] + }, + { + "id": "aa275d99ba85bee2", "type": "change", "z": "ab51b1e8cad7b700", "g": "3be00f677c6457bd", @@ -6250,14 +1864,14 @@ "t": "set", "p": "protocol", "pt": "msg", - "to": "zwave", + "to": "rfxcom", "tot": "str" }, { "t": "set", "p": "id", "pt": "msg", - "to": "input[1]", + "to": "input[2]", "tot": "msg" }, { @@ -6271,7 +1885,7 @@ "t": "set", "p": "prefix", "pt": "msg", - "to": "'zwave/'&msg.id", + "to": "'rfxcom2mqtt/devices/'&msg.id", "tot": "jsonata" } ], @@ -6281,68 +1895,7 @@ "to": "", "reg": false, "x": 2420, - "y": 4860, - "wires": [ - [ - "5891781e4a61525a" - ] - ] - }, - { - "id": "24058eec92534b27", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "auto - source - in", - "mode": "link", - "links": [], - "x": 3255, - "y": 4920, - "wires": [] - }, - { - "id": "5460a158225a328b", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "extract protocol values", - "rules": [ - { - "t": "set", - "p": "protocol", - "pt": "msg", - "to": "zigbee", - "tot": "str" - }, - { - "t": "set", - "p": "id", - "pt": "msg", - "to": "input[1]", - "tot": "msg" - }, - { - "t": "set", - "p": "subid", - "pt": "msg", - "to": "0", - "tot": "str" - }, - { - "t": "set", - "p": "prefix", - "pt": "msg", - "to": "'zigbee/'&msg.id", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 2420, - "y": 4920, + "y": 4980, "wires": [ [ "5891781e4a61525a" @@ -6418,7 +1971,7 @@ ] }, { - "id": "aa275d99ba85bee2", + "id": "5460a158225a328b", "type": "change", "z": "ab51b1e8cad7b700", "g": "3be00f677c6457bd", @@ -6428,14 +1981,75 @@ "t": "set", "p": "protocol", "pt": "msg", - "to": "rfxcom", + "to": "zigbee", "tot": "str" }, { "t": "set", "p": "id", "pt": "msg", - "to": "input[2]", + "to": "input[1]", + "tot": "msg" + }, + { + "t": "set", + "p": "subid", + "pt": "msg", + "to": "0", + "tot": "str" + }, + { + "t": "set", + "p": "prefix", + "pt": "msg", + "to": "'zigbee/'&msg.id", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2420, + "y": 4920, + "wires": [ + [ + "5891781e4a61525a" + ] + ] + }, + { + "id": "24058eec92534b27", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "auto - source - in", + "mode": "link", + "links": [], + "x": 3255, + "y": 4920, + "wires": [] + }, + { + "id": "1ceced58d0c32e85", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "extract protocol values", + "rules": [ + { + "t": "set", + "p": "protocol", + "pt": "msg", + "to": "zwave", + "tot": "str" + }, + { + "t": "set", + "p": "id", + "pt": "msg", + "to": "input[1]", "tot": "msg" }, { @@ -6449,7 +2063,7 @@ "t": "set", "p": "prefix", "pt": "msg", - "to": "'rfxcom2mqtt/devices/'&msg.id", + "to": "'zwave/'&msg.id", "tot": "jsonata" } ], @@ -6459,7 +2073,7 @@ "to": "", "reg": false, "x": 2420, - "y": 4980, + "y": 4860, "wires": [ [ "5891781e4a61525a" @@ -6467,539 +2081,12 @@ ] }, { - "id": "5891781e4a61525a", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "by full id", - "rules": [ - { - "t": "set", - "p": "full_id", - "pt": "msg", - "to": "msg.id&'.'&msg.subid", - "tot": "jsonata" - }, - { - "t": "set", - "p": "device", - "pt": "msg", - "to": "protocols[msg.protocol][msg.full_id]", - "tot": "global" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 2640, - "y": 4920, - "wires": [ - [ - "4908c2284e498338" - ] - ] - }, - { - "id": "4908c2284e498338", + "id": "ac4653be6ea01477", "type": "switch", "z": "ab51b1e8cad7b700", "g": "3be00f677c6457bd", - "name": "exists", - "property": "device", - "propertyType": "msg", - "rules": [ - { - "t": "istype", - "v": "object", - "vt": "object" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 2810, - "y": 4920, - "wires": [ - [ - "d34f38f155583ff7" - ], - [ - "411b13dfb3e989f0" - ] - ] - }, - { - "id": "411b13dfb3e989f0", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "3be00f677c6457bd", - "name": "by _id", - "rules": [ - { - "t": "set", - "p": "device", - "pt": "msg", - "to": "protocols[msg.protocol][msg.id]", - "tot": "global" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 2970, - "y": 4960, - "wires": [ - [ - "d34f38f155583ff7" - ] - ] - }, - { - "id": "14a0a0839924964f", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "auto - source - out", - "links": [], - "x": 3435, - "y": 4860, - "wires": [ - [ - "06581753b7673f83", - "6140ca98749acd85" - ] - ] - }, - { - "id": "06581753b7673f83", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "auto - source - out", - "mode": "link", - "links": [ - "206c1fb4a48067df" - ], - "x": 4995, - "y": 4860, - "wires": [] - }, - { - "id": "5e3cb9bb3266089b", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "set measurement", - "rules": [ - { - "t": "set", - "p": "measurement", - "pt": "msg", - "to": "seen", - "tot": "str" - }, - { - "t": "set", - "p": "path", - "pt": "msg", - "to": "msg.bucket & '/' & msg.measurement & '/' & msg.field", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "", - "tot": "date" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 3950, - "y": 4980, - "wires": [ - [ - "bb1e8e34559c5a7f" - ] - ] - }, - { - "id": "0b32686fe74c253f", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "limit to 15 min", - "property": "seen[msg.path]", - "propertyType": "msg", - "rules": [ - { - "t": "null" - }, - { - "t": "lt", - "v": "$number(msg.payload) - 900000", - "vt": "jsonata" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 4620, - "y": 4980, - "wires": [ - [ - "51b002c497ad57cd" - ], - [ - "51b002c497ad57cd" - ] - ] - }, - { - "id": "51b002c497ad57cd", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "set flow stack", - "rules": [ - { - "t": "set", - "p": "#:(memoryOnly)::seen[msg.path]", - "pt": "flow", - "to": "", - "tot": "date" - }, - { - "t": "delete", - "p": "seen", - "pt": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 4840, - "y": 4980, - "wires": [ - [ - "06581753b7673f83" - ] - ] - }, - { - "id": "83e8a9fa324dd4b9", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "get flow stack", - "rules": [ - { - "t": "set", - "p": "seen", - "pt": "msg", - "to": "#:(memoryOnly)::seen", - "tot": "flow" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 4400, - "y": 4980, - "wires": [ - [ - "0b32686fe74c253f" - ] - ] - }, - { - "id": "bb1e8e34559c5a7f", - "type": "trigger", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "250 ms by path", - "op1": "", - "op2": "", - "op1type": "pay", - "op2type": "nul", - "duration": "250", - "extend": true, - "overrideDelay": false, - "units": "ms", - "reset": "", - "bytopic": "topic", - "topic": "path", - "outputs": 1, - "x": 4180, - "y": 4980, - "wires": [ - [ - "83e8a9fa324dd4b9" - ] - ] - }, - { - "id": "6140ca98749acd85", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "seen", - "property": "seen", - "propertyType": "msg", - "rules": [ - { - "t": "istype", - "v": "string", - "vt": "string" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 3570, - "y": 4980, - "wires": [ - [ - "70ae9d85820c14fb" - ], - [ - "5e3cb9bb3266089b" - ] - ] - }, - { - "id": "70ae9d85820c14fb", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "266f4436dc45ce89", - "name": "set field", - "rules": [ - { - "t": "set", - "p": "field", - "pt": "msg", - "to": "seen", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 3740, - "y": 4920, - "wires": [ - [ - "5e3cb9bb3266089b" - ] - ] - }, - { - "id": "7d45ca7ad7f363fe", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "auto - metric - in", - "links": [ - "031a6afd8300356a" - ], - "x": 5175, - "y": 4860, - "wires": [ - [ - "a4e3db9cc35fc9eb" - ] - ] - }, - { - "id": "a4e3db9cc35fc9eb", - "type": "change", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "from device", - "rules": [ - { - "t": "set", - "p": "protocol", - "pt": "msg", - "to": "devices[msg.bucket][msg.measurement][msg.field]protocol", - "tot": "global" - }, - { - "t": "set", - "p": "model", - "pt": "msg", - "to": "devices[msg.bucket][msg.measurement][msg.field]model", - "tot": "global" - }, - { - "t": "set", - "p": "id", - "pt": "msg", - "to": "devices[msg.bucket][msg.measurement][msg.field]id", - "tot": "global" - }, - { - "t": "set", - "p": "option", - "pt": "msg", - "to": "devices[msg.bucket][msg.measurement][msg.field]option", - "tot": "global" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 5330, - "y": 4860, - "wires": [ - [ - "f61f5fe80ddf6ff1" - ] - ] - }, - { - "id": "a2d25db2ace537ae", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "model", - "property": "model", - "propertyType": "msg", - "rules": [ - { - "t": "nempty" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 5690, - "y": 4860, - "wires": [ - [ - "282bb73eb4892ab9" - ] - ] - }, - { - "id": "282bb73eb4892ab9", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "id", - "property": "id", - "propertyType": "msg", - "rules": [ - { - "t": "nempty" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 5850, - "y": 4860, - "wires": [ - [ - "637b84024e725f38" - ] - ] - }, - { - "id": "637b84024e725f38", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "auto - metric - in", - "mode": "link", - "links": [], - "x": 5975, - "y": 4860, - "wires": [] - }, - { - "id": "f61f5fe80ddf6ff1", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "874075d44d19869a", - "name": "protocol", - "property": "protocol", - "propertyType": "msg", - "rules": [ - { - "t": "nempty" - } - ], - "checkall": "false", - "repair": false, - "outputs": 1, - "x": 5520, - "y": 4860, - "wires": [ - [ - "a2d25db2ace537ae" - ] - ] - }, - { - "id": "e93e8daa30075ae6", - "type": "link in", - "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "auto - metric - out", - "links": [], - "x": 6155, - "y": 4920, - "wires": [ - [ - "9c89a41128573752" - ] - ] - }, - { - "id": "89d2eebcaafb5013", - "type": "link out", - "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "auto - metric - out", - "mode": "link", - "links": [ - "62dd3e8d6c87a0f9", - "6c324b24ca028984", - "de0c34e8104574b0" - ], - "x": 6835, - "y": 4920, - "wires": [] - }, - { - "id": "9c89a41128573752", - "type": "switch", - "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", "name": "select protocol", - "property": "protocol", + "property": "input[0]", "propertyType": "msg", "rules": [ { @@ -7014,40 +2101,4851 @@ }, { "t": "eq", - "v": "rfxcom", + "v": "rfxcom2mqtt", "vt": "str" } ], "checkall": "false", "repair": false, "outputs": 3, - "x": 6320, + "x": 2180, "y": 4920, "wires": [ [ - "d318afa2a81e4ff9" + "1ceced58d0c32e85" ], [ - "9262e99e20e0e654" + "5460a158225a328b" ], [ - "69041daa92bc0a8b" + "aa275d99ba85bee2" ] ] }, { - "id": "b2ccb6a2a248015d", + "id": "30220f4fe07e35a4", "type": "change", "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "set topic", + "g": "3be00f677c6457bd", + "name": "split topic", + "rules": [ + { + "t": "set", + "p": "input", + "pt": "msg", + "to": "$split(msg.topic,'/')", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1980, + "y": 4920, + "wires": [ + [ + "ac4653be6ea01477" + ] + ] + }, + { + "id": "ba77500cd9f7f6da", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "3be00f677c6457bd", + "name": "auto - source - in", + "links": [ + "a3594a90f69fe537", + "ebdbee7baef678a6", + "ed6bcbd32e72afe1" + ], + "x": 1835, + "y": 4920, + "wires": [ + [ + "30220f4fe07e35a4" + ] + ] + }, + { + "id": "b08802b0dbd9a58b", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "add subid to id", + "rules": [ + { + "t": "set", + "p": "id", + "pt": "msg", + "to": "msg.id&'.'&msg.subid", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1340, + "y": 4800, + "wires": [ + [ + "e6d11d0438e20b80" + ] + ] + }, + { + "id": "8f4503a19f2f639e", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "subid exists", + "property": "subid", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "string", + "vt": "string" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1130, + "y": 4860, + "wires": [ + [ + "b08802b0dbd9a58b" + ], + [ + "e6d11d0438e20b80" + ] + ] + }, + { + "id": "561aaceffe076a5d", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "seen / xxx / number", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "seen", + "tot": "str" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "number", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "", + "tot": "date" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1150, + "y": 4920, + "wires": [ + [ + "80459ca7317cce90" + ] + ] + }, + { + "id": "0ff47b07b863d0ae", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "brand exists", + "property": "brand", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "string", + "vt": "string" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 930, + "y": 4980, + "wires": [ + [ + "561aaceffe076a5d", + "8f4503a19f2f639e" + ], + [ + "80459ca7317cce90" + ] + ] + }, + { + "id": "e6d11d0438e20b80", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "register by protocols", + "rules": [ + { + "t": "set", + "p": "protocols[msg.protocol][msg.id]", + "pt": "global", + "to": "{\t 'bucket':msg.bucket,\t 'measurement':msg.measurement,\t 'field':msg.field,\t 'brand':msg.brand,\t 'model':msg.model,\t 'option':msg.option\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1580, + "y": 4860, + "wires": [ + [] + ] + }, + { + "id": "80459ca7317cce90", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "auto - device - out", + "mode": "link", + "links": [ + "bfa594bf1f876c92" + ], + "x": 1315, + "y": 4980, + "wires": [] + }, + { + "id": "3e1b4213132404be", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "4937527cddd45b61", + "name": "auto - device - out", + "links": [], + "x": 775, + "y": 4980, + "wires": [ + [ + "0ff47b07b863d0ae" + ] + ] + }, + { + "id": "546f190f3ec0c90d", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "bd21a8b1786d3ed2", + "name": "auto - device - in", + "mode": "link", + "links": [], + "x": 435, + "y": 4920, + "wires": [] + }, + { + "id": "7f1a03ba2d4eb5d1", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "bd21a8b1786d3ed2", + "name": "auto - device - uncomplete", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 540, + "y": 4860, + "wires": [] + }, + { + "id": "c3d88e1872a9789b", + "type": "function", + "z": "ab51b1e8cad7b700", + "g": "bd21a8b1786d3ed2", + "name": "check device", + "func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.model === 'undefined' ||\n typeof msg.id === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': typeof msg.measurement === 'undefined' ? '' : msg.measurement,\n 'field': typeof msg.field === 'undefined' ? '' : msg.field,\n 'model': msg.model,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option,\n 'id': msg.id,\n 'payload':''\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.model + ' / ' + newmsg.id });\nreturn [null,newmsg];", + "outputs": 2, + "timeout": "", + "noerr": 0, + "initialize": "\n", + "finalize": "\n", + "libs": [], + "x": 290, + "y": 4920, + "wires": [ + [ + "7f1a03ba2d4eb5d1" + ], + [ + "546f190f3ec0c90d" + ] + ] + }, + { + "id": "d85fe6335a6eae7b", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "bd21a8b1786d3ed2", + "name": "auto - device - in", + "links": [], + "x": 135, + "y": 4920, + "wires": [ + [ + "c3d88e1872a9789b" + ] + ] + }, + { + "id": "d02f1b2f2c3a2a30", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "MQTT nodered base topic must be same as automate name (default is iotredloop)", + "info": "", + "x": 820, + "y": 3120, + "wires": [] + }, + { + "id": "28b6c3fdb407e73b", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "influxdb must have \"resume\", \"linky\", \"system\", \"home\", \"unifi\" buckets, and one bucket per room", + "info": "", + "x": 450, + "y": 2280, + "wires": [] + }, + { + "id": "7f76434616f622dc", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a8dc4fab59fdefb4", + "name": "device - system kernel version", + "mode": "link", + "links": [ + "bfa594bf1f876c92" + ], + "x": 595, + "y": 5220, + "wires": [] + }, + { + "id": "eed8990163b1ca81", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "a8dc4fab59fdefb4", + "name": "device - system kernel version", + "links": [ + "25445f5a9b787a0a" + ], + "x": 135, + "y": 5220, + "wires": [ + [ + "840c05ce502e7fdd" + ] + ] + }, + { + "id": "840c05ce502e7fdd", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "a8dc4fab59fdefb4", + "name": "system / kernel / version / text / 0.0.1", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "system", + "tot": "str" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "kernel", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "version", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "0.0.1", + "tot": "str" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "text", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 370, + "y": 5220, + "wires": [ + [ + "7f76434616f622dc" + ] + ] + }, + { + "id": "f02b4584af0d800c", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "f67a857ae75d906f", + "name": "source - system kernel version", + "mode": "link", + "links": [ + "206c1fb4a48067df" + ], + "x": 1095, + "y": 5220, + "wires": [] + }, + { + "id": "1b98c37b3b7502e4", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "f67a857ae75d906f", + "name": "system / kernel / version", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "system", + "tot": "str" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "kernel", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "version", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "about.version", + "tot": "global" + }, + { + "t": "delete", + "p": "topic", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 910, + "y": 5220, + "wires": [ + [ + "f02b4584af0d800c" + ] + ] + }, + { + "id": "33f7a250a7341c43", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "f67a857ae75d906f", + "name": "source - system kernel version", + "links": [ + "94c79b8f52f0b6ba" + ], + "x": 715, + "y": 5220, + "wires": [ + [ + "1b98c37b3b7502e4" + ] + ] + }, + { + "id": "ca442e58e65b32f8", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "every day at 12am", + "info": "", + "x": 530, + "y": 2760, + "wires": [] + }, + { + "id": "c367834c9cccbe38", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "60 s after boot and every minute", + "info": "", + "x": 570, + "y": 2580, + "wires": [] + }, + { + "id": "412878f8c488a0f4", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "60 s after boot and every hour", + "info": "", + "x": 560, + "y": 2640, + "wires": [] + }, + { + "id": "7fa17301839c0fa6", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "60 s after boot and every day at 3am", + "info": "", + "x": 580, + "y": 2700, + "wires": [] + }, + { + "id": "764da2d0527c1ef6", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "kernel - cron midday", + "mode": "link", + "links": [], + "x": 365, + "y": 2760, + "wires": [] + }, + { + "id": "d4146047c079ac62", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "cron midday", + "props": [], + "repeat": "", + "crontab": "00 12 * * *", + "once": false, + "onceDelay": "60", + "topic": "", + "x": 220, + "y": 2760, + "wires": [ + [ + "764da2d0527c1ef6" + ] + ] + }, + { + "id": "074a67bf0fcf09ad", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "kernel - cron day", + "mode": "link", + "links": [], + "x": 365, + "y": 2700, + "wires": [] + }, + { + "id": "287d719de575c01f", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "kernel - cron hour", + "mode": "link", + "links": [], + "x": 365, + "y": 2640, + "wires": [] + }, + { + "id": "004bb30c27c94fb4", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "kernel - cron minute", + "mode": "link", + "links": [], + "x": 365, + "y": 2580, + "wires": [] + }, + { + "id": "867a71b7dae9c844", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "cron day", + "props": [], + "repeat": "", + "crontab": "00 03 * * *", + "once": true, + "onceDelay": "60", + "topic": "", + "x": 200, + "y": 2700, + "wires": [ + [ + "074a67bf0fcf09ad" + ] + ] + }, + { + "id": "722c773f6314dd40", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "cron hour", + "props": [], + "repeat": "3600", + "crontab": "", + "once": true, + "onceDelay": "60", + "topic": "", + "x": 210, + "y": 2640, + "wires": [ + [ + "287d719de575c01f" + ] + ] + }, + { + "id": "caa3c5097468f133", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "a762a7a552cb9f03", + "name": "cron minute", + "props": [], + "repeat": "60", + "crontab": "", + "once": true, + "onceDelay": "60", + "topic": "", + "x": 210, + "y": 2580, + "wires": [ + [ + "004bb30c27c94fb4" + ] + ] + }, + { + "id": "d8b85eb94b57b81f", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "234feecbe12db6fa", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^(hermes|rhasspy)", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1470, + "y": 4500, + "wires": [ + [ + "d07502e0620ed3d9", + "4db395b3e8fa404f" + ] + ] + }, + { + "id": "4db395b3e8fa404f", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "234feecbe12db6fa", + "name": "mqtt rhasspy output", + "mode": "link", + "links": [ + "833f9ea0770f6e5a" + ], + "x": 1635, + "y": 4560, + "wires": [] + }, + { + "id": "4cfd419f66b58eda", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "234feecbe12db6fa", + "name": "mqtt rhasspy", + "links": [ + "10aafa2119bcdcac", + "2c561a436a935bc6" + ], + "x": 1335, + "y": 4500, + "wires": [ + [ + "d8b85eb94b57b81f" + ] + ] + }, + { + "id": "d07502e0620ed3d9", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "234feecbe12db6fa", + "name": "MQTT rhasspy", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "442ad702808e3c66", + "x": 1700, + "y": 4500, + "wires": [] + }, + { + "id": "da4da5b15f106b4a", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "MQTT rhasspy", + "topic": "hermes/intent/#", + "qos": "2", + "datatype": "json", + "broker": "442ad702808e3c66", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 4500, + "wires": [ + [ + "9518f42686aaf99c" + ] + ] + }, + { + "id": "6d6bcbb7ce10198f", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 4500, + "wires": [ + [ + "81b03b89f507e5ce" + ] + ] + }, + { + "id": "9518f42686aaf99c", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "50 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "50", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 4500, + "wires": [ + [ + "3eda424ef17379e9" + ] + ] + }, + { + "id": "af3082ef59725979", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "mqtt rhasspy gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 4560, + "wires": [ + [ + "3eda424ef17379e9" + ] + ] + }, + { + "id": "3eda424ef17379e9", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 4500, + "wires": [ + [ + "6d6bcbb7ce10198f" + ] + ] + }, + { + "id": "81b03b89f507e5ce", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "a23c2aa7e24eb8f7", + "name": "mqtt rhasspy", + "mode": "link", + "links": [], + "x": 1215, + "y": 4500, + "wires": [] + }, + { + "id": "a6b8c9c223ea5942", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "b5e2408a7d09537d", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^zwave", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 4260, + "wires": [ + [ + "92d0d0a5798c06cf", + "82908fcfdf7f599a" + ] + ] + }, + { + "id": "82908fcfdf7f599a", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "b5e2408a7d09537d", + "name": "mqtt zwave output", + "mode": "link", + "links": [ + "ca89a4baa1806e71", + "ab63acc660e32a18" + ], + "x": 1635, + "y": 4320, + "wires": [] + }, + { + "id": "62dd3e8d6c87a0f9", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "b5e2408a7d09537d", + "name": "mqtt zwave", + "links": [ + "a28b7b24c0ae9f8c", + "a02f78ffaedc9739", + "bccc33b4c0db9760", + "1c422d2c16125ca4", + "a06f150e72b873f2", + "eb69b7f3d6f894e3", + "f887adfd6fa075c2", + "2be05ddfe63b7313", + "648fbe7936a6e771", + "db4fcb97194bacd4", + "5ff9bf33eef6edea", + "4af3a6003798549f", + "a4f551d4cf84d1fe", + "9155daed44745330", + "9678ea31a895d9f4", + "433ea1c0deda2243", + "e96ba8b040e58218", + "41eb5aee9b16405c", + "2dfc7db2679a7eca", + "4f46e6e1244003c5", + "87b36faadc498428", + "b8e5f320e0d5e119", + "8a93f83ac805403e", + "f531075e0ccd5d1d", + "89d2eebcaafb5013", + "5f9d0ad90e63e256" + ], + "x": 1335, + "y": 4260, + "wires": [ + [ + "a6b8c9c223ea5942" + ] + ] + }, + { + "id": "92d0d0a5798c06cf", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "b5e2408a7d09537d", + "name": "MQTT zwave", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "0bd651126b27aac6", + "x": 1690, + "y": 4260, + "wires": [] + }, + { + "id": "247945a0f503ac90", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 4260, + "wires": [ + [ + "ebdbee7baef678a6" + ] + ] + }, + { + "id": "341bc94dee8e9f96", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "50 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "50", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 4260, + "wires": [ + [ + "3738b065c50a0cac" + ] + ] + }, + { + "id": "1d8f71c67df6cec9", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "mqtt zwave gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 4320, + "wires": [ + [ + "3738b065c50a0cac" + ] + ] + }, + { + "id": "3738b065c50a0cac", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 4260, + "wires": [ + [ + "247945a0f503ac90" + ] + ] + }, + { + "id": "ebdbee7baef678a6", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "mqtt zwave", + "mode": "link", + "links": [ + "0c42605d4e17f7c0", + "13d4b6546b6078c4", + "1674f27502adab2b", + "28bd5077f8af7155", + "3fa1505cc54c0a4a", + "6004623d39fd780d", + "60cdba59b6867a2c", + "882213638ae51376", + "8f1673c23cf67a9b", + "ae31619e220a07e2", + "b51e54b87cd8c281", + "db5ad7caf20f44e5", + "dbfdf715d2b6b0d5", + "f3685659add53893", + "21aa9d233920d3db", + "dcdb87d31c193475", + "dc42210872f30fd1", + "e21569bf7b9d08f6", + "51b478fd1f7bbfe9", + "da24d3cb7f933d8e", + "8a735409075bf432", + "9379fef014648636", + "4c78ee51560912b7", + "c634be35fddbb9e8", + "7a413720d3c10ba8", + "e2cf426558bd0b60", + "46f5b6984edcc88f", + "b4c41faf6220fb5d", + "dd07962707cadbc4", + "3be6b8c3d6485c46", + "ba77500cd9f7f6da", + "b7b008f170dcc07f" + ], + "x": 1215, + "y": 4260, + "wires": [] + }, + { + "id": "3eb59215b6fb19e2", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "1e687cd4c0cc0ece", + "name": "MQTT zwave", + "topic": "zwave/#", + "qos": "2", + "datatype": "auto-detect", + "broker": "0bd651126b27aac6", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 4260, + "wires": [ + [ + "341bc94dee8e9f96" + ] + ] + }, + { + "id": "1052950934d566bf", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "24eae452ebf32be6", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^ble", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 4020, + "wires": [ + [ + "d4252f4120129d32", + "a411175648a9f14e" + ] + ] + }, + { + "id": "a411175648a9f14e", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "24eae452ebf32be6", + "name": "mqtt bluetooth output", + "mode": "link", + "links": [ + "3ce812bf89416c2e", + "b5e020af24b6c81a" + ], + "x": 1635, + "y": 4080, + "wires": [] + }, + { + "id": "55db3023ac9ae3c1", + "type": "link in", + "z": "ab51b1e8cad7b700", + "d": true, + "g": "24eae452ebf32be6", + "name": "mqtt bluetooth", + "links": [], + "x": 1335, + "y": 4020, + "wires": [ + [ + "1052950934d566bf" + ] + ] + }, + { + "id": "d4252f4120129d32", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "24eae452ebf32be6", + "name": "MQTT bluetooth", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "ef0a4a5a649e056f", + "x": 1700, + "y": 4020, + "wires": [] + }, + { + "id": "e60cbfea876d91e7", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 4020, + "wires": [ + [ + "85c0a8032c692a9a" + ] + ] + }, + { + "id": "11a6de1c96795b4d", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "100 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "100", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 4020, + "wires": [ + [ + "c8d1b777a117ee56" + ] + ] + }, + { + "id": "be2acafce4c2c74d", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "mqtt bluetooth gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 4080, + "wires": [ + [ + "c8d1b777a117ee56" + ] + ] + }, + { + "id": "c8d1b777a117ee56", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 4020, + "wires": [ + [ + "e60cbfea876d91e7" + ] + ] + }, + { + "id": "85c0a8032c692a9a", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "mqtt bluetooth", + "mode": "link", + "links": [ + "60e7ca843ea8f2e0" + ], + "x": 1215, + "y": 4020, + "wires": [] + }, + { + "id": "c73c3b488741b764", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "cf382d5398b6de43", + "name": "MQTT bluetooth", + "topic": "ble/+/#", + "qos": "2", + "datatype": "auto-detect", + "broker": "ef0a4a5a649e056f", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 4020, + "wires": [ + [ + "11a6de1c96795b4d" + ] + ] + }, + { + "id": "7a6db5a28141b284", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "0bf16a20b9656c59", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^teleinfo", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 3780, + "wires": [ + [ + "b0b2d9829230be99", + "a7e18f888c96ad05" + ] + ] + }, + { + "id": "a7e18f888c96ad05", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "0bf16a20b9656c59", + "name": "mqtt teleinfo output", + "mode": "link", + "links": [], + "x": 1635, + "y": 3840, + "wires": [] + }, + { + "id": "5d53068f8b9e6936", + "type": "link in", + "z": "ab51b1e8cad7b700", + "d": true, + "g": "0bf16a20b9656c59", + "name": "mqtt teleinfo", + "links": [], + "x": 1335, + "y": 3780, + "wires": [ + [ + "7a6db5a28141b284" + ] + ] + }, + { + "id": "b0b2d9829230be99", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "0bf16a20b9656c59", + "name": "MQTT teleinfo", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "d6ba6007b1901314", + "x": 1700, + "y": 3780, + "wires": [] + }, + { + "id": "a34aeb4c51bcf655", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 3780, + "wires": [ + [ + "b491f7eb02575108" + ] + ] + }, + { + "id": "fa2acb5ac9bb8c8c", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "20 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "20", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 3780, + "wires": [ + [ + "ca7f0d58c55a1358" + ] + ] + }, + { + "id": "3423fd727184042c", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "mqtt teleinfo gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 3840, + "wires": [ + [ + "ca7f0d58c55a1358" + ] + ] + }, + { + "id": "ca7f0d58c55a1358", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 3780, + "wires": [ + [ + "a34aeb4c51bcf655" + ] + ] + }, + { + "id": "b491f7eb02575108", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "mqtt teleinfo", + "mode": "link", + "links": [ + "112f15815d373541", + "44a6b39d960c738d" + ], + "x": 1215, + "y": 3780, + "wires": [] + }, + { + "id": "c16f1ae420f44fb5", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "fee31a77e542b203", + "name": "MQTT teleinfo", + "topic": "teleinfo/#", + "qos": "2", + "datatype": "auto-detect", + "broker": "d6ba6007b1901314", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 3780, + "wires": [ + [ + "fa2acb5ac9bb8c8c" + ] + ] + }, + { + "id": "08f26275ef69e598", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "b40a3b0d2d310907", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^zigbee", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 3540, + "wires": [ + [ + "ac5c011465193c4e", + "3398dde44269eb08" + ] + ] + }, + { + "id": "3398dde44269eb08", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "b40a3b0d2d310907", + "name": "mqtt zigbee output", + "mode": "link", + "links": [ + "c4571e81ac381f3e", + "76a866f04ab291ef" + ], + "x": 1625, + "y": 3600, + "wires": [] + }, + { + "id": "6c324b24ca028984", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "b40a3b0d2d310907", + "name": "mqtt zigbee", + "links": [ + "89d2eebcaafb5013" + ], + "x": 1335, + "y": 3540, + "wires": [ + [ + "08f26275ef69e598" + ] + ] + }, + { + "id": "ac5c011465193c4e", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "b40a3b0d2d310907", + "name": "MQTT zigbee", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "8b2a4e4f622431e7", + "x": 1700, + "y": 3540, + "wires": [] + }, + { + "id": "57bd505da426547c", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "ignore \"bridge\" path", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^zigbee/bridge", + "vt": "str", + "case": false + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 790, + "y": 3540, + "wires": [ + [], + [ + "7b89e1d6b81feb1d" + ] + ] + }, + { + "id": "7b89e1d6b81feb1d", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 3540, + "wires": [ + [ + "a3594a90f69fe537" + ] + ] + }, + { + "id": "529f7e707934e514", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "50 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "50", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 3540, + "wires": [ + [ + "0c032c944567a64d" + ] + ] + }, + { + "id": "fb76731a2064ad65", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "mqtt zigbee gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 3600, + "wires": [ + [ + "0c032c944567a64d" + ] + ] + }, + { + "id": "0c032c944567a64d", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 3540, + "wires": [ + [ + "57bd505da426547c" + ] + ] + }, + { + "id": "a3594a90f69fe537", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "mqtt zigbee", + "mode": "link", + "links": [ + "85491b834d936a64", + "688beab146efae13", + "b07f193a0642cf53", + "a06c81c7dbe18d43", + "3be6b8c3d6485c46", + "ba77500cd9f7f6da" + ], + "x": 1215, + "y": 3540, + "wires": [] + }, + { + "id": "5d0abf7735e4d38c", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "518b634fa908a4aa", + "name": "MQTT zigbee", + "topic": "zigbee/#", + "qos": "2", + "datatype": "auto-detect", + "broker": "8b2a4e4f622431e7", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 3540, + "wires": [ + [ + "529f7e707934e514" + ] + ] + }, + { + "id": "a39cfa7867f1affb", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "ae4487a0bf7f922f", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^rfxcom2mqtt", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 3300, + "wires": [ + [ + "a4f8287c851b1796", + "f0991abcca9403bc" + ] + ] + }, + { + "id": "f0991abcca9403bc", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "ae4487a0bf7f922f", + "name": "mqtt rfxcom output", + "mode": "link", + "links": [ + "881b1ed942ae2f5d", + "e1bd888198e8ad2b", + "4c77acdbe9fb09c9" + ], + "x": 1635, + "y": 3360, + "wires": [] + }, + { + "id": "de0c34e8104574b0", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "ae4487a0bf7f922f", + "name": "mqtt rfxcom", + "links": [ + "89d2eebcaafb5013" + ], + "x": 1335, + "y": 3300, + "wires": [ + [ + "a39cfa7867f1affb" + ] + ] + }, + { + "id": "a4f8287c851b1796", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "ae4487a0bf7f922f", + "name": "MQTT rfxcom", + "topic": "", + "qos": "", + "retain": "", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "cdd708cca8782382", + "x": 1700, + "y": 3300, + "wires": [] + }, + { + "id": "03eacf7a446d906c", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 3300, + "wires": [ + [ + "ed6bcbd32e72afe1" + ] + ] + }, + { + "id": "014d8a5287538444", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "100 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "100", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 410, + "y": 3300, + "wires": [ + [ + "be945e0c2c2208b0" + ] + ] + }, + { + "id": "735774bdb56f6be4", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "mqtt rfxcom gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 455, + "y": 3360, + "wires": [ + [ + "be945e0c2c2208b0" + ] + ] + }, + { + "id": "be945e0c2c2208b0", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 3300, + "wires": [ + [ + "03eacf7a446d906c" + ] + ] + }, + { + "id": "ed6bcbd32e72afe1", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "mqtt rfxcom", + "mode": "link", + "links": [ + "2dba8c9110e069a7", + "35e7aab1f0314355", + "5d58266f86a39f1a", + "617755f6bb1e2972", + "6390818317da9a22", + "8a3a49343040e9dd", + "92c37a3c88284082", + "aeec616505632135", + "beb26a3a88ba29ec", + "c55d2fbe9a6e0312", + "ca854a261959d5e3", + "cd0b7dc3cdbb9e58", + "dac6324a7409b4c0", + "dfe710104e247c4c", + "e6048bb9f2a4ecee", + "3256d8e9e4075f1f", + "d53118042e7346dc", + "3be6b8c3d6485c46", + "ba77500cd9f7f6da", + "bd614b03c17a2dcd", + "0e9fc0eb536659f8" + ], + "x": 1215, + "y": 3300, + "wires": [] + }, + { + "id": "24a3e98a92c0d57d", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "3ab6bcaac666ddc4", + "name": "MQTT rfxcom", + "topic": "rfxcom2mqtt/devices/#", + "qos": "2", + "datatype": "auto-detect", + "broker": "cdd708cca8782382", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 190, + "y": 3300, + "wires": [ + [ + "014d8a5287538444" + ] + ] + }, + { + "id": "19a5c46ec6c71456", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "c706245ab487b7e2", + "name": "check topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^iotredloop", + "vt": "str", + "case": false + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1490, + "y": 3060, + "wires": [ + [ + "630dfeb0e033a476", + "0f1e413815ecc824" + ] + ] + }, + { + "id": "0f1e413815ecc824", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "c706245ab487b7e2", + "name": "mqtt nodered output", + "mode": "link", + "links": [ + "32f2b2da5065afde", + "e942462a899825f8" + ], + "x": 1635, + "y": 3120, + "wires": [] + }, + { + "id": "d40db95f9a154c3a", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "c706245ab487b7e2", + "name": "mqtt nodered", + "links": [ + "e080152994978357", + "c5465d5f64db4b45" + ], + "x": 1335, + "y": 3060, + "wires": [ + [ + "19a5c46ec6c71456" + ] + ] + }, + { + "id": "630dfeb0e033a476", + "type": "mqtt out", + "z": "ab51b1e8cad7b700", + "g": "c706245ab487b7e2", + "name": "MQTT nodered", + "topic": "", + "qos": "1", + "retain": "true", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "51fc92ba27d12eaa", + "x": 1700, + "y": 3060, + "wires": [] + }, + { + "id": "56d93c268a656fc4", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "ignore \"cible\" path", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "/cible/", + "vt": "str", + "case": false + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 790, + "y": 3060, + "wires": [ + [], + [ + "2cc2cdcf0b1f710e" + ] + ] + }, + { + "id": "2cc2cdcf0b1f710e", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "raz MQTT properties", + "rules": [ + { + "t": "delete", + "p": "qos", + "pt": "msg" + }, + { + "t": "delete", + "p": "retain", + "pt": "msg" + }, + { + "t": "set", + "p": "source", + "pt": "msg", + "to": "iotredloop", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 3060, + "wires": [ + [ + "e12bb3f8258f4439" + ] + ] + }, + { + "id": "b961d989c357e6d6", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "15 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "15", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 410, + "y": 3060, + "wires": [ + [ + "0a4c943dc3a06f0d" + ] + ] + }, + { + "id": "af148bf44b019b35", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "mqtt nodered gate", + "links": [ + "d68d686bbf684c95", + "8fdb5986494986cc" + ], + "x": 465, + "y": 3120, + "wires": [ + [ + "0a4c943dc3a06f0d" + ] + ] + }, + { + "id": "0a4c943dc3a06f0d", + "type": "q-gate", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "", + "controlTopic": "gate", + "defaultState": "queueing", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "queueCmd": "close", + "defaultCmd": "default", + "triggerCmd": "trigger", + "flushCmd": "open", + "resetCmd": "reset", + "peekCmd": "peek", + "dropCmd": "drop", + "statusCmd": "status", + "maxQueueLength": "0", + "keepNewest": false, + "qToggle": false, + "persist": false, + "storeName": "default", + "x": 590, + "y": 3060, + "wires": [ + [ + "56d93c268a656fc4" + ] + ] + }, + { + "id": "e12bb3f8258f4439", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "mqtt nodered", + "mode": "link", + "links": [ + "282314c3181caba2", + "f4fed668dbff1da4", + "206c1fb4a48067df" + ], + "x": 1215, + "y": 3060, + "wires": [] + }, + { + "id": "a19b9fbac3e9f89c", + "type": "mqtt in", + "z": "ab51b1e8cad7b700", + "g": "d1b208e623179a25", + "name": "MQTT nodered", + "topic": "iotredloop/#", + "qos": "2", + "datatype": "utf8", + "broker": "51fc92ba27d12eaa", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 200, + "y": 3060, + "wires": [ + [ + "b961d989c357e6d6" + ] + ] + }, + { + "id": "0aca727fc835e615", + "type": "Stackhero-InfluxDB-v2-write", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "server": "22dd0707e6d3a364", + "name": "influxdb", + "x": 2340, + "y": 2220, + "wires": [ + [] + ] + }, + { + "id": "afd6a49ad55de215", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "kernel - read file", + "mode": "link", + "links": [ + "7c98833082d48029" + ], + "x": 1295, + "y": 2460, + "wires": [] + }, + { + "id": "432e8063fae7039e", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "kernel - write to file", + "links": [ + "a69d70a155c21ef3" + ], + "x": 135, + "y": 2400, + "wires": [ + [ + "9d4a1f539c9bf58c" + ] + ] + }, + { + "id": "dfb4b5350a9383c9", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "kernel - read from file", + "links": [ + "8820bdb5b422a686" + ], + "x": 135, + "y": 2460, + "wires": [ + [ + "44308739c0f759ad" + ] + ] + }, + { + "id": "9d4a1f539c9bf58c", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "filename", + "rules": [ + { + "t": "set", + "p": "automate", + "pt": "msg", + "to": "about.automate", + "tot": "global" + }, + { + "t": "set", + "p": "filename", + "pt": "msg", + "to": "'/data/'&msg.automate&'_metrics.bk'", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "metrics", + "tot": "global" + }, + { + "t": "delete", + "p": "automate", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 280, + "y": 2400, + "wires": [ + [ + "b1e2b474e4c77892" + ] + ] + }, + { + "id": "43c695b9490f5104", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "delay 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 1150, + "y": 2460, + "wires": [ + [ + "afd6a49ad55de215" + ] + ] + }, + { + "id": "44308739c0f759ad", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "filename", + "rules": [ + { + "t": "set", + "p": "automate", + "pt": "msg", + "to": "about.automate", + "tot": "global" + }, + { + "t": "set", + "p": "filename", + "pt": "msg", + "to": "'/data/'&msg.automate&'_metrics.bk'", + "tot": "jsonata" + }, + { + "t": "delete", + "p": "automate", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 280, + "y": 2460, + "wires": [ + [ + "d3064571c2fde064" + ] + ] + }, + { + "id": "be0beee97ed2d572", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "kernel - read file", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 1160, + "y": 2400, + "wires": [] + }, + { + "id": "5205205461f48680", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "write file contents to global metrics", + "rules": [ + { + "t": "set", + "p": "metrics", + "pt": "global", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 880, + "y": 2460, + "wires": [ + [ + "be0beee97ed2d572", + "43c695b9490f5104" + ] + ] + }, + { + "id": "2356f963725e84c6", + "type": "json", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "", + "property": "payload", + "action": "", + "pretty": false, + "x": 630, + "y": 2460, + "wires": [ + [ + "5205205461f48680" + ] + ] + }, + { + "id": "d3064571c2fde064", + "type": "file in", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "read file", + "filename": "filename", + "filenameType": "msg", + "format": "utf8", + "chunk": false, + "sendError": false, + "encoding": "none", + "allProps": false, + "x": 460, + "y": 2460, + "wires": [ + [ + "2356f963725e84c6" + ] + ] + }, + { + "id": "ede79ed6b82aa804", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "kernel - write file", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 660, + "y": 2400, + "wires": [] + }, + { + "id": "b1e2b474e4c77892", + "type": "file", + "z": "ab51b1e8cad7b700", + "g": "bc29c56f900c8d36", + "name": "write file", + "filename": "filename", + "filenameType": "msg", + "appendNewline": true, + "createDir": false, + "overwriteFile": "true", + "encoding": "none", + "x": 460, + "y": 2400, + "wires": [ + [ + "ede79ed6b82aa804" + ] + ] + }, + { + "id": "faeff76a4321bee2", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "remove some buckets", + "property": "bucket", + "propertyType": "msg", + "rules": [ + { + "t": "neq", + "v": "agenda", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 320, + "y": 2220, + "wires": [ + [ + "27e3bd6cada7b554" + ] + ] + }, + { + "id": "4163673982458b27", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "kernel - wrtie to InfluxDB", + "mode": "link", + "links": [], + "x": 2295, + "y": 2280, + "wires": [] + }, + { + "id": "4280a1f889505f0c", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "kernel - write to InfluxDB", + "links": [ + "4264ed01f3943e2f" + ], + "x": 135, + "y": 2220, + "wires": [ + [ + "faeff76a4321bee2" + ] + ] + }, + { + "id": "27e3bd6cada7b554", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "remove some measurements", + "property": "measurement", + "propertyType": "msg", + "rules": [ + { + "t": "neq", + "v": "config", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 600, + "y": 2220, + "wires": [ + [ + "e287e4f4d7f3a174" + ] + ] + }, + { + "id": "7c75b6b921f30409", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "format boolean to dimmer", + "rules": [ + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "$number($boolean(msg.state))=0?0:99", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1310, + "y": 2160, + "wires": [ + [ + "58359ad51f36d68e", + "14a5f0183ce7ec8d" + ] + ] + }, + { + "id": "a98fde87c6b47e6e", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "select field", + "property": "field", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "pilot", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1770, + "y": 2160, + "wires": [ + [ + "5c4a3b8ce0220dd9" + ], + [] + ] + }, + { + "id": "61b310386916497a", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "kernel - write to influxdb", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 2390, + "y": 2160, + "wires": [] + }, + { + "id": "b43439c6ab36fbfc", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "delay 5 ms", + "pauseType": "delay", + "timeout": "5", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 2150, + "y": 2280, + "wires": [ + [ + "61b310386916497a", + "0aca727fc835e615", + "4163673982458b27" + ] + ] + }, + { + "id": "e287e4f4d7f3a174", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "payload to state", + "rules": [ + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 860, + "y": 2220, + "wires": [ + [ + "ec2704a8e18114ea" + ] + ] + }, + { + "id": "ec2704a8e18114ea", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "is boolean", + "property": "state", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "boolean", + "vt": "boolean" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1070, + "y": 2220, + "wires": [ + [ + "7c75b6b921f30409" + ], + [ + "58359ad51f36d68e", + "14a5f0183ce7ec8d" + ] + ] + }, + { + "id": "14a5f0183ce7ec8d", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "select measurements", + "property": "measurement", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^(mode|clock|lighting|jarvis|thermostat|heating|shading|cumulus|airflow|linky)$", + "vt": "str", + "case": false + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1580, + "y": 2220, + "wires": [ + [ + "a98fde87c6b47e6e" + ], + [ + "5c4a3b8ce0220dd9" + ] + ] + }, + { + "id": "5c4a3b8ce0220dd9", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "by room", + "rules": [ + { + "t": "set", + "p": "roomfield", + "pt": "msg", + "to": "msg.bucket&' '&msg.field", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\t 'bucket': 'resume',\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.roomfield : msg.state\t }\t }\t ]\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1960, + "y": 2220, + "wires": [ + [ + "b43439c6ab36fbfc" + ] + ] + }, + { + "id": "58359ad51f36d68e", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "3e71b89d61df9fd3", + "name": "by field", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\t 'bucket': msg.bucket,\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.field : msg.state\t }\t }\t ]\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1540, + "y": 2280, + "wires": [ + [ + "b43439c6ab36fbfc" + ] + ] + }, + { + "id": "c5465d5f64db4b45", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "6386e9a459469b53", + "name": "Kernel - write to MQTT", + "mode": "link", + "links": [ + "d40db95f9a154c3a" + ], + "x": 655, + "y": 2040, + "wires": [] + }, + { + "id": "1cbff7f3a7317c5b", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "6386e9a459469b53", + "name": "kernel - write to MQTT", + "links": [ + "4264ed01f3943e2f" + ], + "x": 135, + "y": 2040, + "wires": [ + [ + "b425ab40ef97a294" + ] + ] + }, + { + "id": "4176c5d5bc97709c", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "6386e9a459469b53", + "name": "delay 5 ms", + "pauseType": "delay", + "timeout": "5", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 510, + "y": 2040, + "wires": [ + [ + "1102208726a88a10", + "c5465d5f64db4b45" + ] + ] + }, + { + "id": "1102208726a88a10", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "6386e9a459469b53", + "name": "kernel - write to MQTT", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 740, + "y": 1980, + "wires": [] + }, + { + "id": "b425ab40ef97a294", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "6386e9a459469b53", + "name": "set MQTT topic", + "rules": [ + { + "t": "set", + "p": "automate", + "pt": "msg", + "to": "about.automate", + "tot": "global" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "msg.automate&\"/\"&msg.bucket&\"/\"&msg.measurement&\"/\"&msg.field", + "tot": "jsonata" + }, + { + "t": "delete", + "p": "automate", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 300, + "y": 2040, + "wires": [ + [ + "4176c5d5bc97709c" + ] + ] + }, + { + "id": "592483f2183c6711", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "kernel - write to journal", + "mode": "link", + "links": [], + "x": 535, + "y": 1680, + "wires": [] + }, + { + "id": "c5dc4f8c357a596f", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "kernel - write to journal", + "links": [ + "4264ed01f3943e2f" + ], + "x": 135, + "y": 1680, + "wires": [ + [ + "e4e85a27e4775ac9" + ] + ] + }, + { + "id": "074313bb4e48de6f", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "journal console only seen", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 930, + "y": 1800, + "wires": [] + }, + { + "id": "a441e9df790a0c3c", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "journal console only thermostat", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 950, + "y": 1740, + "wires": [] + }, + { + "id": "285c9ffa2f524440", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "journal console others", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 920, + "y": 1860, + "wires": [] + }, + { + "id": "234620fe148e1dca", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "journal console only linky and power", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 970, + "y": 1680, + "wires": [] + }, + { + "id": "5a49d1f4b12618a7", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "select measurement", + "property": "measurement", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "^(power|linky)$", + "vt": "str", + "case": false + }, + { + "t": "eq", + "v": "thermostat", + "vt": "str" + }, + { + "t": "eq", + "v": "seen", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 4, + "x": 620, + "y": 1740, + "wires": [ + [ + "234620fe148e1dca" + ], + [ + "a441e9df790a0c3c" + ], + [ + "074313bb4e48de6f" + ], + [ + "285c9ffa2f524440" + ] + ] + }, + { + "id": "e4e85a27e4775ac9", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "e9bd98a0b6e0d58c", + "name": "set human readable payload", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.bucket & ' > ' & msg.measurement & ' > ' & msg.field & ' = ' & $string(msg.payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 340, + "y": 1680, + "wires": [ + [ + "5a49d1f4b12618a7", + "592483f2183c6711" + ] + ] + }, + { + "id": "e6a4e861a99b196c", + "type": "function", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "set gate message", + "func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload': msg.payload\n};\n\nreturn newmsg;", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "\n", + "finalize": "\n", + "libs": [], + "x": 5030, + "y": 1380, + "wires": [ + [ + "c15d0c66ed5af79f" + ] + ] + }, + { + "id": "12f02c43a82b46f9", + "type": "gate", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "controlTopic": "gate", + "defaultState": "closed", + "openCmd": "open", + "closeCmd": "close", + "toggleCmd": "toggle", + "defaultCmd": "default", + "statusCmd": "status", + "persist": false, + "storeName": "default", + "x": 270, + "y": 1260, + "wires": [ + [ + "4689a4035be0c82e" + ] + ] + }, + { + "id": "68ad3074767eb2c3", + "type": "msg-speed", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "read msg speed", + "frequency": "sec", + "interval": 1, + "estimation": false, + "ignore": false, + "pauseAtStartup": false, + "topicDependent": false, + "x": 3820, + "y": 1380, + "wires": [ + [ + "c785aed10e83430a", + "fc88fb69cac1e5a5" + ], + [] + ] + }, + { + "id": "56d131373d4e2f78", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "links": [ + "7662aba4a1cc9dd0" + ], + "linkType": "static", + "timeout": "30", + "x": 1700, + "y": 1440, + "wires": [ + [ + "3743db17cb401840" + ] + ] + }, + { + "id": "3a4c72588bb27ab4", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "links": [ + "4f02d67d81a83e86" + ], + "linkType": "static", + "timeout": "30", + "x": 1450, + "y": 1380, + "wires": [ + [ + "3743db17cb401840" + ] + ] + }, + { + "id": "357c6d106dec5efd", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "links": [ + "bc396dcc308c42ee" + ], + "linkType": "static", + "timeout": "30", + "x": 1450, + "y": 1440, + "wires": [ + [ + "56d131373d4e2f78" + ] + ] + }, + { + "id": "8bbf418d277b4df7", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "links": [ + "e112327c4a55aa35" + ], + "linkType": "static", + "timeout": "30", + "x": 1450, + "y": 1500, + "wires": [ + [ + "56d131373d4e2f78" + ] + ] + }, + { + "id": "e2ef5706b35de7b0", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "", + "links": [ + "a72b20551a3b1f8c" + ], + "linkType": "static", + "timeout": "30", + "x": 1450, + "y": 1320, + "wires": [ + [ + "3743db17cb401840" + ] + ] + }, + { + "id": "c15d0c66ed5af79f", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric - rate", + "mode": "link", + "links": [ + "baaac9a301ef150a" + ], + "x": 5195, + "y": 1380, + "wires": [] + }, + { + "id": "4264ed01f3943e2f", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric - write", + "mode": "link", + "links": [ + "c5dc4f8c357a596f", + "1cbff7f3a7317c5b", + "4280a1f889505f0c" + ], + "x": 5195, + "y": 1320, + "wires": [] + }, + { + "id": "031a6afd8300356a", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric - loop", + "mode": "link", + "links": [ + "7d45ca7ad7f363fe", + "b6c03b0d5a9952c9", + "3ec4a86ec9ec37f6" + ], + "x": 5195, + "y": 1260, + "wires": [] + }, + { + "id": "206c1fb4a48067df", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric", + "links": [ + "8fdb5986494986cc", + "e12bb3f8258f4439", + "f02b4584af0d800c", + "06581753b7673f83", + "116de42631d4b17a", + "9a20f95447f8ddfd" + ], + "x": 135, + "y": 1260, + "wires": [ + [ + "12f02c43a82b46f9" + ] + ] + }, + { + "id": "d7f0ba2534f27b82", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "Si plus de 12 messages par seconde pendant 4 secondes alors bloque le kernel pendant 1 seconde", + "info": "", + "x": 4380, + "y": 1560, + "wires": [] + }, + { + "id": "ca80e5fe27609a11", + "type": "trigger", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "wait 4 s then true", + "op1": "", + "op2": "true", + "op1type": "nul", + "op2type": "bool", + "duration": "4", + "extend": false, + "overrideDelay": false, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 4570, + "y": 1440, + "wires": [ + [ + "0d78bebcc5541e02" + ] + ] + }, + { + "id": "6466ac9bacd083e2", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "reset", + "rules": [ + { + "t": "set", + "p": "reset", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 4370, + "y": 1500, + "wires": [ + [ + "ca80e5fe27609a11" + ] + ] + }, + { + "id": "4689a4035be0c82e", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "set source", + "rules": [ + { + "t": "set", + "p": "automate", + "pt": "msg", + "to": "about.automate", + "tot": "global" + }, + { + "t": "set", + "p": "source", + "pt": "msg", + "to": "msg.source=msg.automate?msg.source:\"loop\"", + "tot": "jsonata" + }, + { + "t": "delete", + "p": "automate", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 450, + "y": 1260, + "wires": [ + [ + "82229e46e51f94f5" + ] + ] + }, + { + "id": "895db12fd6d94a67", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "remove source", + "rules": [ + { + "t": "delete", + "p": "source", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 5040, + "y": 1260, + "wires": [ + [ + "031a6afd8300356a" + ] + ] + }, + { + "id": "82229e46e51f94f5", + "type": "function", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check metric", + "func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// try if msg.topic is a path\nif (typeof msg.topic === 'string' &&\n typeof msg.bucket === 'undefined' &&\n typeof msg.measurement === 'undefined' &&\n typeof msg.field === 'undefined'\n) {\n const device = msg.topic.split('/');\n if (typeof device[1] === 'string' &&\n typeof device[2] === 'string' &&\n typeof device[3] === 'string'\n ) {\n msg.source = device[0];\n msg.bucket = device[1];\n msg.measurement = device[2];\n msg.field = device[3];\n\n }\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'topic': 'metric',\n 'source': typeof msg.source === 'string' ? msg.source : 'unknow',\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.payload,\n 'repeat': typeof msg.repeat === 'boolean' ? msg.repeat : false\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.source + ' : ' + newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];", + "outputs": 2, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 650, + "y": 1260, + "wires": [ + [ + "7cd303d0aadd1433" + ], + [ + "a974cddec777bd94" + ] + ] + }, + { + "id": "fc88fb69cac1e5a5", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "limit 1 msg / s", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": true, + "allowrate": false, + "outputs": 1, + "x": 4080, + "y": 1380, + "wires": [ + [ + "e6a4e861a99b196c" + ] + ] + }, + { + "id": "0d78bebcc5541e02", + "type": "trigger", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "set gate payload", + "op1": "close", + "op2": "open", + "op1type": "str", + "op2type": "str", + "duration": "1", + "extend": true, + "overrideDelay": false, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 4800, + "y": 1440, + "wires": [ + [ + "e6a4e861a99b196c" + ] + ] + }, + { + "id": "3c3fe996c199516b", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "delay 50 ms", + "pauseType": "delay", + "timeout": "50", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 3070, + "y": 1440, + "wires": [ + [ + "b90652e7f7d28f66" + ] + ] + }, + { + "id": "c785aed10e83430a", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check speed limit of 12 msg/s", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "gt", + "v": "12", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 4130, + "y": 1440, + "wires": [ + [ + "ca80e5fe27609a11" + ], + [ + "6466ac9bacd083e2" + ] + ] + }, + { + "id": "9f055c7cccb634c1", + "type": "delay", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "limit 12 msg / s", + "pauseType": "rate", + "timeout": "250", + "timeoutUnits": "milliseconds", + "rate": "12", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 5040, + "y": 1320, + "wires": [ + [ + "4264ed01f3943e2f" + ] + ] + }, + { + "id": "b90652e7f7d28f66", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "compare timestamp", + "property": "#:(memoryOnly)::timestamps[msg.bucket][msg.measurement][msg.field]", + "propertyType": "flow", + "rules": [ + { + "t": "lt", + "v": "$millis() - 3600000", + "vt": "jsonata" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 3290, + "y": 1440, + "wires": [ + [ + "582f8e6b17a9d9d1" + ] + ] + }, + { + "id": "ae5e8ae05adac7fd", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check request repeat", + "property": "repeat", + "propertyType": "msg", + "rules": [ + { + "t": "true" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 2840, + "y": 1440, + "wires": [ + [ + "582f8e6b17a9d9d1" + ], + [ + "3c3fe996c199516b" + ] + ] + }, + { + "id": "0831bd7e7daa4915", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check mode automate", + "property": "metrics.systeme.mode.automate", + "propertyType": "global", + "rules": [ + { + "t": "neq", + "v": "off", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 2840, + "y": 1380, + "wires": [ + [ + "582f8e6b17a9d9d1" + ] + ] + }, + { + "id": "dd79805b7971cbbb", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "select \"cible\" measurment", + "property": "measurement", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "cible", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 2570, + "y": 1380, + "wires": [ + [ + "0831bd7e7daa4915" + ], + [ + "ae5e8ae05adac7fd" + ] + ] + }, + { + "id": "582f8e6b17a9d9d1", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "set metric to global metrics", + "rules": [ + { + "t": "set", + "p": "metrics[msg.bucket][msg.measurement][msg.field]", + "pt": "global", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "timestamps[msg.bucket][msg.measurement][msg.field]", + "pt": "flow", + "to": "$millis()", + "tot": "jsonata" + }, + { + "t": "delete", + "p": "repeat", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 3560, + "y": 1320, + "wires": [ + [ + "68ad3074767eb2c3", + "9f055c7cccb634c1" + ] + ] + }, + { + "id": "6473c46ecd9304c7", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check if value is different from global metric", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "neq", + "v": "metrics[msg.bucket][msg.measurement][msg.field]", + "vt": "global" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 2230, + "y": 1320, + "wires": [ + [ + "582f8e6b17a9d9d1" + ], + [ + "dd79805b7971cbbb" + ] + ] + }, + { + "id": "3743db17cb401840", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "select source", + "property": "source", + "propertyType": "msg", + "rules": [ + { + "t": "neq", + "v": "loop", + "vt": "str" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1930, + "y": 1260, + "wires": [ + [ + "895db12fd6d94a67" + ], + [ + "6473c46ecd9304c7" + ] + ] + }, + { + "id": "1e908b6060a584ea", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "select metric format", + "property": "devices[msg.bucket][msg.measurement][msg.field]format", + "propertyType": "global", + "rules": [ + { + "t": "eq", + "v": "text", + "vt": "str" + }, + { + "t": "eq", + "v": "boolean", + "vt": "str" + }, + { + "t": "eq", + "v": "dimmer", + "vt": "str" + }, + { + "t": "eq", + "v": "percent", + "vt": "str" + }, + { + "t": "eq", + "v": "number", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 5, + "x": 1210, + "y": 1320, + "wires": [ + [ + "3743db17cb401840" + ], + [ + "e2ef5706b35de7b0" + ], + [ + "3a4c72588bb27ab4" + ], + [ + "357c6d106dec5efd" + ], + [ + "8bbf418d277b4df7" + ] + ] + }, + { + "id": "eca0e6f3657f0564", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric undefined", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 1230, + "y": 1200, + "wires": [] + }, + { + "id": "7cd303d0aadd1433", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "kernel - metric uncomplete", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 900, + "y": 1200, + "wires": [] + }, + { + "id": "a974cddec777bd94", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "20b116b788ef3f27", + "name": "check if global devices has metric", + "property": "devices[msg.bucket][msg.measurement][msg.field]", + "propertyType": "global", + "rules": [ + { + "t": "null" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 920, + "y": 1260, + "wires": [ + [ + "eca0e6f3657f0564" + ], + [ + "1e908b6060a584ea" + ] + ] + }, + { + "id": "8fdb5986494986cc", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "kernel - gate", + "mode": "link", + "links": [ + "206c1fb4a48067df", + "af148bf44b019b35", + "735774bdb56f6be4", + "fb76731a2064ad65", + "3423fd727184042c", + "be2acafce4c2c74d", + "1d8f71c67df6cec9", + "af3082ef59725979" + ], + "x": 995, + "y": 1020, + "wires": [] + }, + { + "id": "baaac9a301ef150a", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "kernel - gate", + "links": [ + "94c79b8f52f0b6ba", + "c15d0c66ed5af79f", + "aa2c3406c988ef4b" + ], + "x": 135, + "y": 1020, + "wires": [ + [ + "149401230ed2ed4c" + ] + ] + }, + { + "id": "85ea82a3282907b1", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "kernel - gate", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 1050, + "y": 960, + "wires": [] + }, + { + "id": "19dc49123e66ac71", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "check gate payload", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "open|close", + "vt": "str", + "case": false + }, + { + "t": "eq", + "v": "freeze", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 530, + "y": 1020, + "wires": [ + [ + "85ea82a3282907b1", + "8fdb5986494986cc" + ], + [ + "1eea209368626bc1" + ] + ] + }, + { + "id": "1eea209368626bc1", + "type": "trigger", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "freeze gate for 10 secondes", + "op1": "close", + "op2": "open", + "op1type": "str", + "op2type": "str", + "duration": "10", + "extend": true, + "overrideDelay": false, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 800, + "y": 1080, + "wires": [ + [ + "85ea82a3282907b1", + "8fdb5986494986cc" + ] + ] + }, + { + "id": "149401230ed2ed4c", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "3711bd3352570a6c", + "name": "check gate topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "gate", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 300, + "y": 1020, + "wires": [ + [ + "19dc49123e66ac71" + ] + ] + }, + { + "id": "2ba23548e87b0292", + "type": "function", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "set gate message", + "func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload':'open'\n};\n\nreturn newmsg;", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "\n", + "finalize": "\n", + "libs": [], + "x": 1150, + "y": 780, + "wires": [ + [ + "2dedf503efee73c8", + "94c79b8f52f0b6ba" + ] + ] + }, + { + "id": "3cd44612df58e32f", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "launch devices configuration cycle", + "info": "", + "x": 620, + "y": 360, + "wires": [] + }, + { + "id": "8413c966166387ab", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "launch complete cycle", + "info": "", + "x": 580, + "y": 300, + "wires": [] + }, + { + "id": "92f76d0a8a4f1178", + "type": "comment", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "reset all global variables and launch complete cycle", + "info": "", + "x": 670, + "y": 240, + "wires": [] + }, + { + "id": "ee66fb38bde2fdf4", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "kernel - automate load", + "mode": "link", + "links": [ + "7c98833082d48029" + ], + "x": 375, + "y": 360, + "wires": [] + }, + { + "id": "cd2ac560f85327a9", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "automate load", + "props": [], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "x": 210, + "y": 360, + "wires": [ + [ + "ee66fb38bde2fdf4" + ] + ] + }, + { + "id": "94c79b8f52f0b6ba", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "kernel - device", + "mode": "link", + "links": [ + "baaac9a301ef150a", + "33f7a250a7341c43", + "290e5853a51cb170", + "06976c9133796ab8" + ], + "x": 1315, + "y": 780, + "wires": [] + }, + { + "id": "bfa594bf1f876c92", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "kernel - device", + "links": [ + "7f76434616f622dc", + "80459ca7317cce90", + "8d6827df412a4059" + ], + "x": 135, + "y": 780, + "wires": [ + [ + "fabb645e0d88c91c" + ] + ] + }, + { + "id": "2dedf503efee73c8", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "kernel - device", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 1380, + "y": 720, + "wires": [] + }, + { + "id": "e5f9a77af592fc78", + "type": "trigger", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "wait for all devices registration", + "op1": "", + "op2": "true", + "op1type": "nul", + "op2type": "bool", + "duration": "50", + "extend": true, + "overrideDelay": false, + "units": "ms", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 870, + "y": 780, + "wires": [ + [ + "2ba23548e87b0292" + ] + ] + }, + { + "id": "35c936be0ce55676", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "register device to global metrics", + "rules": [ + { + "t": "set", + "p": "metrics[msg.bucket][msg.measurement][msg.field]", + "pt": "global", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1230, + "y": 840, + "wires": [ + [] + ] + }, + { + "id": "c1d2a5b213c6568a", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "check if device exists in global metrics", + "property": "metrics[msg.bucket][msg.measurement][msg.field]", + "propertyType": "global", + "rules": [ + { + "t": "null" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 890, + "y": 840, + "wires": [ + [ + "35c936be0ce55676" + ] + ] + }, + { + "id": "6d65af0eaae695a3", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "kernel - device uncomplete", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 540, + "y": 720, + "wires": [] + }, + { + "id": "d3ac50a83c871cc8", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "register device to global devices", + "rules": [ + { + "t": "set", + "p": "devices[msg.bucket][msg.measurement][msg.field]", + "pt": "global", + "to": "{\t 'default':msg.payload,\t 'format':msg.format,\t 'protocol':msg.protocol,\t 'model':msg.model,\t 'option':msg.option,\t 'id':msg.id\t}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 550, + "y": 780, + "wires": [ + [ + "c1d2a5b213c6568a", + "e5f9a77af592fc78" + ] + ] + }, + { + "id": "fabb645e0d88c91c", + "type": "function", + "z": "ab51b1e8cad7b700", + "g": "bbf7bb18989048e1", + "name": "check device", + "func": "// Check and recreate clean message of device description\n// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// no message\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check possible var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined' ||\n typeof msg.format === 'undefined' ||\n typeof msg.default === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'format': msg.format,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.default,\n\n 'protocol': typeof msg.protocol === 'undefined' ? '' : msg.protocol,\n 'model': typeof msg.model === 'undefined' ? '' : msg.model,\n 'id': typeof msg.id === 'undefined' ? '' : msg.id,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];", + "outputs": 2, + "timeout": "", + "noerr": 0, + "initialize": "\n", + "finalize": "\n", + "libs": [], + "x": 290, + "y": 780, + "wires": [ + [ + "6d65af0eaae695a3" + ], + [ + "d3ac50a83c871cc8" + ] + ] + }, + { + "id": "e68b067b48b94ca2", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "kernel - automate start", + "mode": "link", + "links": [ + "92dac97dfb662f2d" + ], + "x": 375, + "y": 300, + "wires": [] + }, + { + "id": "acd42b52bd581740", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "kernel - automate reset", + "mode": "link", + "links": [ + "d74bb73a0966b4bd" + ], + "x": 375, + "y": 240, + "wires": [] + }, + { + "id": "d74bb73a0966b4bd", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "kernel - boot - reset", + "links": [ + "acd42b52bd581740" + ], + "x": 135, + "y": 480, + "wires": [ + [ + "f7b2d28d9c7d66ae" + ] + ] + }, + { + "id": "92dac97dfb662f2d", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "kernel - boot - start", + "links": [ + "e68b067b48b94ca2" + ], + "x": 135, + "y": 540, + "wires": [ + [ + "464bfd100a5740b8" + ] + ] + }, + { + "id": "b0f54ce6c23c6da6", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "define global timers", + "rules": [ + { + "t": "set", + "p": "timers", + "pt": "global", + "to": "{}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1670, + "y": 480, + "wires": [ + [ + "cb09b67a37901112" + ] + ] + }, + { + "id": "011c5e62deb510bb", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "check if global timers exists", + "property": "timers", + "propertyType": "global", + "rules": [ + { + "t": "null" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1400, + "y": 540, + "wires": [ + [ + "b0f54ce6c23c6da6" + ], + [ + "cb09b67a37901112" + ] + ] + }, + { + "id": "4bab6cfef1e2c932", + "type": "link call", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "", + "links": [ + "797eac89000183db" + ], + "linkType": "static", + "timeout": "30", + "x": 860, + "y": 540, + "wires": [ + [ + "3e652e3da2c711ec" + ] + ] + }, + { + "id": "df1059b56622c582", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "automate reset", + "props": [], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "x": 220, + "y": 240, + "wires": [ + [ + "acd42b52bd581740" + ] + ] + }, + { + "id": "7c98833082d48029", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "kernel - boot - load", + "links": [ + "ee66fb38bde2fdf4", + "afd6a49ad55de215", + "68a233d0b60bf782" + ], + "x": 135, + "y": 600, + "wires": [ + [ + "25445f5a9b787a0a" + ] + ] + }, + { + "id": "25445f5a9b787a0a", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "kernel - boot", + "mode": "link", + "links": [ + "eed8990163b1ca81", + "4e6003732b266fe2", + "4bec446170e0294c", + "ef0d3b8996ec469c" + ], + "x": 2075, + "y": 600, + "wires": [] + }, + { + "id": "cb09b67a37901112", + "type": "change", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "set boot time topic", "rules": [ { "t": "set", "p": "topic", "pt": "msg", - "to": "msg.prefix&'/'&msg.topic", - "tot": "jsonata" + "to": "boot", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "", + "tot": "date" } ], "action": "", @@ -7055,26 +6953,33 @@ "from": "", "to": "", "reg": false, - "x": 6700, - "y": 4920, + "x": 1910, + "y": 540, "wires": [ [ - "89d2eebcaafb5013" + "25445f5a9b787a0a" ] ] }, { - "id": "d318afa2a81e4ff9", + "id": "3e652e3da2c711ec", "type": "change", "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "set prefix", + "g": "cf7f82b8517f3250", + "name": "initialize global variables", "rules": [ { "t": "set", - "p": "prefix", - "pt": "msg", - "to": "'zwave/'&msg.id", + "p": "devices", + "pt": "global", + "to": "{}", + "tot": "jsonata" + }, + { + "t": "set", + "p": "protocols", + "pt": "global", + "to": "{}", "tot": "jsonata" } ], @@ -7083,26 +6988,26 @@ "from": "", "to": "", "reg": false, - "x": 6520, - "y": 4860, + "x": 1110, + "y": 540, "wires": [ [ - "b2ccb6a2a248015d" + "011c5e62deb510bb" ] ] }, { - "id": "9262e99e20e0e654", + "id": "f7b2d28d9c7d66ae", "type": "change", "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "set prefix", + "g": "cf7f82b8517f3250", + "name": "define global metrics", "rules": [ { "t": "set", - "p": "prefix", - "pt": "msg", - "to": "'zigbee/'&msg.id", + "p": "metrics", + "pt": "global", + "to": "{}", "tot": "jsonata" } ], @@ -7111,26 +7016,110 @@ "from": "", "to": "", "reg": false, - "x": 6520, - "y": 4920, + "x": 620, + "y": 480, "wires": [ [ - "b2ccb6a2a248015d" + "4bab6cfef1e2c932" ] ] }, { - "id": "69041daa92bc0a8b", + "id": "464bfd100a5740b8", + "type": "switch", + "z": "ab51b1e8cad7b700", + "g": "cf7f82b8517f3250", + "name": "check if global metrics exists", + "property": "metrics", + "propertyType": "global", + "rules": [ + { + "t": "null" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 340, + "y": 540, + "wires": [ + [ + "f7b2d28d9c7d66ae" + ], + [ + "4bab6cfef1e2c932" + ] + ] + }, + { + "id": "324b4e5e9a9419cc", + "type": "inject", + "z": "ab51b1e8cad7b700", + "g": "9ea365cc69a1f2bf", + "name": "automate start", + "props": [], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "x": 220, + "y": 300, + "wires": [ + [ + "e68b067b48b94ca2" + ] + ] + }, + { + "id": "eebbf361272ea85b", + "type": "debug", + "z": "ab51b1e8cad7b700", + "g": "648d078d534a93be", + "name": "kernel - catch error", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 830, + "y": 60, + "wires": [] + }, + { + "id": "d248a5e5ab11c9d7", + "type": "catch", + "z": "ab51b1e8cad7b700", + "g": "648d078d534a93be", + "name": "catch error", + "scope": null, + "uncaught": false, + "x": 620, + "y": 60, + "wires": [ + [ + "eebbf361272ea85b" + ] + ] + }, + { + "id": "d9b8f97fb0897586", "type": "change", "z": "ab51b1e8cad7b700", - "g": "d9548e9b1a2e6f36", - "name": "set prefix", + "g": "818a8590288d6409", + "name": "about", "rules": [ { "t": "set", - "p": "prefix", - "pt": "msg", - "to": "'rfxcom2mqtt/devices/'&msg.id", + "p": "about", + "pt": "global", + "to": "{\t 'automate':'iotredloop',\t 'version':'0.0.1',\t 'author':'Jean-Christian Paul Denis',\t 'lang':'fr'\t}", "tot": "jsonata" } ], @@ -7139,11 +7128,38 @@ "from": "", "to": "", "reg": false, - "x": 6520, - "y": 4980, + "x": 270, + "y": 60, "wires": [ [ - "b2ccb6a2a248015d" + "d49116054bd5cd56" + ] + ] + }, + { + "id": "d49116054bd5cd56", + "type": "link out", + "z": "ab51b1e8cad7b700", + "g": "818a8590288d6409", + "name": "kernel - about", + "mode": "return", + "links": [], + "x": 395, + "y": 60, + "wires": [] + }, + { + "id": "797eac89000183db", + "type": "link in", + "z": "ab51b1e8cad7b700", + "g": "818a8590288d6409", + "name": "kernel - about", + "links": [], + "x": 135, + "y": 60, + "wires": [ + [ + "d9b8f97fb0897586" ] ] } diff --git a/flows/R.Config.json b/flows/R.Config.json new file mode 100644 index 0000000..99b66cc --- /dev/null +++ b/flows/R.Config.json @@ -0,0 +1,1456 @@ +[ + { + "id": "c2bfa0fea66ef080", + "type": "tab", + "label": "R.Config", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "2af6505c256f006d", + "type": "group", + "z": "c2bfa0fea66ef080", + "name": "config - bucket", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true, + "stroke": "#ffC000" + }, + "nodes": [ + "68823f1adeca7d61", + "4bec446170e0294c", + "065cece9562e787b" + ], + "x": 94, + "y": 19, + "w": 342, + "h": 82 + }, + { + "id": "507cfaf8503b2019", + "type": "group", + "z": "c2bfa0fea66ef080", + "name": "config - catch", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "0c2ac00fd2259ffd", + "0e565e95e63c3654" + ], + "x": 534, + "y": 19, + "w": 432, + "h": 82 + }, + { + "id": "a0476b1a7ec53d40", + "type": "group", + "z": "c2bfa0fea66ef080", + "name": "config - ui - style", + "style": { + "fill": "#6f2fa0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "6c9ecc5fe46a02a5", + "1c80c2edc1e21840" + ], + "x": 94, + "y": 199, + "w": 252, + "h": 82 + }, + { + "id": "dad2ac027d4f9f24", + "type": "group", + "z": "c2bfa0fea66ef080", + "name": "config - ui - danger", + "style": { + "fill": "#6f2fa0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "68a233d0b60bf782", + "8c2ef16fb2ddd993", + "1ceb6708c71a814b", + "aa2c3406c988ef4b", + "b0da73a9ef6b358d", + "8820bdb5b422a686", + "90eddf07569aadc0", + "5b6c97eb42f7b833", + "2302782a6ca41102", + "a69d70a155c21ef3" + ], + "x": 94, + "y": 319, + "w": 362, + "h": 382 + }, + { + "id": "dd003c121420d45a", + "type": "group", + "z": "c2bfa0fea66ef080", + "name": "config - ui - delete metric", + "style": { + "fill": "#6f2fa0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "417badba7b8593d3", + "cfd1c312affb0a45", + "aaba9cf674e8cfe0", + "4eb13f33c92436a9", + "a103f8cc78fc5ad7", + "61464b0778183fdb", + "9cd19202a5858a27", + "9401ba1506c0d201", + "f59d0b8138fa7525", + "43b5266fef6d73b9", + "55366488e4c7e9c3", + "649a5ab3d32438c5", + "5c6b98d2f2d16291", + "e9341386035b1f2c", + "d274c198b7d6186e", + "41f5791b1f5773f4", + "d5741bb4d825808f", + "608c1dd85cfe7947", + "385e81d9be142966", + "3737a5a641de4ed0", + "acda966a000b4e22", + "d4e3490de6550eea", + "b15ee9861786845f", + "eeff7c0a47ecf9ee", + "5a86c32a699d6a2e", + "1ff5fd68e1799ae5", + "2a90b9bd2e0a777c", + "7a76fc8d520b5b9e", + "772791bd8b527740", + "34f9df4fdd3bd8df" + ], + "x": 94, + "y": 739, + "w": 1252, + "h": 322 + }, + { + "id": "68823f1adeca7d61", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "2af6505c256f006d", + "name": "bucket", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "config", + "tot": "str" + }, + { + "t": "set", + "p": "bucket", + "pt": "flow", + "to": "bucket", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 60, + "wires": [ + [ + "065cece9562e787b" + ] + ] + }, + { + "id": "4bec446170e0294c", + "type": "link in", + "z": "c2bfa0fea66ef080", + "g": "2af6505c256f006d", + "name": "config - bucket", + "links": [ + "25445f5a9b787a0a" + ], + "x": 135, + "y": 60, + "wires": [ + [ + "68823f1adeca7d61" + ] + ] + }, + { + "id": "065cece9562e787b", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "2af6505c256f006d", + "name": "config - bucket", + "mode": "link", + "links": [ + "34f9df4fdd3bd8df" + ], + "x": 395, + "y": 60, + "wires": [] + }, + { + "id": "0c2ac00fd2259ffd", + "type": "catch", + "z": "c2bfa0fea66ef080", + "g": "507cfaf8503b2019", + "name": "catch error", + "scope": null, + "uncaught": false, + "x": 620, + "y": 60, + "wires": [ + [ + "0e565e95e63c3654" + ] + ] + }, + { + "id": "0e565e95e63c3654", + "type": "debug", + "z": "c2bfa0fea66ef080", + "g": "507cfaf8503b2019", + "name": "config - catch error", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 830, + "y": 60, + "wires": [] + }, + { + "id": "6c9ecc5fe46a02a5", + "type": "ui-template", + "z": "c2bfa0fea66ef080", + "g": "a0476b1a7ec53d40", + "group": "", + "page": "", + "ui": "2d75e4809d2a6fbf", + "name": "", + "order": 0, + "width": 0, + "height": 0, + "head": "", + "format": ".v-card .remove,\n.v-card-text .remove {\n display: none !important;\n visibility: hidden;\n color: transparent !important;\n}\n\n.nrdb-ui-text:hover {\n border-bottom: thin solid #CCCCCC;\n color: #666666 !important;\n}\n", + "storeOutMessages": true, + "passthru": true, + "resendOnRefresh": true, + "templateScope": "site:style", + "className": "", + "x": 260, + "y": 240, + "wires": [ + [] + ] + }, + { + "id": "1c80c2edc1e21840", + "type": "link in", + "z": "c2bfa0fea66ef080", + "g": "a0476b1a7ec53d40", + "name": "config - ui - style", + "links": [], + "x": 135, + "y": 240, + "wires": [ + [ + "6c9ecc5fe46a02a5" + ] + ] + }, + { + "id": "68a233d0b60bf782", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "name": "config - ui - kernel load", + "mode": "link", + "links": [ + "7c98833082d48029" + ], + "x": 415, + "y": 360, + "wires": [] + }, + { + "id": "8c2ef16fb2ddd993", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "reload devices definitions", + "label": "Recharger les définitions d'équipements", + "order": 1, + "width": "6", + "height": "1", + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 230, + "y": 360, + "wires": [ + [ + "68a233d0b60bf782" + ] + ] + }, + { + "id": "1ceb6708c71a814b", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "freeze kernel", + "label": "Congeler le noyau", + "order": 3, + "width": "6", + "height": "1", + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "freeze", + "payloadType": "str", + "topic": "gate", + "topicType": "str", + "x": 190, + "y": 540, + "wires": [ + [ + "aa2c3406c988ef4b" + ] + ] + }, + { + "id": "aa2c3406c988ef4b", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "name": "config - ui - kernel gate", + "mode": "link", + "links": [ + "baaac9a301ef150a" + ], + "x": 415, + "y": 540, + "wires": [] + }, + { + "id": "b0da73a9ef6b358d", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "load context file", + "label": "Recharger le fichier de context", + "order": 2, + "width": "6", + "height": "1", + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 200, + "y": 420, + "wires": [ + [ + "8820bdb5b422a686" + ] + ] + }, + { + "id": "8820bdb5b422a686", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "name": "config -ui - kernel read file", + "mode": "link", + "links": [ + "dfb4b5350a9383c9" + ], + "x": 415, + "y": 420, + "wires": [] + }, + { + "id": "90eddf07569aadc0", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "close kernel", + "label": "Fermer le noyau", + "order": 4, + "width": "6", + "height": "1", + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "close", + "payloadType": "str", + "topic": "gate", + "topicType": "str", + "x": 190, + "y": 600, + "wires": [ + [ + "aa2c3406c988ef4b" + ] + ] + }, + { + "id": "5b6c97eb42f7b833", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "open kernel", + "label": "Ouvrir le noyau", + "order": 5, + "width": "6", + "height": "1", + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "open", + "payloadType": "str", + "topic": "gate", + "topicType": "str", + "x": 190, + "y": 660, + "wires": [ + [ + "aa2c3406c988ef4b" + ] + ] + }, + { + "id": "417badba7b8593d3", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "group": "88a7ce8d8fd7e72b", + "name": "reload", + "label": "Recharger", + "order": 1, + "width": "6", + "height": "1", + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 1210, + "y": 780, + "wires": [ + [ + "e9341386035b1f2c" + ] + ] + }, + { + "id": "cfd1c312affb0a45", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "metrics", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "metrics", + "tot": "global" + }, + { + "t": "set", + "p": "data.buckets", + "pt": "flow", + "to": "[]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 840, + "wires": [ + [ + "aaba9cf674e8cfe0" + ] + ] + }, + { + "id": "aaba9cf674e8cfe0", + "type": "split", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "bucket", + "x": 550, + "y": 840, + "wires": [ + [ + "4eb13f33c92436a9" + ] + ] + }, + { + "id": "4eb13f33c92436a9", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "add", + "rules": [ + { + "t": "set", + "p": "data.buckets[msg.parts.index]", + "pt": "flow", + "to": "{\"label\":msg.bucket, \"value\":msg.bucket}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 710, + "y": 840, + "wires": [ + [ + "a103f8cc78fc5ad7" + ] + ] + }, + { + "id": "a103f8cc78fc5ad7", + "type": "join", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "mode": "auto", + "build": "string", + "property": "payload", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 870, + "y": 840, + "wires": [ + [ + "9cd19202a5858a27" + ] + ] + }, + { + "id": "61464b0778183fdb", + "type": "ui-dropdown", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "group": "88a7ce8d8fd7e72b", + "name": "buckets", + "label": "Bucket", + "tooltip": "", + "order": 2, + "width": "6", + "height": "1", + "passthru": false, + "multiple": false, + "options": [], + "payload": "", + "topic": "topic", + "topicType": "msg", + "className": "", + "x": 1220, + "y": 840, + "wires": [ + [ + "d4e3490de6550eea" + ] + ] + }, + { + "id": "9cd19202a5858a27", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "options", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "options", + "pt": "msg", + "to": "data.buckets", + "tot": "flow" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 840, + "wires": [ + [ + "61464b0778183fdb" + ] + ] + }, + { + "id": "9401ba1506c0d201", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "metrics", + "rules": [ + { + "t": "set", + "p": "delete.bucket", + "pt": "flow", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "topic[msg.payload]", + "tot": "msg" + }, + { + "t": "set", + "p": "data.measurements", + "pt": "flow", + "to": "[]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 900, + "wires": [ + [ + "f59d0b8138fa7525" + ] + ] + }, + { + "id": "f59d0b8138fa7525", + "type": "split", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "measurement", + "x": 550, + "y": 900, + "wires": [ + [ + "43b5266fef6d73b9" + ] + ] + }, + { + "id": "43b5266fef6d73b9", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "add", + "rules": [ + { + "t": "set", + "p": "data.measurements[msg.parts.index]", + "pt": "flow", + "to": "{\"label\":msg.measurement, \"value\":msg.measurement}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 710, + "y": 900, + "wires": [ + [ + "55366488e4c7e9c3" + ] + ] + }, + { + "id": "55366488e4c7e9c3", + "type": "join", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "mode": "auto", + "build": "string", + "property": "payload", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 870, + "y": 900, + "wires": [ + [ + "5c6b98d2f2d16291" + ] + ] + }, + { + "id": "649a5ab3d32438c5", + "type": "ui-dropdown", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "group": "88a7ce8d8fd7e72b", + "name": "measurements", + "label": "Measurement", + "tooltip": "", + "order": 3, + "width": "6", + "height": "1", + "passthru": false, + "multiple": false, + "options": [], + "payload": "", + "topic": "topic", + "topicType": "msg", + "className": "", + "x": 1240, + "y": 900, + "wires": [ + [ + "b15ee9861786845f" + ] + ] + }, + { + "id": "5c6b98d2f2d16291", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "options", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "options", + "pt": "msg", + "to": "data.measurements", + "tot": "flow" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 900, + "wires": [ + [ + "649a5ab3d32438c5" + ] + ] + }, + { + "id": "e9341386035b1f2c", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "raz", + "rules": [ + { + "t": "set", + "p": "options", + "pt": "msg", + "to": "['-','-']", + "tot": "jsonata" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "remove", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "", + "tot": "str" + }, + { + "t": "delete", + "p": "bucket", + "pt": "msg" + }, + { + "t": "delete", + "p": "measurement", + "pt": "msg" + }, + { + "t": "delete", + "p": "field", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1050, + "y": 780, + "wires": [ + [ + "61464b0778183fdb", + "649a5ab3d32438c5", + "385e81d9be142966", + "eeff7c0a47ecf9ee", + "acda966a000b4e22" + ] + ] + }, + { + "id": "d274c198b7d6186e", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "metrics", + "rules": [ + { + "t": "set", + "p": "delete.measurement", + "pt": "flow", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "topic[msg.payload]", + "tot": "msg" + }, + { + "t": "set", + "p": "data.fields", + "pt": "flow", + "to": "[]", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 960, + "wires": [ + [ + "41f5791b1f5773f4" + ] + ] + }, + { + "id": "41f5791b1f5773f4", + "type": "split", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "field", + "x": 550, + "y": 960, + "wires": [ + [ + "d5741bb4d825808f" + ] + ] + }, + { + "id": "d5741bb4d825808f", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "add", + "rules": [ + { + "t": "set", + "p": "data.fields[msg.parts.index]", + "pt": "flow", + "to": "{\"label\":msg.field, \"value\":msg.field}", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 710, + "y": 960, + "wires": [ + [ + "608c1dd85cfe7947" + ] + ] + }, + { + "id": "608c1dd85cfe7947", + "type": "join", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "", + "mode": "auto", + "build": "string", + "property": "payload", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 870, + "y": 960, + "wires": [ + [ + "3737a5a641de4ed0" + ] + ] + }, + { + "id": "385e81d9be142966", + "type": "ui-dropdown", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "group": "88a7ce8d8fd7e72b", + "name": "fields", + "label": "Field", + "tooltip": "", + "order": 4, + "width": "6", + "height": "1", + "passthru": false, + "multiple": false, + "options": [], + "payload": "", + "topic": "topic", + "topicType": "msg", + "className": "", + "x": 1210, + "y": 960, + "wires": [ + [ + "5a86c32a699d6a2e" + ] + ] + }, + { + "id": "3737a5a641de4ed0", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "options", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "options", + "pt": "msg", + "to": "data.fields", + "tot": "flow" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1040, + "y": 960, + "wires": [ + [ + "385e81d9be142966" + ] + ] + }, + { + "id": "acda966a000b4e22", + "type": "delay", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "wait 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 190, + "y": 840, + "wires": [ + [ + "cfd1c312affb0a45" + ] + ] + }, + { + "id": "d4e3490de6550eea", + "type": "delay", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "wait 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 190, + "y": 900, + "wires": [ + [ + "9401ba1506c0d201" + ] + ] + }, + { + "id": "b15ee9861786845f", + "type": "delay", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "wait 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 190, + "y": 960, + "wires": [ + [ + "d274c198b7d6186e" + ] + ] + }, + { + "id": "eeff7c0a47ecf9ee", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "group": "88a7ce8d8fd7e72b", + "name": "delete", + "label": "Effacer", + "order": 5, + "width": "6", + "height": "1", + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 550, + "y": 1020, + "wires": [ + [ + "2a90b9bd2e0a777c" + ] + ] + }, + { + "id": "5a86c32a699d6a2e", + "type": "delay", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "wait 100 ms", + "pauseType": "delay", + "timeout": "100", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 190, + "y": 1020, + "wires": [ + [ + "772791bd8b527740" + ] + ] + }, + { + "id": "1ff5fd68e1799ae5", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "config ui - delete metric notification", + "mode": "link", + "links": [ + "32eb12f106b8c786", + "34f9df4fdd3bd8df" + ], + "x": 1015, + "y": 1020, + "wires": [] + }, + { + "id": "2a90b9bd2e0a777c", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "global", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "delete.bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "delete.measurement", + "tot": "flow" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "delete.field", + "tot": "flow" + }, + { + "t": "delete", + "p": "stack[msg.bucket][msg.measurement][msg.field]", + "pt": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Variable effacée", + "tot": "str" + }, + { + "t": "delete", + "p": "options", + "pt": "msg" + }, + { + "t": "delete", + "p": "topic", + "pt": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 710, + "y": 1020, + "wires": [ + [ + "7a76fc8d520b5b9e" + ] + ] + }, + { + "id": "7a76fc8d520b5b9e", + "type": "delay", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "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": 880, + "y": 1020, + "wires": [ + [ + "1ff5fd68e1799ae5" + ] + ] + }, + { + "id": "772791bd8b527740", + "type": "change", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "metrics", + "rules": [ + { + "t": "set", + "p": "delete.field", + "pt": "flow", + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "class", + "pt": "msg", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 1020, + "wires": [ + [ + "eeff7c0a47ecf9ee" + ] + ] + }, + { + "id": "34f9df4fdd3bd8df", + "type": "link in", + "z": "c2bfa0fea66ef080", + "g": "dd003c121420d45a", + "name": "config - ui - delete metric", + "links": [ + "065cece9562e787b", + "1ff5fd68e1799ae5" + ], + "x": 915, + "y": 780, + "wires": [ + [ + "e9341386035b1f2c" + ] + ] + }, + { + "id": "2302782a6ca41102", + "type": "ui-button", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "group": "018c8ded1126b49a", + "name": "write context file", + "label": "Sauvegarder le fichier de context", + "order": 2, + "width": "6", + "height": "1", + "emulateClick": false, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 200, + "y": 480, + "wires": [ + [ + "a69d70a155c21ef3" + ] + ] + }, + { + "id": "a69d70a155c21ef3", + "type": "link out", + "z": "c2bfa0fea66ef080", + "g": "dad2ac027d4f9f24", + "name": "config -ui - kernel write file", + "mode": "link", + "links": [ + "432e8063fae7039e" + ], + "x": 415, + "y": 480, + "wires": [] + } +] \ No newline at end of file diff --git a/flows/R.Home.json b/flows/R.Home.json new file mode 100644 index 0000000..e10b2e0 --- /dev/null +++ b/flows/R.Home.json @@ -0,0 +1,240 @@ +[ + { + "id": "e19f53e3dc7ab928", + "type": "tab", + "label": "R.Home", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "e6f586ce062979fb", + "type": "group", + "z": "e19f53e3dc7ab928", + "name": "home - bucket", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true, + "stroke": "#ffC000" + }, + "nodes": [ + "d210ac6cc3e866c0", + "ef0d3b8996ec469c", + "fb0afb89fb191395" + ], + "x": 94, + "y": 19, + "w": 342, + "h": 82 + }, + { + "id": "2b5e040737ce3d94", + "type": "group", + "z": "e19f53e3dc7ab928", + "name": "home - catch", + "style": { + "fill": "#ff0000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "e32bfa4021bdd7a5", + "8a4cad272a925665" + ], + "x": 534, + "y": 19, + "w": 432, + "h": 82 + }, + { + "id": "c76679b82b664526", + "type": "group", + "z": "e19f53e3dc7ab928", + "name": "home - ui - notification", + "style": { + "fill": "#6f2fa0", + "fill-opacity": "0.05", + "label": true, + "stroke": "#6f2fa0" + }, + "nodes": [ + "d1f40d903ba49ae7", + "c32288ec6571a37f", + "32eb12f106b8c786" + ], + "x": 1054, + "y": 19, + "w": 492, + "h": 82 + }, + { + "id": "d210ac6cc3e866c0", + "type": "change", + "z": "e19f53e3dc7ab928", + "g": "e6f586ce062979fb", + "name": "bucket", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "home", + "tot": "str" + }, + { + "t": "set", + "p": "bucket", + "pt": "flow", + "to": "bucket", + "tot": "msg" + }, + { + "t": "set", + "p": "telegram_message", + "pt": "flow", + "to": "", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 60, + "wires": [ + [ + "fb0afb89fb191395" + ] + ] + }, + { + "id": "ef0d3b8996ec469c", + "type": "link in", + "z": "e19f53e3dc7ab928", + "g": "e6f586ce062979fb", + "name": "home - bucket", + "links": [ + "25445f5a9b787a0a" + ], + "x": 135, + "y": 60, + "wires": [ + [ + "d210ac6cc3e866c0" + ] + ] + }, + { + "id": "fb0afb89fb191395", + "type": "link out", + "z": "e19f53e3dc7ab928", + "g": "e6f586ce062979fb", + "name": "home - bucket", + "mode": "link", + "links": [], + "x": 395, + "y": 60, + "wires": [] + }, + { + "id": "e32bfa4021bdd7a5", + "type": "catch", + "z": "e19f53e3dc7ab928", + "g": "2b5e040737ce3d94", + "name": "catch error", + "scope": null, + "uncaught": false, + "x": 620, + "y": 60, + "wires": [ + [ + "8a4cad272a925665" + ] + ] + }, + { + "id": "8a4cad272a925665", + "type": "debug", + "z": "e19f53e3dc7ab928", + "g": "2b5e040737ce3d94", + "name": "home - catch error", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 830, + "y": 60, + "wires": [] + }, + { + "id": "d1f40d903ba49ae7", + "type": "ui-notification", + "z": "e19f53e3dc7ab928", + "g": "c76679b82b664526", + "ui": "2d75e4809d2a6fbf", + "position": "center center", + "colorDefault": true, + "color": "#000000", + "displayTime": "2", + "showCountdown": true, + "outputs": 0, + "allowDismiss": true, + "dismissText": "Close", + "raw": false, + "className": "", + "name": "", + "x": 1430, + "y": 60, + "wires": [] + }, + { + "id": "c32288ec6571a37f", + "type": "switch", + "z": "e19f53e3dc7ab928", + "g": "c76679b82b664526", + "name": "!empty", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "istype", + "v": "string", + "vt": "string" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1230, + "y": 60, + "wires": [ + [ + "d1f40d903ba49ae7" + ] + ] + }, + { + "id": "32eb12f106b8c786", + "type": "link in", + "z": "e19f53e3dc7ab928", + "g": "c76679b82b664526", + "name": "home - ui - notification", + "links": [ + "1ff5fd68e1799ae5" + ], + "x": 1095, + "y": 60, + "wires": [ + [ + "c32288ec6571a37f" + ] + ] + } +] \ No newline at end of file diff --git a/package.json b/package.json index 49a2941..462a896 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "node-red-contrib-msg-speed": "2.1.0", "node-red-contrib-queue-gate": "1.5.5", "node-red-contrib-simple-gate": "0.5.2", - "node-red-contrib-stackhero-influxdb-v2": "1.0.4" + "node-red-contrib-stackhero-influxdb-v2": "1.0.4", + "@flowfuse/node-red-dashboard": "1.8.1" }, "node-red": { "settings": {