iotredloop/flows/Kernel.json

7150 lines
137 KiB
JSON
Raw Normal View History

[
{
"id": "ab51b1e8cad7b700",
"type": "tab",
"label": "Kernel",
"disabled": false,
"info": "",
"env": []
},
{
"id": "818a8590288d6409",
"type": "group",
"z": "ab51b1e8cad7b700",
"name": "kernel - about",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"797eac89000183db",
"d49116054bd5cd56",
"d9b8f97fb0897586"
],
"x": 94,
"y": 19,
"w": 342,
"h": 82
},
{
"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": "cf7f82b8517f3250",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kernel - boot",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"464bfd100a5740b8",
"f7b2d28d9c7d66ae",
"3e652e3da2c711ec",
"cb09b67a37901112",
"25445f5a9b787a0a",
"7c98833082d48029",
"4bab6cfef1e2c932",
"011c5e62deb510bb",
"b0f54ce6c23c6da6",
"92dac97dfb662f2d",
"d74bb73a0966b4bd"
],
"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"
},
{
"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": 202
},
{
"id": "bbf7bb18989048e1",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kernel - device",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"fabb645e0d88c91c",
"d3ac50a83c871cc8",
"6d65af0eaae695a3",
"c1d2a5b213c6568a",
"35c936be0ce55676",
"e5f9a77af592fc78",
"2dedf503efee73c8",
"bfa594bf1f876c92",
"94c79b8f52f0b6ba",
"2ba23548e87b0292"
],
"x": 94,
"y": 679,
"w": 1412,
"h": 202,
"info": "devices must register their definitions to this part input"
},
{
"id": "3711bd3352570a6c",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kenel - gate",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"149401230ed2ed4c",
"1eea209368626bc1",
"19dc49123e66ac71",
"85ea82a3282907b1",
"baaac9a301ef150a",
"8fdb5986494986cc"
],
"x": 94,
"y": 919,
"w": 1072,
"h": 202,
"info": "gate can be opened or closed\r\nWhen closed, all messages are stopped from MQTT links and kernel"
},
{
"id": "20b116b788ef3f27",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kernel - metric",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"12f02c43a82b46f9",
"a974cddec777bd94",
"7cd303d0aadd1433",
"eca0e6f3657f0564",
"1e908b6060a584ea",
"3743db17cb401840",
"6473c46ecd9304c7",
"582f8e6b17a9d9d1",
"dd79805b7971cbbb",
"0831bd7e7daa4915",
"ae5e8ae05adac7fd",
"b90652e7f7d28f66",
"9f055c7cccb634c1",
"c785aed10e83430a",
"68ad3074767eb2c3",
"3c3fe996c199516b",
"0d78bebcc5541e02",
"fc88fb69cac1e5a5",
"82229e46e51f94f5",
"895db12fd6d94a67",
"4689a4035be0c82e",
"6466ac9bacd083e2",
"ca80e5fe27609a11",
"d7f0ba2534f27b82",
"206c1fb4a48067df",
"031a6afd8300356a",
"4264ed01f3943e2f",
"c15d0c66ed5af79f",
"e2ef5706b35de7b0",
"8bbf418d277b4df7",
"357c6d106dec5efd",
"3a4c72588bb27ab4",
"56d131373d4e2f78",
"e6a4e861a99b196c"
],
"x": 94,
"y": 1159,
"w": 5142,
"h": 442
},
{
"id": "e9bd98a0b6e0d58c",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kernel - write to journal",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"e4e85a27e4775ac9",
"5a49d1f4b12618a7",
"234620fe148e1dca",
"285c9ffa2f524440",
"a441e9df790a0c3c",
"074313bb4e48de6f",
"c5dc4f8c357a596f",
"592483f2183c6711"
],
"x": 94,
"y": 1639,
"w": 1072,
"h": 262
},
{
"id": "6386e9a459469b53",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "96d8990f6a4978cc",
"name": "kernel - write to MQTT",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"b425ab40ef97a294",
"1102208726a88a10",
"4176c5d5bc97709c",
"1cbff7f3a7317c5b",
"c5465d5f64db4b45"
],
"x": 94,
"y": 1939,
"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",
"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": "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": "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,
"y": 4819,
"w": 612,
"h": 142
},
{
"id": "4937527cddd45b61",
"type": "group",
"z": "ab51b1e8cad7b700",
"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": "3be00f677c6457bd",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "3110fe9246e63b1e",
"name": "auto - source - in",
"style": {
"label": true,
"fill": "#0070c0",
"fill-opacity": "0.05"
},
"nodes": [
"ba77500cd9f7f6da",
"30220f4fe07e35a4",
"ac4653be6ea01477",
"1ceced58d0c32e85",
"24058eec92534b27",
"5460a158225a328b",
"d34f38f155583ff7",
"aa275d99ba85bee2",
"5891781e4a61525a",
"4908c2284e498338",
"411b13dfb3e989f0"
],
"x": 1794,
"y": 4819,
"w": 1502,
"h": 202
},
{
"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": "874075d44d19869a",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "5a56612ef35c5fd3",
"name": "auto - metric - in",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"7d45ca7ad7f363fe",
"a4e3db9cc35fc9eb",
"a2d25db2ace537ae",
"282bb73eb4892ab9",
"637b84024e725f38",
"f61f5fe80ddf6ff1"
],
"x": 5134,
"y": 4819,
"w": 882,
"h": 82
},
{
"id": "d9548e9b1a2e6f36",
"type": "group",
"z": "ab51b1e8cad7b700",
"g": "5a56612ef35c5fd3",
"name": "auto - metric - out",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"e93e8daa30075ae6",
"89d2eebcaafb5013",
"9c89a41128573752",
"b2ccb6a2a248015d",
"d318afa2a81e4ff9",
"9262e99e20e0e654",
"69041daa92bc0a8b"
],
"x": 6114,
"y": 4819,
"w": 762,
"h": 202
},
{
"id": "797eac89000183db",
"type": "link in",
"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",
"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",
"ebdbee7baef678a6",
"ed6bcbd32e72afe1"
],
"x": 1835,
"y": 4920,
"wires": [
[
"30220f4fe07e35a4"
]
]
},
{
"id": "30220f4fe07e35a4",
"type": "change",
"z": "ab51b1e8cad7b700",
"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": "ac4653be6ea01477",
"type": "switch",
"z": "ab51b1e8cad7b700",
"g": "3be00f677c6457bd",
"name": "select protocol",
"property": "input[0]",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "zwave",
"vt": "str"
},
{
"t": "eq",
"v": "zigbee",
"vt": "str"
},
{
"t": "eq",
"v": "rfxcom2mqtt",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 2180,
"y": 4920,
"wires": [
[
"1ceced58d0c32e85"
],
[
"5460a158225a328b"
],
[
"aa275d99ba85bee2"
]
]
},
{
"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"
},
{
"t": "set",
"p": "subid",
"pt": "msg",
"to": "input[3]",
"tot": "msg"
},
{
"t": "set",
"p": "prefix",
"pt": "msg",
"to": "'zwave/'&msg.id",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"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,
"wires": [
[
"5891781e4a61525a"
]
]
},
{
"id": "d34f38f155583ff7",
"type": "change",
"z": "ab51b1e8cad7b700",
"g": "3be00f677c6457bd",
"name": "device",
"rules": [
{
"t": "set",
"p": "model",
"pt": "msg",
"to": "device.model",
"tot": "msg"
},
{
"t": "set",
"p": "option",
"pt": "msg",
"to": "device.option",
"tot": "msg"
},
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "device.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "device.measurement",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "device.field",
"tot": "msg"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "false",
"tot": "bool"
},
{
"t": "delete",
"p": "device",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3130,
"y": 4920,
"wires": [
[
"24058eec92534b27"
]
]
},
{
"id": "aa275d99ba85bee2",
"type": "change",
"z": "ab51b1e8cad7b700",
"g": "3be00f677c6457bd",
"name": "extract protocol values",
"rules": [
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "rfxcom",
"tot": "str"
},
{
"t": "set",
"p": "id",
"pt": "msg",
"to": "input[2]",
"tot": "msg"
},
{
"t": "set",
"p": "subid",
"pt": "msg",
"to": "input[3]",
"tot": "msg"
},
{
"t": "set",
"p": "prefix",
"pt": "msg",
"to": "'rfxcom2mqtt/devices/'&msg.id",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2420,
"y": 4980,
"wires": [
[
"5891781e4a61525a"
]
]
},
{
"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",
"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",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "zwave",
"vt": "str"
},
{
"t": "eq",
"v": "zigbee",
"vt": "str"
},
{
"t": "eq",
"v": "rfxcom",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 6320,
"y": 4920,
"wires": [
[
"d318afa2a81e4ff9"
],
[
"9262e99e20e0e654"
],
[
"69041daa92bc0a8b"
]
]
},
{
"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": "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": "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": "69041daa92bc0a8b",
"type": "change",
"z": "ab51b1e8cad7b700",
"g": "d9548e9b1a2e6f36",
"name": "set prefix",
"rules": [
{
"t": "set",
"p": "prefix",
"pt": "msg",
"to": "'rfxcom2mqtt/devices/'&msg.id",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 6520,
"y": 4980,
"wires": [
[
"b2ccb6a2a248015d"
]
]
}
]