6499 lines
No EOL
127 KiB
JSON
6499 lines
No EOL
127 KiB
JSON
[
|
|
{
|
|
"id": "ab51b1e8cad7b700",
|
|
"type": "tab",
|
|
"label": "K.Kernel",
|
|
"disabled": false,
|
|
"info": "",
|
|
"env": []
|
|
},
|
|
{
|
|
"id": "3a98a00afc60d7cd",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"name": "auto - device",
|
|
"style": {
|
|
"fill": "#777777",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"63149b5b57a97c5b",
|
|
"3110fe9246e63b1e",
|
|
"5a56612ef35c5fd3",
|
|
"1e45572f1b441732"
|
|
],
|
|
"x": 62,
|
|
"y": 3367,
|
|
"w": 3346,
|
|
"h": 1266
|
|
},
|
|
{
|
|
"id": "50456628f56ade66",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"name": "device - system kernel version",
|
|
"style": {
|
|
"fill": "#777777",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"f67a857ae75d906f",
|
|
"a8dc4fab59fdefb4"
|
|
],
|
|
"x": 88,
|
|
"y": 5593,
|
|
"w": 1094,
|
|
"h": 134,
|
|
"info": "this is a fake device for kernel boot (ensure that one device is registered)"
|
|
},
|
|
{
|
|
"id": "96d8990f6a4978cc",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"name": "kernel",
|
|
"style": {
|
|
"fill": "#777777",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"a762a7a552cb9f03",
|
|
"bc29c56f900c8d36",
|
|
"3e71b89d61df9fd3",
|
|
"6386e9a459469b53",
|
|
"e9bd98a0b6e0d58c",
|
|
"20b116b788ef3f27",
|
|
"3711bd3352570a6c",
|
|
"bbf7bb18989048e1",
|
|
"cf7f82b8517f3250",
|
|
"9ea365cc69a1f2bf",
|
|
"e456c4e7cfd87c26"
|
|
],
|
|
"x": 68,
|
|
"y": 173,
|
|
"w": 5194,
|
|
"h": 2834
|
|
},
|
|
{
|
|
"id": "648d078d534a93be",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"name": "catch error",
|
|
"style": {
|
|
"fill": "#ff0000",
|
|
"fill-opacity": "0.05",
|
|
"label": true,
|
|
"stroke": "#ff0000"
|
|
},
|
|
"nodes": [
|
|
"d248a5e5ab11c9d7",
|
|
"4781986f3e559778",
|
|
"243984ca9c174883"
|
|
],
|
|
"x": 534,
|
|
"y": 19,
|
|
"w": 422,
|
|
"h": 82
|
|
},
|
|
{
|
|
"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": "93fb3d4a50d16da0",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"name": "mqtt server for nodered",
|
|
"style": {
|
|
"label": true,
|
|
"fill": "#ffffff",
|
|
"fill-opacity": "0.5",
|
|
"stroke": "#0070c0"
|
|
},
|
|
"nodes": [
|
|
"d1b208e623179a25",
|
|
"c706245ab487b7e2"
|
|
],
|
|
"x": 68,
|
|
"y": 3113,
|
|
"w": 1824,
|
|
"h": 194
|
|
},
|
|
{
|
|
"id": "5a56612ef35c5fd3",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3a98a00afc60d7cd",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#ffffff",
|
|
"label": true,
|
|
"stroke": "#92d04f",
|
|
"fill-opacity": "0.5"
|
|
},
|
|
"nodes": [
|
|
"874075d44d19869a",
|
|
"d9548e9b1a2e6f36"
|
|
],
|
|
"x": 88,
|
|
"y": 4353,
|
|
"w": 1794,
|
|
"h": 254
|
|
},
|
|
{
|
|
"id": "3110fe9246e63b1e",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3a98a00afc60d7cd",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#ffffff",
|
|
"label": true,
|
|
"stroke": "#0070c0",
|
|
"fill-opacity": "0.5"
|
|
},
|
|
"nodes": [
|
|
"3be00f677c6457bd",
|
|
"266f4436dc45ce89"
|
|
],
|
|
"x": 88,
|
|
"y": 3993,
|
|
"w": 3294,
|
|
"h": 314
|
|
},
|
|
{
|
|
"id": "63149b5b57a97c5b",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3a98a00afc60d7cd",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#ffffff",
|
|
"label": true,
|
|
"stroke": "#ffC000",
|
|
"fill-opacity": "0.5"
|
|
},
|
|
"nodes": [
|
|
"bd21a8b1786d3ed2",
|
|
"4937527cddd45b61"
|
|
],
|
|
"x": 88,
|
|
"y": 3633,
|
|
"w": 1744,
|
|
"h": 314
|
|
},
|
|
{
|
|
"id": "a8dc4fab59fdefb4",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "50456628f56ade66",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#ffC000",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"840c05ce502e7fdd",
|
|
"eed8990163b1ca81",
|
|
"7f76434616f622dc"
|
|
],
|
|
"x": 114,
|
|
"y": 5619,
|
|
"w": 542,
|
|
"h": 82
|
|
},
|
|
{
|
|
"id": "f67a857ae75d906f",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "50456628f56ade66",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#0070c0",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"33f7a250a7341c43",
|
|
"1b98c37b3b7502e4",
|
|
"f02b4584af0d800c"
|
|
],
|
|
"x": 694,
|
|
"y": 5619,
|
|
"w": 462,
|
|
"h": 82
|
|
},
|
|
{
|
|
"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": 712,
|
|
"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": "bc29c56f900c8d36",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "96d8990f6a4978cc",
|
|
"name": "kernel - read and write to file",
|
|
"style": {
|
|
"fill": "#ff0000",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"b1e2b474e4c77892",
|
|
"ede79ed6b82aa804",
|
|
"d3064571c2fde064",
|
|
"2356f963725e84c6",
|
|
"5205205461f48680",
|
|
"be0beee97ed2d572",
|
|
"44308739c0f759ad",
|
|
"43c695b9490f5104",
|
|
"9d4a1f539c9bf58c",
|
|
"dfb4b5350a9383c9",
|
|
"432e8063fae7039e",
|
|
"afd6a49ad55de215"
|
|
],
|
|
"x": 94,
|
|
"y": 2359,
|
|
"w": 1242,
|
|
"h": 142
|
|
},
|
|
{
|
|
"id": "3e71b89d61df9fd3",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "96d8990f6a4978cc",
|
|
"name": "kernel - write to InluxDB",
|
|
"style": {
|
|
"fill": "#ff0000",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"58359ad51f36d68e",
|
|
"0aca727fc835e615",
|
|
"5c4a3b8ce0220dd9",
|
|
"14a5f0183ce7ec8d",
|
|
"ec2704a8e18114ea",
|
|
"e287e4f4d7f3a174",
|
|
"b43439c6ab36fbfc",
|
|
"61b310386916497a",
|
|
"a98fde87c6b47e6e",
|
|
"7c75b6b921f30409",
|
|
"27e3bd6cada7b554",
|
|
"4280a1f889505f0c",
|
|
"4163673982458b27",
|
|
"faeff76a4321bee2",
|
|
"28b6c3fdb407e73b"
|
|
],
|
|
"x": 94,
|
|
"y": 2119,
|
|
"w": 2452,
|
|
"h": 202
|
|
},
|
|
{
|
|
"id": "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": "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": "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": "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": "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": "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": 812,
|
|
"h": 202
|
|
},
|
|
{
|
|
"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",
|
|
"f4e4d84dd55f9d0d",
|
|
"3308d2aa53cd0bbd"
|
|
],
|
|
"x": 94,
|
|
"y": 439,
|
|
"w": 2242,
|
|
"h": 202,
|
|
"info": "when flow start, this part launch all sub flows\r\ndevices registration must be called from this part output"
|
|
},
|
|
{
|
|
"id": "c706245ab487b7e2",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "93fb3d4a50d16da0",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#0070c0",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"630dfeb0e033a476",
|
|
"d40db95f9a154c3a",
|
|
"0f1e413815ecc824",
|
|
"19a5c46ec6c71456"
|
|
],
|
|
"x": 1354,
|
|
"y": 3139,
|
|
"w": 512,
|
|
"h": 142
|
|
},
|
|
{
|
|
"id": "d1b208e623179a25",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "93fb3d4a50d16da0",
|
|
"name": "",
|
|
"style": {
|
|
"fill": "#0070c0",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"a19b9fbac3e9f89c",
|
|
"e12bb3f8258f4439",
|
|
"0a4c943dc3a06f0d",
|
|
"af148bf44b019b35",
|
|
"b961d989c357e6d6",
|
|
"2cc2cdcf0b1f710e",
|
|
"56d93c268a656fc4",
|
|
"d02f1b2f2c3a2a30"
|
|
],
|
|
"x": 94,
|
|
"y": 3139,
|
|
"w": 1162,
|
|
"h": 142
|
|
},
|
|
{
|
|
"id": "e456c4e7cfd87c26",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "96d8990f6a4978cc",
|
|
"name": "kernel - catch error",
|
|
"style": {
|
|
"fill": "#ff0000",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"a52f0e788cd4dca3",
|
|
"2b16dee056f4ac27",
|
|
"26ee3b5b75b8d83f"
|
|
],
|
|
"x": 94,
|
|
"y": 2839,
|
|
"w": 352,
|
|
"h": 142
|
|
},
|
|
{
|
|
"id": "1e45572f1b441732",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3a98a00afc60d7cd",
|
|
"name": "",
|
|
"style": {
|
|
"stroke": "#001f60",
|
|
"fill": "#ffffff",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"abae3c836f2269b3",
|
|
"b96253f786c81415"
|
|
],
|
|
"x": 88,
|
|
"y": 3393,
|
|
"w": 2124,
|
|
"h": 194
|
|
},
|
|
{
|
|
"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": 1094,
|
|
"y": 4379,
|
|
"w": 762,
|
|
"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": 114,
|
|
"y": 4379,
|
|
"w": 882,
|
|
"h": 82
|
|
},
|
|
{
|
|
"id": "266f4436dc45ce89",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3110fe9246e63b1e",
|
|
"name": "auto - source - out",
|
|
"style": {
|
|
"fill": "#0070c0",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"14a0a0839924964f",
|
|
"06581753b7673f83",
|
|
"5e3cb9bb3266089b",
|
|
"0b32686fe74c253f",
|
|
"51b002c497ad57cd",
|
|
"83e8a9fa324dd4b9",
|
|
"bb1e8e34559c5a7f",
|
|
"6140ca98749acd85",
|
|
"70ae9d85820c14fb"
|
|
],
|
|
"x": 1714,
|
|
"y": 4019,
|
|
"w": 1642,
|
|
"h": 202
|
|
},
|
|
{
|
|
"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",
|
|
"cf2b3440a4b8c304"
|
|
],
|
|
"x": 114,
|
|
"y": 4019,
|
|
"w": 1502,
|
|
"h": 262
|
|
},
|
|
{
|
|
"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": 834,
|
|
"y": 3659,
|
|
"w": 972,
|
|
"h": 262
|
|
},
|
|
{
|
|
"id": "bd21a8b1786d3ed2",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "63149b5b57a97c5b",
|
|
"name": "auto - device - in",
|
|
"style": {
|
|
"fill": "#ffC000",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"d85fe6335a6eae7b",
|
|
"c3d88e1872a9789b",
|
|
"7f1a03ba2d4eb5d1",
|
|
"546f190f3ec0c90d"
|
|
],
|
|
"x": 114,
|
|
"y": 3659,
|
|
"w": 612,
|
|
"h": 202
|
|
},
|
|
{
|
|
"id": "b96253f786c81415",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "1e45572f1b441732",
|
|
"name": "auto - model - in",
|
|
"style": {
|
|
"fill": "#001f60",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"a330cf9fee227d5f",
|
|
"9cb906bf8066d37e",
|
|
"66f70658751b68f3",
|
|
"a55fb25ac5e89398"
|
|
],
|
|
"x": 114,
|
|
"y": 3419,
|
|
"w": 382,
|
|
"h": 142
|
|
},
|
|
{
|
|
"id": "abae3c836f2269b3",
|
|
"type": "group",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "1e45572f1b441732",
|
|
"name": "auto - model - out",
|
|
"style": {
|
|
"fill": "#001f60",
|
|
"fill-opacity": "0.05",
|
|
"label": true
|
|
},
|
|
"nodes": [
|
|
"1266c0d95b69ccf5",
|
|
"94aa726ce8973d2c",
|
|
"13f4c9a49f9902dc",
|
|
"5d553844550b821e",
|
|
"1a40c588514eddb2",
|
|
"b8199d733a66766b",
|
|
"b9656cfcd1a2011e",
|
|
"3055080b9f38dbe8",
|
|
"9573e23ffd1bd3ec",
|
|
"37838aa1f7d06a7b"
|
|
],
|
|
"x": 594,
|
|
"y": 3419,
|
|
"w": 1592,
|
|
"h": 142
|
|
},
|
|
{
|
|
"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": 1500,
|
|
"y": 4540,
|
|
"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": 1500,
|
|
"y": 4480,
|
|
"wires": [
|
|
[
|
|
"b2ccb6a2a248015d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d318afa2a81e4ff9",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d9548e9b1a2e6f36",
|
|
"name": "set prefix",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "prefix",
|
|
"pt": "msg",
|
|
"to": "'zwave/'&msg.id",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1500,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"b2ccb6a2a248015d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b2ccb6a2a248015d",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d9548e9b1a2e6f36",
|
|
"name": "set topic",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "topic",
|
|
"pt": "msg",
|
|
"to": "msg.prefix&'/'&msg.topic",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1680,
|
|
"y": 4480,
|
|
"wires": [
|
|
[
|
|
"89d2eebcaafb5013"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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": 1300,
|
|
"y": 4480,
|
|
"wires": [
|
|
[
|
|
"d318afa2a81e4ff9"
|
|
],
|
|
[
|
|
"9262e99e20e0e654"
|
|
],
|
|
[
|
|
"69041daa92bc0a8b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "89d2eebcaafb5013",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d9548e9b1a2e6f36",
|
|
"name": "auto - metric - out",
|
|
"mode": "link",
|
|
"links": [
|
|
"62dd3e8d6c87a0f9",
|
|
"6c324b24ca028984",
|
|
"de0c34e8104574b0"
|
|
],
|
|
"x": 1815,
|
|
"y": 4480,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "e93e8daa30075ae6",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d9548e9b1a2e6f36",
|
|
"name": "auto - metric - out",
|
|
"links": [
|
|
"3a56ad77ed759c12",
|
|
"dc8432cb11ffb0d6",
|
|
"7906a1e6360e1d26",
|
|
"6129043e9e44e401",
|
|
"4949856273c96f31",
|
|
"787259a3f73535a8",
|
|
"04c8ea40e1416dd8",
|
|
"b851d81e54e34734",
|
|
"9141d766151544f5",
|
|
"a0599f25333072be",
|
|
"a405297eaa582a12",
|
|
"8e7510f792d7e993",
|
|
"d8d03ddc7ce6b361",
|
|
"5d02e59fc60d15bd"
|
|
],
|
|
"x": 1135,
|
|
"y": 4480,
|
|
"wires": [
|
|
[
|
|
"9c89a41128573752"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "f61f5fe80ddf6ff1",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "protocol",
|
|
"property": "protocol",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "nempty"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 500,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"a2d25db2ace537ae"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "637b84024e725f38",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "auto - metric - in",
|
|
"mode": "link",
|
|
"links": [
|
|
"0f053409eacfc57b",
|
|
"c7ca4f7a643b3a2c",
|
|
"25b1ac0e4bf27db0",
|
|
"45b3204fc96f986e",
|
|
"d381cd4b08e2f495",
|
|
"c1256035b49c2bb1",
|
|
"2818a7a29e3d6043",
|
|
"26c8f66f641451ac",
|
|
"07cfbb3cf7a1c47a",
|
|
"b776ddbdb4b51028",
|
|
"cd0939042b525b67",
|
|
"366f7377fd513760",
|
|
"e3cb6f56cade1ab5",
|
|
"937769a5cdaa76db"
|
|
],
|
|
"x": 955,
|
|
"y": 4420,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "282bb73eb4892ab9",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "id",
|
|
"property": "id",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "nempty"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 830,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"637b84024e725f38"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a2d25db2ace537ae",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "model",
|
|
"property": "model",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "nempty"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 670,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"282bb73eb4892ab9"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a4e3db9cc35fc9eb",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "from device",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "protocol",
|
|
"pt": "msg",
|
|
"to": "devices[msg.bucket][msg.measurement][msg.field]protocol",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "model",
|
|
"pt": "msg",
|
|
"to": "devices[msg.bucket][msg.measurement][msg.field]model",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "id",
|
|
"pt": "msg",
|
|
"to": "devices[msg.bucket][msg.measurement][msg.field]id",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "option",
|
|
"pt": "msg",
|
|
"to": "devices[msg.bucket][msg.measurement][msg.field]option",
|
|
"tot": "global"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 310,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"f61f5fe80ddf6ff1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7d45ca7ad7f363fe",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "874075d44d19869a",
|
|
"name": "auto - metric - in",
|
|
"links": [
|
|
"031a6afd8300356a"
|
|
],
|
|
"x": 155,
|
|
"y": 4420,
|
|
"wires": [
|
|
[
|
|
"a4e3db9cc35fc9eb"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "70ae9d85820c14fb",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "set field",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "field",
|
|
"pt": "msg",
|
|
"to": "seen",
|
|
"tot": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 2060,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"5e3cb9bb3266089b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "6140ca98749acd85",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "seen",
|
|
"property": "seen",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "istype",
|
|
"v": "string",
|
|
"vt": "string"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1890,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"70ae9d85820c14fb"
|
|
],
|
|
[
|
|
"5e3cb9bb3266089b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "bb1e8e34559c5a7f",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "250 ms by path",
|
|
"op1": "",
|
|
"op2": "",
|
|
"op1type": "pay",
|
|
"op2type": "nul",
|
|
"duration": "250",
|
|
"extend": true,
|
|
"overrideDelay": false,
|
|
"units": "ms",
|
|
"reset": "",
|
|
"bytopic": "topic",
|
|
"topic": "path",
|
|
"outputs": 1,
|
|
"x": 2500,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"83e8a9fa324dd4b9"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "83e8a9fa324dd4b9",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "get flow stack",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "seen",
|
|
"pt": "msg",
|
|
"to": "#:(memoryOnly)::seen",
|
|
"tot": "flow"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 2720,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"0b32686fe74c253f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "51b002c497ad57cd",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "set flow stack",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "#:(memoryOnly)::seen[msg.path]",
|
|
"pt": "flow",
|
|
"to": "",
|
|
"tot": "date"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "seen",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 3160,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"06581753b7673f83"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0b32686fe74c253f",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "limit to 15 min",
|
|
"property": "seen[msg.path]",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "lt",
|
|
"v": "$number(msg.payload) - 900000",
|
|
"vt": "jsonata"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 2940,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"51b002c497ad57cd"
|
|
],
|
|
[
|
|
"51b002c497ad57cd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "5e3cb9bb3266089b",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "set measurement",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "measurement",
|
|
"pt": "msg",
|
|
"to": "seen",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "path",
|
|
"pt": "msg",
|
|
"to": "msg.bucket & '/' & msg.measurement & '/' & msg.field",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "",
|
|
"tot": "date"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 2270,
|
|
"y": 4180,
|
|
"wires": [
|
|
[
|
|
"bb1e8e34559c5a7f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "06581753b7673f83",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "auto - source - out",
|
|
"mode": "link",
|
|
"links": [
|
|
"206c1fb4a48067df"
|
|
],
|
|
"x": 3315,
|
|
"y": 4060,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "14a0a0839924964f",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "266f4436dc45ce89",
|
|
"name": "auto - source - out",
|
|
"links": [
|
|
"0a2fa3c2042de32b",
|
|
"1ed7593011ad6d9d",
|
|
"8a80d7d04901125e",
|
|
"6d3f4589b84a4ae0",
|
|
"61d409cdd6107520",
|
|
"8f6759a268add92e",
|
|
"f11a044ad0e20908",
|
|
"4385665e61ddeef1",
|
|
"162055ff0b298da7",
|
|
"1e1a6a213e5bed71",
|
|
"b2f041d50556adbe",
|
|
"9c2e6f0785e3d15e",
|
|
"7eff7f2e1f0574d0",
|
|
"2ab7993499d31bbd",
|
|
"8ab95bcfe737b310",
|
|
"8ad2befe24b148fa",
|
|
"a14747cc11f09dca",
|
|
"a5e2d099050bf1a9",
|
|
"18c9f623b0f8f8ba",
|
|
"f5c2ab1d8a9d4f05",
|
|
"465fd39cc57093ae",
|
|
"4a66fcf836959d2c",
|
|
"13a43ea0c63dc053",
|
|
"5d76905ae805599d",
|
|
"81d1299edeeec856",
|
|
"a5360e4799f9e170",
|
|
"2154dfc072f5104e"
|
|
],
|
|
"x": 1755,
|
|
"y": 4060,
|
|
"wires": [
|
|
[
|
|
"06581753b7673f83",
|
|
"6140ca98749acd85"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "411b13dfb3e989f0",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "by _id",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "device",
|
|
"pt": "msg",
|
|
"to": "protocols[msg.protocol][msg.id]",
|
|
"tot": "global"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1290,
|
|
"y": 4160,
|
|
"wires": [
|
|
[
|
|
"d34f38f155583ff7"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "4908c2284e498338",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "exists",
|
|
"property": "device",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "istype",
|
|
"v": "object",
|
|
"vt": "object"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1130,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"d34f38f155583ff7"
|
|
],
|
|
[
|
|
"411b13dfb3e989f0"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "5891781e4a61525a",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "by full id",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "full_id",
|
|
"pt": "msg",
|
|
"to": "msg.id&'.'&msg.subid",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "device",
|
|
"pt": "msg",
|
|
"to": "protocols[msg.protocol][msg.full_id]",
|
|
"tot": "global"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 960,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"4908c2284e498338"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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": 740,
|
|
"y": 4180,
|
|
"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": 1450,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"24058eec92534b27"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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": 740,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"5891781e4a61525a"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "24058eec92534b27",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "auto - source - in",
|
|
"mode": "link",
|
|
"links": [
|
|
"40abdc0a6d9a02e0",
|
|
"e75839a08fe8026b",
|
|
"fbf9779ea5af2111",
|
|
"db5251d07949a8c0",
|
|
"e357d03ad7d6882e",
|
|
"0dc72fc23588671b",
|
|
"ada7d594f73cc361",
|
|
"3b6e494f3b2508cf",
|
|
"e93a07a5851a14f2",
|
|
"42c7380d496e1a14",
|
|
"3a92525692be8c0a",
|
|
"7327ac2371d2c61e",
|
|
"b8a506ad585dedf8",
|
|
"d6f83986f164d9d1",
|
|
"b618882d7f713f12",
|
|
"9bdd13282dd84b6c",
|
|
"9565abec6d5582d4",
|
|
"c54c02a1bb45d163",
|
|
"f0366fead862ee6e",
|
|
"0c68f6b037bb2c3f",
|
|
"a12c8ea8c9ebce6e",
|
|
"63ccb5cc65d41db0",
|
|
"9c89f8ad918445b3",
|
|
"2095d2a63909780c",
|
|
"ddda7783f50a0db4",
|
|
"b3091e70cd5211b4",
|
|
"a735610c7cb844e6"
|
|
],
|
|
"x": 1575,
|
|
"y": 4120,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "1ceced58d0c32e85",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "extract protocol values",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "protocol",
|
|
"pt": "msg",
|
|
"to": "zwave",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "id",
|
|
"pt": "msg",
|
|
"to": "input[1]",
|
|
"tot": "msg"
|
|
},
|
|
{
|
|
"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": 740,
|
|
"y": 4060,
|
|
"wires": [
|
|
[
|
|
"5891781e4a61525a"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "teleinfo",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 4,
|
|
"x": 500,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"1ceced58d0c32e85"
|
|
],
|
|
[
|
|
"5460a158225a328b"
|
|
],
|
|
[
|
|
"aa275d99ba85bee2"
|
|
],
|
|
[
|
|
"cf2b3440a4b8c304"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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": 300,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"ac4653be6ea01477"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ba77500cd9f7f6da",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "auto - source - in",
|
|
"links": [
|
|
"a3594a90f69fe537",
|
|
"ebdbee7baef678a6",
|
|
"ed6bcbd32e72afe1",
|
|
"b491f7eb02575108"
|
|
],
|
|
"x": 155,
|
|
"y": 4120,
|
|
"wires": [
|
|
[
|
|
"30220f4fe07e35a4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b08802b0dbd9a58b",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "add subid to id",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "id",
|
|
"pt": "msg",
|
|
"to": "msg.id&'.'&msg.subid",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1440,
|
|
"y": 3700,
|
|
"wires": [
|
|
[
|
|
"e6d11d0438e20b80"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "8f4503a19f2f639e",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "subid exists",
|
|
"property": "subid",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "istype",
|
|
"v": "string",
|
|
"vt": "string"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1230,
|
|
"y": 3760,
|
|
"wires": [
|
|
[
|
|
"b08802b0dbd9a58b"
|
|
],
|
|
[
|
|
"e6d11d0438e20b80"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "561aaceffe076a5d",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "seen / xxx / number",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "measurement",
|
|
"pt": "msg",
|
|
"to": "seen",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "format",
|
|
"pt": "msg",
|
|
"to": "number",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "default",
|
|
"pt": "msg",
|
|
"to": "",
|
|
"tot": "date"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1250,
|
|
"y": 3820,
|
|
"wires": [
|
|
[
|
|
"80459ca7317cce90"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0ff47b07b863d0ae",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "brand exists",
|
|
"property": "brand",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "istype",
|
|
"v": "string",
|
|
"vt": "string"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1030,
|
|
"y": 3880,
|
|
"wires": [
|
|
[
|
|
"561aaceffe076a5d",
|
|
"8f4503a19f2f639e"
|
|
],
|
|
[
|
|
"80459ca7317cce90"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e6d11d0438e20b80",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "register by protocols",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "protocols[msg.protocol][msg.id]",
|
|
"pt": "global",
|
|
"to": "{\t 'bucket':msg.bucket,\t 'measurement':msg.measurement,\t 'field':msg.field,\t 'brand':msg.brand,\t 'model':msg.model,\t 'option':msg.option\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1680,
|
|
"y": 3760,
|
|
"wires": [
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "80459ca7317cce90",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "auto - device - out",
|
|
"mode": "link",
|
|
"links": [
|
|
"bfa594bf1f876c92"
|
|
],
|
|
"x": 1415,
|
|
"y": 3880,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "3e1b4213132404be",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "4937527cddd45b61",
|
|
"name": "auto - device - out",
|
|
"links": [
|
|
"919ec72b0122125e",
|
|
"64209e9b32b3069e",
|
|
"76e4299fa08ddb99",
|
|
"76c617de3fe57a72",
|
|
"dbc8bb25a9189ad0",
|
|
"4f9f216ecca80280",
|
|
"5ea3980a5d978b17",
|
|
"8237bbc2fead9706",
|
|
"97bc7bfd63052866",
|
|
"74b35458f02dda86",
|
|
"8480858c89a6eed5",
|
|
"b87c542ba9b27bb5",
|
|
"372240222a775d4f",
|
|
"ab023aa415991c4f",
|
|
"c288ba888d38a74d",
|
|
"d0fc50917dc16651",
|
|
"6ef165716dcf6229",
|
|
"70520299b0fb1e7e",
|
|
"b9b3c6ff10434440",
|
|
"c76838030c694a7c",
|
|
"6b94df736e3aae95",
|
|
"e43044b50e8b545e",
|
|
"5f1b59b7430d9182",
|
|
"6824a9460e4d8c9f",
|
|
"7c230d4cdca2bfea",
|
|
"2a9e3b488590c435",
|
|
"73d4e0dc30041c36",
|
|
"2ed136ebd92695c1",
|
|
"22ef5d09e03d19e0",
|
|
"e20cf17770949369",
|
|
"136467c932bcd5c7"
|
|
],
|
|
"x": 875,
|
|
"y": 3880,
|
|
"wires": [
|
|
[
|
|
"0ff47b07b863d0ae"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "546f190f3ec0c90d",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bd21a8b1786d3ed2",
|
|
"name": "auto - device - in",
|
|
"mode": "link",
|
|
"links": [
|
|
"115d9ecf61c636e1",
|
|
"1347f6afde2719d6",
|
|
"14a19cafbce9493f",
|
|
"1f98f11f070b0415",
|
|
"20255790fade5c76",
|
|
"277f13fc211becf2",
|
|
"2dd3539dc0c9fedf",
|
|
"388c30abbe7958c4",
|
|
"439c47602f7560b5",
|
|
"54eb8ae585b6cd20",
|
|
"65f6a02b5d2c092d",
|
|
"6f6d7d45f826f275",
|
|
"7157ad0d44c06b58",
|
|
"8a0b4fb72d78f2f6",
|
|
"8d39935a442a5f68",
|
|
"9386d8f8dd219a71",
|
|
"9405d14c97dba7e5",
|
|
"a54905c20392b984",
|
|
"c0e646f0c8352181",
|
|
"c2e44a76c98cd7ae",
|
|
"c491dadde798f841",
|
|
"c50944ca0208faa9",
|
|
"d29d128c44cded92",
|
|
"d59e71f32dca20fe",
|
|
"de6506a93e799ba9",
|
|
"ea77f48c1d222cc2",
|
|
"ed3c5c95136138e9",
|
|
"f2af422ed8da0c9f",
|
|
"fdbf3fd639e2816d",
|
|
"96341058baa9083b",
|
|
"4b7ee33aecb98a13"
|
|
],
|
|
"x": 455,
|
|
"y": 3820,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "7f1a03ba2d4eb5d1",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bd21a8b1786d3ed2",
|
|
"name": "auto - device - uncomplete",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 560,
|
|
"y": 3700,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "c3d88e1872a9789b",
|
|
"type": "function",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bd21a8b1786d3ed2",
|
|
"name": "check device",
|
|
"func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.model === 'undefined' ||\n typeof msg.id === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': typeof msg.measurement === 'undefined' ? '' : msg.measurement,\n 'field': typeof msg.field === 'undefined' ? '' : msg.field,\n 'model': msg.model,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option,\n 'id': msg.id,\n 'payload':''\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.model + ' / ' + newmsg.id });\nreturn [null,newmsg];",
|
|
"outputs": 2,
|
|
"timeout": "",
|
|
"noerr": 0,
|
|
"initialize": "\n",
|
|
"finalize": "\n",
|
|
"libs": [],
|
|
"x": 310,
|
|
"y": 3820,
|
|
"wires": [
|
|
[
|
|
"7f1a03ba2d4eb5d1"
|
|
],
|
|
[
|
|
"546f190f3ec0c90d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d85fe6335a6eae7b",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bd21a8b1786d3ed2",
|
|
"name": "auto - device - in",
|
|
"links": [
|
|
"2671ada0fb73c277",
|
|
"fe78f8b441d511fa",
|
|
"bd808902c41bd7f4",
|
|
"eae521ecfa4e75ee",
|
|
"53e56dfd722c9a0d",
|
|
"4d2e3d8689320f62",
|
|
"1b0a04a9bdbc1365",
|
|
"d3628ce51ab79320",
|
|
"703da3e421c584aa",
|
|
"4c67090f1c608d32",
|
|
"19a6166e5849a994",
|
|
"1bccadafd36ce740",
|
|
"0bd88686a62ceef8",
|
|
"eabdc2a598d33742",
|
|
"3942b791afecf694",
|
|
"4834eb28e9b70598",
|
|
"112b58b0d1bddfa7",
|
|
"1d8435c109d80c90",
|
|
"f3afc9e6821ad3a2",
|
|
"a8759eb49d4d47f1",
|
|
"9beae381e402ac2c"
|
|
],
|
|
"x": 155,
|
|
"y": 3820,
|
|
"wires": [
|
|
[
|
|
"c3d88e1872a9789b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d02f1b2f2c3a2a30",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "MQTT nodered base topic must be same as automate name (default is iotredloop)",
|
|
"info": "",
|
|
"x": 820,
|
|
"y": 3240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "28b6c3fdb407e73b",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "influxdb must have \"resume\", \"linky\", \"system\", \"home\", \"unifi\" buckets, and one bucket per room",
|
|
"info": "",
|
|
"x": 450,
|
|
"y": 2280,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "7f76434616f622dc",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a8dc4fab59fdefb4",
|
|
"name": "device - system kernel version",
|
|
"mode": "link",
|
|
"links": [
|
|
"bfa594bf1f876c92"
|
|
],
|
|
"x": 615,
|
|
"y": 5660,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "eed8990163b1ca81",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a8dc4fab59fdefb4",
|
|
"name": "device - system kernel version",
|
|
"links": [
|
|
"25445f5a9b787a0a"
|
|
],
|
|
"x": 155,
|
|
"y": 5660,
|
|
"wires": [
|
|
[
|
|
"840c05ce502e7fdd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "840c05ce502e7fdd",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a8dc4fab59fdefb4",
|
|
"name": "system / kernel / version / text / 0.0.1",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "bucket",
|
|
"pt": "msg",
|
|
"to": "system",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "measurement",
|
|
"pt": "msg",
|
|
"to": "kernel",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "field",
|
|
"pt": "msg",
|
|
"to": "version",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "default",
|
|
"pt": "msg",
|
|
"to": "0.0.1",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "format",
|
|
"pt": "msg",
|
|
"to": "text",
|
|
"tot": "str"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 390,
|
|
"y": 5660,
|
|
"wires": [
|
|
[
|
|
"7f76434616f622dc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "f02b4584af0d800c",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "f67a857ae75d906f",
|
|
"name": "source - system kernel version",
|
|
"mode": "link",
|
|
"links": [
|
|
"206c1fb4a48067df"
|
|
],
|
|
"x": 1115,
|
|
"y": 5660,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "1b98c37b3b7502e4",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "f67a857ae75d906f",
|
|
"name": "system / kernel / version",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "bucket",
|
|
"pt": "msg",
|
|
"to": "system",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "measurement",
|
|
"pt": "msg",
|
|
"to": "kernel",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "field",
|
|
"pt": "msg",
|
|
"to": "version",
|
|
"tot": "str"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "about.version",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "topic",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 930,
|
|
"y": 5660,
|
|
"wires": [
|
|
[
|
|
"f02b4584af0d800c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "33f7a250a7341c43",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "f67a857ae75d906f",
|
|
"name": "source - system kernel version",
|
|
"links": [
|
|
"94c79b8f52f0b6ba"
|
|
],
|
|
"x": 735,
|
|
"y": 5660,
|
|
"wires": [
|
|
[
|
|
"1b98c37b3b7502e4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ca442e58e65b32f8",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "every day at 12am",
|
|
"info": "",
|
|
"x": 590,
|
|
"y": 2760,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "c367834c9cccbe38",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "60 s after boot and every minute",
|
|
"info": "",
|
|
"x": 630,
|
|
"y": 2580,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "412878f8c488a0f4",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "60 s after boot and every hour",
|
|
"info": "",
|
|
"x": 620,
|
|
"y": 2640,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "7fa17301839c0fa6",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "60 s after boot and every day at 3am",
|
|
"info": "",
|
|
"x": 640,
|
|
"y": 2700,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "764da2d0527c1ef6",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "kernel - cron midday",
|
|
"mode": "link",
|
|
"links": [
|
|
"34a350a168b2e745"
|
|
],
|
|
"x": 365,
|
|
"y": 2760,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d4146047c079ac62",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "cron midday",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "00 12 * * *",
|
|
"once": false,
|
|
"onceDelay": "60",
|
|
"topic": "",
|
|
"x": 220,
|
|
"y": 2760,
|
|
"wires": [
|
|
[
|
|
"764da2d0527c1ef6"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "074a67bf0fcf09ad",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "kernel - cron day",
|
|
"mode": "link",
|
|
"links": [
|
|
"5e387209f4a1be63",
|
|
"f1d9b13e80b9da4c",
|
|
"f33d7419f0933e00",
|
|
"9c9fde57b61d7940",
|
|
"bf4f0e66f58b0244",
|
|
"c9f8f3d06381d3b2",
|
|
"f1ddd31035db0cc4",
|
|
"84aad657cc3015c1",
|
|
"151c140cd7171c80",
|
|
"beaa3fccedefbf80",
|
|
"3db710d8b9023738"
|
|
],
|
|
"x": 365,
|
|
"y": 2700,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "287d719de575c01f",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "kernel - cron hour",
|
|
"mode": "link",
|
|
"links": [],
|
|
"x": 365,
|
|
"y": 2640,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "004bb30c27c94fb4",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "kernel - cron minute",
|
|
"mode": "link",
|
|
"links": [
|
|
"105c061631062fa1",
|
|
"444b573a678eae86",
|
|
"9d1ff2ced120c248",
|
|
"b8039538d3ab41e7",
|
|
"b3f5b970a9b03119",
|
|
"50bc182c3569008c",
|
|
"47316bf97f84b277",
|
|
"f71143d4a1e865c3",
|
|
"15d5032c9ec85d29",
|
|
"3340c7df51c209a2",
|
|
"62c79bf2c5d8ec18",
|
|
"c47db9d9abdfe3ba",
|
|
"7069be6e6ebff25e",
|
|
"a2bfb1feb168f963",
|
|
"d0935907549d7d1d",
|
|
"20f084f32aa8f63a"
|
|
],
|
|
"x": 365,
|
|
"y": 2580,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "867a71b7dae9c844",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "cron day",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "00 03 * * *",
|
|
"once": true,
|
|
"onceDelay": "60",
|
|
"topic": "",
|
|
"x": 200,
|
|
"y": 2700,
|
|
"wires": [
|
|
[
|
|
"074a67bf0fcf09ad"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "722c773f6314dd40",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "cron hour",
|
|
"props": [],
|
|
"repeat": "3600",
|
|
"crontab": "",
|
|
"once": true,
|
|
"onceDelay": "60",
|
|
"topic": "",
|
|
"x": 210,
|
|
"y": 2640,
|
|
"wires": [
|
|
[
|
|
"287d719de575c01f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "caa3c5097468f133",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "a762a7a552cb9f03",
|
|
"name": "cron minute",
|
|
"props": [],
|
|
"repeat": "60",
|
|
"crontab": "",
|
|
"once": true,
|
|
"onceDelay": "60",
|
|
"topic": "",
|
|
"x": 210,
|
|
"y": 2580,
|
|
"wires": [
|
|
[
|
|
"004bb30c27c94fb4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "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": 1550,
|
|
"y": 3180,
|
|
"wires": [
|
|
[
|
|
"630dfeb0e033a476",
|
|
"0f1e413815ecc824"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0f1e413815ecc824",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "c706245ab487b7e2",
|
|
"name": "mqtt nodered output",
|
|
"mode": "link",
|
|
"links": [
|
|
"32f2b2da5065afde",
|
|
"e942462a899825f8",
|
|
"ff1a30fbddcaa9fd"
|
|
],
|
|
"x": 1695,
|
|
"y": 3240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d40db95f9a154c3a",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "c706245ab487b7e2",
|
|
"name": "mqtt nodered",
|
|
"links": [
|
|
"e080152994978357",
|
|
"c5465d5f64db4b45"
|
|
],
|
|
"x": 1395,
|
|
"y": 3180,
|
|
"wires": [
|
|
[
|
|
"19a5c46ec6c71456"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "630dfeb0e033a476",
|
|
"type": "mqtt out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "c706245ab487b7e2",
|
|
"name": "MQTT nodered",
|
|
"topic": "",
|
|
"qos": "1",
|
|
"retain": "true",
|
|
"respTopic": "",
|
|
"contentType": "",
|
|
"userProps": "",
|
|
"correl": "",
|
|
"expiry": "",
|
|
"broker": "51fc92ba27d12eaa",
|
|
"x": 1760,
|
|
"y": 3180,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "56d93c268a656fc4",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "ignore \"cible\" path",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "regex",
|
|
"v": "/cible/",
|
|
"vt": "str",
|
|
"case": false
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 790,
|
|
"y": 3180,
|
|
"wires": [
|
|
[],
|
|
[
|
|
"2cc2cdcf0b1f710e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2cc2cdcf0b1f710e",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "raz MQTT properties",
|
|
"rules": [
|
|
{
|
|
"t": "delete",
|
|
"p": "qos",
|
|
"pt": "msg"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "retain",
|
|
"pt": "msg"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "source",
|
|
"pt": "msg",
|
|
"to": "iotredloop",
|
|
"tot": "str"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1040,
|
|
"y": 3180,
|
|
"wires": [
|
|
[
|
|
"e12bb3f8258f4439"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b961d989c357e6d6",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "15 msg / s",
|
|
"pauseType": "rate",
|
|
"timeout": "5",
|
|
"timeoutUnits": "seconds",
|
|
"rate": "15",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 410,
|
|
"y": 3180,
|
|
"wires": [
|
|
[
|
|
"0a4c943dc3a06f0d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "af148bf44b019b35",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "mqtt nodered gate",
|
|
"links": [
|
|
"d68d686bbf684c95",
|
|
"8fdb5986494986cc"
|
|
],
|
|
"x": 465,
|
|
"y": 3240,
|
|
"wires": [
|
|
[
|
|
"0a4c943dc3a06f0d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0a4c943dc3a06f0d",
|
|
"type": "q-gate",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "",
|
|
"controlTopic": "gate",
|
|
"defaultState": "queueing",
|
|
"openCmd": "open",
|
|
"closeCmd": "close",
|
|
"toggleCmd": "toggle",
|
|
"queueCmd": "close",
|
|
"defaultCmd": "default",
|
|
"triggerCmd": "trigger",
|
|
"flushCmd": "open",
|
|
"resetCmd": "reset",
|
|
"peekCmd": "peek",
|
|
"dropCmd": "drop",
|
|
"statusCmd": "status",
|
|
"maxQueueLength": "0",
|
|
"keepNewest": false,
|
|
"qToggle": false,
|
|
"persist": false,
|
|
"storeName": "default",
|
|
"x": 590,
|
|
"y": 3180,
|
|
"wires": [
|
|
[
|
|
"56d93c268a656fc4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e12bb3f8258f4439",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "d1b208e623179a25",
|
|
"name": "mqtt nodered",
|
|
"mode": "link",
|
|
"links": [
|
|
"282314c3181caba2",
|
|
"f4fed668dbff1da4",
|
|
"206c1fb4a48067df"
|
|
],
|
|
"x": 1215,
|
|
"y": 3180,
|
|
"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": 3180,
|
|
"wires": [
|
|
[
|
|
"b961d989c357e6d6"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0aca727fc835e615",
|
|
"type": "Stackhero-InfluxDB-v2-write",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"server": "22dd0707e6d3a364",
|
|
"name": "influxdb",
|
|
"x": 2340,
|
|
"y": 2220,
|
|
"wires": [
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "afd6a49ad55de215",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "kernel - read file",
|
|
"mode": "link",
|
|
"links": [
|
|
"7c98833082d48029"
|
|
],
|
|
"x": 1295,
|
|
"y": 2460,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "432e8063fae7039e",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "kernel - write to file",
|
|
"links": [
|
|
"a69d70a155c21ef3"
|
|
],
|
|
"x": 135,
|
|
"y": 2400,
|
|
"wires": [
|
|
[
|
|
"9d4a1f539c9bf58c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "dfb4b5350a9383c9",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "kernel - read from file",
|
|
"links": [
|
|
"8820bdb5b422a686",
|
|
"6d94e6bcdaf399d4"
|
|
],
|
|
"x": 135,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"44308739c0f759ad"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9d4a1f539c9bf58c",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "filename",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "automate",
|
|
"pt": "msg",
|
|
"to": "about.automate",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "filename",
|
|
"pt": "msg",
|
|
"to": "'/data/'&msg.automate&'_metrics.bk'",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "metrics",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "automate",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 280,
|
|
"y": 2400,
|
|
"wires": [
|
|
[
|
|
"b1e2b474e4c77892"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "43c695b9490f5104",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "delay 100 ms",
|
|
"pauseType": "delay",
|
|
"timeout": "100",
|
|
"timeoutUnits": "milliseconds",
|
|
"rate": "1",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 1150,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"afd6a49ad55de215"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "44308739c0f759ad",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "filename",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "automate",
|
|
"pt": "msg",
|
|
"to": "about.automate",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "filename",
|
|
"pt": "msg",
|
|
"to": "'/data/'&msg.automate&'_metrics.bk'",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "automate",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 280,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"d3064571c2fde064"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "be0beee97ed2d572",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "kernel - read file",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1160,
|
|
"y": 2400,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "5205205461f48680",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "write file contents to global metrics",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "metrics",
|
|
"pt": "global",
|
|
"to": "payload",
|
|
"tot": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 880,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"be0beee97ed2d572",
|
|
"43c695b9490f5104"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2356f963725e84c6",
|
|
"type": "json",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "",
|
|
"property": "payload",
|
|
"action": "",
|
|
"pretty": false,
|
|
"x": 630,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"5205205461f48680"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d3064571c2fde064",
|
|
"type": "file in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "read file",
|
|
"filename": "filename",
|
|
"filenameType": "msg",
|
|
"format": "utf8",
|
|
"chunk": false,
|
|
"sendError": false,
|
|
"encoding": "none",
|
|
"allProps": false,
|
|
"x": 460,
|
|
"y": 2460,
|
|
"wires": [
|
|
[
|
|
"2356f963725e84c6"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ede79ed6b82aa804",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "kernel - write file",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 660,
|
|
"y": 2400,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b1e2b474e4c77892",
|
|
"type": "file",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bc29c56f900c8d36",
|
|
"name": "write file",
|
|
"filename": "filename",
|
|
"filenameType": "msg",
|
|
"appendNewline": true,
|
|
"createDir": false,
|
|
"overwriteFile": "true",
|
|
"encoding": "none",
|
|
"x": 460,
|
|
"y": 2400,
|
|
"wires": [
|
|
[
|
|
"ede79ed6b82aa804"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "faeff76a4321bee2",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "remove some buckets",
|
|
"property": "bucket",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "neq",
|
|
"v": "agenda",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 320,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"27e3bd6cada7b554"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "4163673982458b27",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "kernel - wrtie to InfluxDB",
|
|
"mode": "link",
|
|
"links": [
|
|
"b4dcaf3216134966"
|
|
],
|
|
"x": 2295,
|
|
"y": 2280,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "4280a1f889505f0c",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "kernel - write to InfluxDB",
|
|
"links": [
|
|
"4264ed01f3943e2f"
|
|
],
|
|
"x": 135,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"faeff76a4321bee2"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "27e3bd6cada7b554",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "remove some measurements",
|
|
"property": "measurement",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "neq",
|
|
"v": "config",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 600,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"e287e4f4d7f3a174"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7c75b6b921f30409",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "format boolean to dimmer",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "state",
|
|
"pt": "msg",
|
|
"to": "$number($boolean(msg.state))=0?0:99",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1310,
|
|
"y": 2160,
|
|
"wires": [
|
|
[
|
|
"58359ad51f36d68e",
|
|
"14a5f0183ce7ec8d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a98fde87c6b47e6e",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "select field",
|
|
"property": "field",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "eq",
|
|
"v": "pilot",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1770,
|
|
"y": 2160,
|
|
"wires": [
|
|
[
|
|
"5c4a3b8ce0220dd9"
|
|
],
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "61b310386916497a",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "kernel - write to influxdb",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 2390,
|
|
"y": 2160,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b43439c6ab36fbfc",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "delay 5 ms",
|
|
"pauseType": "delay",
|
|
"timeout": "5",
|
|
"timeoutUnits": "milliseconds",
|
|
"rate": "1",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 2150,
|
|
"y": 2280,
|
|
"wires": [
|
|
[
|
|
"61b310386916497a",
|
|
"0aca727fc835e615",
|
|
"4163673982458b27"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e287e4f4d7f3a174",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "payload to state",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "state",
|
|
"pt": "msg",
|
|
"to": "payload",
|
|
"tot": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 860,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"ec2704a8e18114ea"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ec2704a8e18114ea",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "is boolean",
|
|
"property": "state",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "istype",
|
|
"v": "boolean",
|
|
"vt": "boolean"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1070,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"7c75b6b921f30409"
|
|
],
|
|
[
|
|
"58359ad51f36d68e",
|
|
"14a5f0183ce7ec8d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "14a5f0183ce7ec8d",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "select measurements",
|
|
"property": "measurement",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "regex",
|
|
"v": "^(mode|clock|lighting|jarvis|thermostat|heating|shading|cumulus|airflow|linky)$",
|
|
"vt": "str",
|
|
"case": false
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1580,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"a98fde87c6b47e6e"
|
|
],
|
|
[
|
|
"5c4a3b8ce0220dd9"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "5c4a3b8ce0220dd9",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "by room",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "roomfield",
|
|
"pt": "msg",
|
|
"to": "msg.bucket&' '&msg.field",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "{\t 'bucket': 'resume',\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.roomfield : msg.state\t }\t }\t ]\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1960,
|
|
"y": 2220,
|
|
"wires": [
|
|
[
|
|
"b43439c6ab36fbfc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "58359ad51f36d68e",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3e71b89d61df9fd3",
|
|
"name": "by field",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "{\t 'bucket': msg.bucket,\t 'precision': 's',\t 'data': [\t {\t 'measurement': msg.measurement,\t 'fields': {\t msg.field : msg.state\t }\t }\t ]\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1540,
|
|
"y": 2280,
|
|
"wires": [
|
|
[
|
|
"b43439c6ab36fbfc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "c5465d5f64db4b45",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "6386e9a459469b53",
|
|
"name": "Kernel - write to MQTT",
|
|
"mode": "link",
|
|
"links": [
|
|
"d40db95f9a154c3a"
|
|
],
|
|
"x": 655,
|
|
"y": 2040,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "1cbff7f3a7317c5b",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "6386e9a459469b53",
|
|
"name": "kernel - write to MQTT",
|
|
"links": [
|
|
"4264ed01f3943e2f"
|
|
],
|
|
"x": 135,
|
|
"y": 2040,
|
|
"wires": [
|
|
[
|
|
"b425ab40ef97a294"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "4176c5d5bc97709c",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "6386e9a459469b53",
|
|
"name": "delay 5 ms",
|
|
"pauseType": "delay",
|
|
"timeout": "5",
|
|
"timeoutUnits": "milliseconds",
|
|
"rate": "1",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 510,
|
|
"y": 2040,
|
|
"wires": [
|
|
[
|
|
"1102208726a88a10",
|
|
"c5465d5f64db4b45"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1102208726a88a10",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "6386e9a459469b53",
|
|
"name": "kernel - write to MQTT",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 740,
|
|
"y": 1980,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b425ab40ef97a294",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "6386e9a459469b53",
|
|
"name": "set MQTT topic",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "automate",
|
|
"pt": "msg",
|
|
"to": "about.automate",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "topic",
|
|
"pt": "msg",
|
|
"to": "msg.automate&\"/\"&msg.bucket&\"/\"&msg.measurement&\"/\"&msg.field",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "automate",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 300,
|
|
"y": 2040,
|
|
"wires": [
|
|
[
|
|
"4176c5d5bc97709c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "592483f2183c6711",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "kernel - write to journal",
|
|
"mode": "link",
|
|
"links": [
|
|
"b105c14c0fdc8160"
|
|
],
|
|
"x": 535,
|
|
"y": 1680,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "c5dc4f8c357a596f",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "kernel - write to journal",
|
|
"links": [
|
|
"4264ed01f3943e2f"
|
|
],
|
|
"x": 135,
|
|
"y": 1680,
|
|
"wires": [
|
|
[
|
|
"e4e85a27e4775ac9"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "074313bb4e48de6f",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "journal console only seen",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 930,
|
|
"y": 1800,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "a441e9df790a0c3c",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "journal console only thermostat",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 950,
|
|
"y": 1740,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "285c9ffa2f524440",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "journal console others",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 920,
|
|
"y": 1860,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "234620fe148e1dca",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "journal console only linky and power",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 970,
|
|
"y": 1680,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "5a49d1f4b12618a7",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "select measurement",
|
|
"property": "measurement",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "regex",
|
|
"v": "^(power|linky)$",
|
|
"vt": "str",
|
|
"case": false
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "thermostat",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "seen",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 4,
|
|
"x": 620,
|
|
"y": 1740,
|
|
"wires": [
|
|
[
|
|
"234620fe148e1dca"
|
|
],
|
|
[
|
|
"a441e9df790a0c3c"
|
|
],
|
|
[
|
|
"074313bb4e48de6f"
|
|
],
|
|
[
|
|
"285c9ffa2f524440"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e4e85a27e4775ac9",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e9bd98a0b6e0d58c",
|
|
"name": "set human readable payload",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "payload",
|
|
"pt": "msg",
|
|
"to": "msg.bucket & ' > ' & msg.measurement & ' > ' & msg.field & ' = ' & $string(msg.payload)",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 340,
|
|
"y": 1680,
|
|
"wires": [
|
|
[
|
|
"5a49d1f4b12618a7",
|
|
"592483f2183c6711"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e6a4e861a99b196c",
|
|
"type": "function",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "set gate message",
|
|
"func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload': msg.payload\n};\n\nreturn newmsg;",
|
|
"outputs": 1,
|
|
"timeout": "",
|
|
"noerr": 0,
|
|
"initialize": "\n",
|
|
"finalize": "\n",
|
|
"libs": [],
|
|
"x": 5030,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"c15d0c66ed5af79f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "12f02c43a82b46f9",
|
|
"type": "gate",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"controlTopic": "gate",
|
|
"defaultState": "closed",
|
|
"openCmd": "open",
|
|
"closeCmd": "close",
|
|
"toggleCmd": "toggle",
|
|
"defaultCmd": "default",
|
|
"statusCmd": "status",
|
|
"persist": false,
|
|
"storeName": "default",
|
|
"x": 270,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"4689a4035be0c82e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "68ad3074767eb2c3",
|
|
"type": "msg-speed",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "read msg speed",
|
|
"frequency": "sec",
|
|
"interval": 1,
|
|
"estimation": false,
|
|
"ignore": false,
|
|
"pauseAtStartup": false,
|
|
"topicDependent": false,
|
|
"x": 3820,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"c785aed10e83430a",
|
|
"fc88fb69cac1e5a5"
|
|
],
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "56d131373d4e2f78",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"links": [
|
|
"7662aba4a1cc9dd0"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 1700,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"3743db17cb401840"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3a4c72588bb27ab4",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"links": [
|
|
"4f02d67d81a83e86"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 1450,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"3743db17cb401840"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "357c6d106dec5efd",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"links": [
|
|
"bc396dcc308c42ee"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 1450,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"56d131373d4e2f78"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "8bbf418d277b4df7",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"links": [
|
|
"e112327c4a55aa35"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 1450,
|
|
"y": 1500,
|
|
"wires": [
|
|
[
|
|
"56d131373d4e2f78"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e2ef5706b35de7b0",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "",
|
|
"links": [
|
|
"a72b20551a3b1f8c"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 1450,
|
|
"y": 1320,
|
|
"wires": [
|
|
[
|
|
"3743db17cb401840"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "c15d0c66ed5af79f",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric - rate",
|
|
"mode": "link",
|
|
"links": [
|
|
"baaac9a301ef150a",
|
|
"117fb09fe859797f"
|
|
],
|
|
"x": 5195,
|
|
"y": 1380,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "4264ed01f3943e2f",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric - write",
|
|
"mode": "link",
|
|
"links": [
|
|
"c5dc4f8c357a596f",
|
|
"1cbff7f3a7317c5b",
|
|
"4280a1f889505f0c"
|
|
],
|
|
"x": 5195,
|
|
"y": 1320,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "031a6afd8300356a",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric - loop",
|
|
"mode": "link",
|
|
"links": [
|
|
"7d45ca7ad7f363fe",
|
|
"b6c03b0d5a9952c9",
|
|
"3ec4a86ec9ec37f6",
|
|
"9115d56d55c93df5",
|
|
"d7b772643055b543",
|
|
"836e500a2c7822c7",
|
|
"490e37ccfca71dba",
|
|
"54bfe450e2c0b4c4",
|
|
"89feb0a79db2f26b",
|
|
"7e386532c9061f5e",
|
|
"8a93715d93e96ec9",
|
|
"be031b830d435b36",
|
|
"11474b42d0af96e8",
|
|
"11cf1061a2c539a1",
|
|
"266e831763ed3b77",
|
|
"8bbf52c2a83e09ea",
|
|
"3099e4a17fd21410",
|
|
"5cb2a229a6fec1aa",
|
|
"7efac7e387d141ec",
|
|
"16f4d5aef15c6bdd",
|
|
"5b890ebe6c97c558",
|
|
"5e1f61b100dc5e9f",
|
|
"40fba6c8db067ba4",
|
|
"e5af9cdb8ad1782f",
|
|
"9d534295bf79c9ea",
|
|
"a9620e892125509b",
|
|
"1c148e0bd7c295b9",
|
|
"f9c15b253d5cfe9e",
|
|
"0a53f27ca3a07d20",
|
|
"2f88f0a1be78ca59",
|
|
"03f7e26d1b1288fc",
|
|
"88b4e25b46ebf594",
|
|
"64efc8a9e8807f11",
|
|
"8f53b8eccaa53c4d",
|
|
"494718f442ad9e57",
|
|
"41c360fc4fbb160a",
|
|
"2b51f6d2b81ca6e1",
|
|
"a907c7cf0dc2321a",
|
|
"1c1e708588c48cb5",
|
|
"bba3f0353d4702db",
|
|
"8049d5f40acf0d6d",
|
|
"d7eda7ed1f610f4e",
|
|
"4dc06cde57a95b67",
|
|
"2e1d939d984571fe",
|
|
"1e101e88455caf6a",
|
|
"2e69629cbed4769a",
|
|
"38b14b135a076818",
|
|
"b6335ea10e33770a",
|
|
"35f16b1c6d64b20e",
|
|
"4335202ca878a5da",
|
|
"d60df3cdcb5355ed",
|
|
"b127f9b286dd8226",
|
|
"e01a6d6bba78f910",
|
|
"53ce8727ed8bebf5",
|
|
"1ff40807621f73c2",
|
|
"7d917be95d53a6f9",
|
|
"146c30524040e1a6",
|
|
"dbcbd35c164eb721",
|
|
"f95bc9bfa5be39a7",
|
|
"2b3309b59a846a67",
|
|
"04e335778f6bc84c",
|
|
"ca0c4d5f0ff6058d",
|
|
"a28264f20b2cf5f2",
|
|
"371e0dec06aeef70",
|
|
"7ab6751fb11b15ea",
|
|
"0b2a82c8c72139f4",
|
|
"013bf83f6e610dc9",
|
|
"2b971632d5bc1ff9",
|
|
"dc8f25b6384a7675",
|
|
"0f92a16252f1df75",
|
|
"7a8026935b002ae6",
|
|
"7237fd47764d31cf",
|
|
"92e8127b07ec1189",
|
|
"617d4124d86bfdac",
|
|
"ca7fc23ad69449e2",
|
|
"7776980b147e962e",
|
|
"bbdfc8668282860e",
|
|
"78cb242c2c455e90",
|
|
"2dc931335063149f",
|
|
"bdd43096dd5eab70",
|
|
"09baf70e95e7762d"
|
|
],
|
|
"x": 5195,
|
|
"y": 1260,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "206c1fb4a48067df",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric",
|
|
"links": [
|
|
"8fdb5986494986cc",
|
|
"e12bb3f8258f4439",
|
|
"f02b4584af0d800c",
|
|
"06581753b7673f83",
|
|
"116de42631d4b17a",
|
|
"9a20f95447f8ddfd",
|
|
"349f3c40d1c1b12e",
|
|
"bf58597579fa65ac",
|
|
"4746f7254a82e9bc",
|
|
"5ba738211e0c4eac",
|
|
"9a98ec99a05b6bd2",
|
|
"cf471b8980158bc0",
|
|
"c2dc31e0130a863a",
|
|
"ec3963cba00585e6",
|
|
"a33484931cee65b0",
|
|
"9a7fb4052f4efa9d",
|
|
"a97c1309cdf39d94",
|
|
"d16064888745aca6",
|
|
"3d7533b312eee22a",
|
|
"884976027c7e86a2",
|
|
"cfeaa3a9e12b40eb",
|
|
"34e6817c2f435667",
|
|
"6fbdfc1ab44f9754",
|
|
"d09ad27d05d54698",
|
|
"7869c56dce3123ed",
|
|
"1717b4b42c3de1df",
|
|
"d5cdd8f60040d125",
|
|
"e01b2ed76f5813e5",
|
|
"981daf7e528f93a4",
|
|
"76bd8af6b6128264",
|
|
"ec965b4258cf0125",
|
|
"930ec55bdd15ae80",
|
|
"437fa0c2d577fbc9",
|
|
"954579d4fb332d8c",
|
|
"de7075aaec1a9391",
|
|
"1b1e4074f6d9749c",
|
|
"a9d7bde021ec65e2",
|
|
"e267a0404a5c5d6c",
|
|
"2dfb1d687d5296d6",
|
|
"bbae4d26e41478ea",
|
|
"697e3a94eb990433",
|
|
"f7dcd2b0b67ae95c",
|
|
"2429a24772c36d60",
|
|
"d93e314f6f15bc41",
|
|
"a15d4c93182b57f1",
|
|
"f1e3a6f1f9824e38",
|
|
"a67b460e38395a75",
|
|
"e0ee48357ee30544",
|
|
"a77aed8f8b21898e",
|
|
"05737da6290cf8d9",
|
|
"c469093ebb0005f9",
|
|
"43971c69a84860cb",
|
|
"0341dba34c381ced",
|
|
"8fdc0ab2b7fadb49",
|
|
"a8efaaef95728c79",
|
|
"352ea3978e6f1b59",
|
|
"e0395c593211c049",
|
|
"a0900ecba7483912",
|
|
"75e409ff7d8f6f73",
|
|
"ad12f9079d717f76",
|
|
"c13658af805aed99",
|
|
"645a5c37a7442a3a",
|
|
"d31b51e2d671597c",
|
|
"b0c372c9dde0c728",
|
|
"d8b71de8a6215fed",
|
|
"8784a0f9a054e833",
|
|
"8862ebb60d770b07"
|
|
],
|
|
"x": 135,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"12f02c43a82b46f9"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d7f0ba2534f27b82",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "Si plus de 12 messages par seconde pendant 4 secondes alors bloque le kernel pendant 1 seconde",
|
|
"info": "",
|
|
"x": 4380,
|
|
"y": 1560,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ca80e5fe27609a11",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "wait 4 s then true",
|
|
"op1": "",
|
|
"op2": "true",
|
|
"op1type": "nul",
|
|
"op2type": "bool",
|
|
"duration": "4",
|
|
"extend": false,
|
|
"overrideDelay": false,
|
|
"units": "s",
|
|
"reset": "",
|
|
"bytopic": "all",
|
|
"topic": "topic",
|
|
"outputs": 1,
|
|
"x": 4570,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"0d78bebcc5541e02"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "6466ac9bacd083e2",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "reset",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "reset",
|
|
"pt": "msg",
|
|
"to": "true",
|
|
"tot": "bool"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 4370,
|
|
"y": 1500,
|
|
"wires": [
|
|
[
|
|
"ca80e5fe27609a11"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "4689a4035be0c82e",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "set source",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "automate",
|
|
"pt": "msg",
|
|
"to": "about.automate",
|
|
"tot": "global"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "source",
|
|
"pt": "msg",
|
|
"to": "msg.source=msg.automate?msg.source:\"loop\"",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "automate",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 450,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"82229e46e51f94f5"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "895db12fd6d94a67",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "remove source",
|
|
"rules": [
|
|
{
|
|
"t": "delete",
|
|
"p": "source",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 5040,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"031a6afd8300356a"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "82229e46e51f94f5",
|
|
"type": "function",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check metric",
|
|
"func": "// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// try if msg.topic is a path\nif (typeof msg.topic === 'string' &&\n typeof msg.bucket === 'undefined' &&\n typeof msg.measurement === 'undefined' &&\n typeof msg.field === 'undefined'\n) {\n const device = msg.topic.split('/');\n if (typeof device[1] === 'string' &&\n typeof device[2] === 'string' &&\n typeof device[3] === 'string'\n ) {\n msg.source = device[0];\n msg.bucket = device[1];\n msg.measurement = device[2];\n msg.field = device[3];\n\n }\n}\n\n// check var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'topic': 'metric',\n 'source': typeof msg.source === 'string' ? msg.source : 'unknow',\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.payload,\n 'repeat': typeof msg.repeat === 'boolean' ? msg.repeat : false\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.source + ' : ' + newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];",
|
|
"outputs": 2,
|
|
"timeout": "",
|
|
"noerr": 0,
|
|
"initialize": "",
|
|
"finalize": "",
|
|
"libs": [],
|
|
"x": 650,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"7cd303d0aadd1433"
|
|
],
|
|
[
|
|
"a974cddec777bd94"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "fc88fb69cac1e5a5",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "limit 1 msg / s",
|
|
"pauseType": "rate",
|
|
"timeout": "5",
|
|
"timeoutUnits": "seconds",
|
|
"rate": "1",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": true,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 4080,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"e6a4e861a99b196c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0d78bebcc5541e02",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "set gate payload",
|
|
"op1": "close",
|
|
"op2": "open",
|
|
"op1type": "str",
|
|
"op2type": "str",
|
|
"duration": "1",
|
|
"extend": true,
|
|
"overrideDelay": false,
|
|
"units": "s",
|
|
"reset": "",
|
|
"bytopic": "all",
|
|
"topic": "topic",
|
|
"outputs": 1,
|
|
"x": 4800,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"e6a4e861a99b196c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3c3fe996c199516b",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "delay 50 ms",
|
|
"pauseType": "delay",
|
|
"timeout": "50",
|
|
"timeoutUnits": "milliseconds",
|
|
"rate": "1",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 3070,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"b90652e7f7d28f66"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "c785aed10e83430a",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check speed limit of 12 msg/s",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "gt",
|
|
"v": "12",
|
|
"vt": "num"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 4130,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"ca80e5fe27609a11"
|
|
],
|
|
[
|
|
"6466ac9bacd083e2"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9f055c7cccb634c1",
|
|
"type": "delay",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "limit 12 msg / s",
|
|
"pauseType": "rate",
|
|
"timeout": "250",
|
|
"timeoutUnits": "milliseconds",
|
|
"rate": "12",
|
|
"nbRateUnits": "1",
|
|
"rateUnits": "second",
|
|
"randomFirst": "1",
|
|
"randomLast": "5",
|
|
"randomUnits": "seconds",
|
|
"drop": false,
|
|
"allowrate": false,
|
|
"outputs": 1,
|
|
"x": 5040,
|
|
"y": 1320,
|
|
"wires": [
|
|
[
|
|
"4264ed01f3943e2f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b90652e7f7d28f66",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "compare timestamp",
|
|
"property": "#:(memoryOnly)::timestamps[msg.bucket][msg.measurement][msg.field]",
|
|
"propertyType": "flow",
|
|
"rules": [
|
|
{
|
|
"t": "lt",
|
|
"v": "$millis() - 3600000",
|
|
"vt": "jsonata"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 3290,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"582f8e6b17a9d9d1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "ae5e8ae05adac7fd",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check request repeat",
|
|
"property": "repeat",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "true"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 2840,
|
|
"y": 1440,
|
|
"wires": [
|
|
[
|
|
"582f8e6b17a9d9d1"
|
|
],
|
|
[
|
|
"3c3fe996c199516b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "0831bd7e7daa4915",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check mode automate",
|
|
"property": "metrics.systeme.mode.automate",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "neq",
|
|
"v": "off",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 2840,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"582f8e6b17a9d9d1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "dd79805b7971cbbb",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "select \"cible\" measurment",
|
|
"property": "measurement",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "eq",
|
|
"v": "cible",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 2570,
|
|
"y": 1380,
|
|
"wires": [
|
|
[
|
|
"0831bd7e7daa4915"
|
|
],
|
|
[
|
|
"ae5e8ae05adac7fd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "582f8e6b17a9d9d1",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "set metric to global metrics",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "metrics[msg.bucket][msg.measurement][msg.field]",
|
|
"pt": "global",
|
|
"to": "payload",
|
|
"tot": "msg"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "timestamps[msg.bucket][msg.measurement][msg.field]",
|
|
"pt": "flow",
|
|
"to": "$millis()",
|
|
"tot": "jsonata"
|
|
},
|
|
{
|
|
"t": "delete",
|
|
"p": "repeat",
|
|
"pt": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 3560,
|
|
"y": 1320,
|
|
"wires": [
|
|
[
|
|
"68ad3074767eb2c3",
|
|
"9f055c7cccb634c1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "6473c46ecd9304c7",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check if value is different from global metric",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "neq",
|
|
"v": "metrics[msg.bucket][msg.measurement][msg.field]",
|
|
"vt": "global"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 2230,
|
|
"y": 1320,
|
|
"wires": [
|
|
[
|
|
"582f8e6b17a9d9d1"
|
|
],
|
|
[
|
|
"dd79805b7971cbbb"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3743db17cb401840",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "select source",
|
|
"property": "source",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "neq",
|
|
"v": "loop",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1930,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"895db12fd6d94a67"
|
|
],
|
|
[
|
|
"6473c46ecd9304c7"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1e908b6060a584ea",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "select metric format",
|
|
"property": "devices[msg.bucket][msg.measurement][msg.field]format",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "eq",
|
|
"v": "text",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "boolean",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "dimmer",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "percent",
|
|
"vt": "str"
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "number",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 5,
|
|
"x": 1210,
|
|
"y": 1320,
|
|
"wires": [
|
|
[
|
|
"3743db17cb401840"
|
|
],
|
|
[
|
|
"e2ef5706b35de7b0"
|
|
],
|
|
[
|
|
"3a4c72588bb27ab4"
|
|
],
|
|
[
|
|
"357c6d106dec5efd"
|
|
],
|
|
[
|
|
"8bbf418d277b4df7"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "eca0e6f3657f0564",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric undefined",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1230,
|
|
"y": 1200,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "7cd303d0aadd1433",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "kernel - metric uncomplete",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 900,
|
|
"y": 1200,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "a974cddec777bd94",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "20b116b788ef3f27",
|
|
"name": "check if global devices has metric",
|
|
"property": "devices[msg.bucket][msg.measurement][msg.field]",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 920,
|
|
"y": 1260,
|
|
"wires": [
|
|
[
|
|
"eca0e6f3657f0564"
|
|
],
|
|
[
|
|
"1e908b6060a584ea"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "8fdb5986494986cc",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "kernel - gate",
|
|
"mode": "link",
|
|
"links": [
|
|
"206c1fb4a48067df",
|
|
"af148bf44b019b35",
|
|
"735774bdb56f6be4",
|
|
"fb76731a2064ad65",
|
|
"3423fd727184042c",
|
|
"be2acafce4c2c74d",
|
|
"1d8f71c67df6cec9",
|
|
"af3082ef59725979",
|
|
"8f3269222142f0f4",
|
|
"ba0f26a893bbaac2"
|
|
],
|
|
"x": 995,
|
|
"y": 1020,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "baaac9a301ef150a",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "kernel - gate",
|
|
"links": [
|
|
"94c79b8f52f0b6ba",
|
|
"c15d0c66ed5af79f",
|
|
"aa2c3406c988ef4b"
|
|
],
|
|
"x": 135,
|
|
"y": 1020,
|
|
"wires": [
|
|
[
|
|
"149401230ed2ed4c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "85ea82a3282907b1",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "kernel - gate",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1050,
|
|
"y": 960,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "19dc49123e66ac71",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "check gate payload",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "regex",
|
|
"v": "open|close",
|
|
"vt": "str",
|
|
"case": false
|
|
},
|
|
{
|
|
"t": "eq",
|
|
"v": "freeze",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 530,
|
|
"y": 1020,
|
|
"wires": [
|
|
[
|
|
"85ea82a3282907b1",
|
|
"8fdb5986494986cc"
|
|
],
|
|
[
|
|
"1eea209368626bc1"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1eea209368626bc1",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "freeze gate for 10 secondes",
|
|
"op1": "close",
|
|
"op2": "open",
|
|
"op1type": "str",
|
|
"op2type": "str",
|
|
"duration": "10",
|
|
"extend": true,
|
|
"overrideDelay": false,
|
|
"units": "s",
|
|
"reset": "",
|
|
"bytopic": "all",
|
|
"topic": "topic",
|
|
"outputs": 1,
|
|
"x": 800,
|
|
"y": 1080,
|
|
"wires": [
|
|
[
|
|
"85ea82a3282907b1",
|
|
"8fdb5986494986cc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "149401230ed2ed4c",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3711bd3352570a6c",
|
|
"name": "check gate topic",
|
|
"property": "topic",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "eq",
|
|
"v": "gate",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 300,
|
|
"y": 1020,
|
|
"wires": [
|
|
[
|
|
"19dc49123e66ac71"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2ba23548e87b0292",
|
|
"type": "function",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "set gate message",
|
|
"func": "// script var\nvar msg = msg;\nvar newmsg = {};\n\n// recreate msg\nnewmsg = {\n 'topic':'gate',\n 'payload':'open'\n};\n\nreturn newmsg;",
|
|
"outputs": 1,
|
|
"timeout": "",
|
|
"noerr": 0,
|
|
"initialize": "\n",
|
|
"finalize": "\n",
|
|
"libs": [],
|
|
"x": 1150,
|
|
"y": 780,
|
|
"wires": [
|
|
[
|
|
"2dedf503efee73c8",
|
|
"94c79b8f52f0b6ba"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3cd44612df58e32f",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "launch devices configuration cycle",
|
|
"info": "",
|
|
"x": 640,
|
|
"y": 360,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "8413c966166387ab",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "launch complete cycle",
|
|
"info": "",
|
|
"x": 600,
|
|
"y": 300,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "92f76d0a8a4f1178",
|
|
"type": "comment",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "reset all global variables and launch complete cycle",
|
|
"info": "",
|
|
"x": 690,
|
|
"y": 240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ee66fb38bde2fdf4",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "kernel - automate load",
|
|
"mode": "link",
|
|
"links": [
|
|
"7c98833082d48029"
|
|
],
|
|
"x": 375,
|
|
"y": 360,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "cd2ac560f85327a9",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "automate load",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"x": 210,
|
|
"y": 360,
|
|
"wires": [
|
|
[
|
|
"ee66fb38bde2fdf4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "94c79b8f52f0b6ba",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "kernel - device",
|
|
"mode": "link",
|
|
"links": [
|
|
"baaac9a301ef150a",
|
|
"33f7a250a7341c43",
|
|
"290e5853a51cb170",
|
|
"06976c9133796ab8",
|
|
"ae364154f775506a",
|
|
"35b93554c4c3380f",
|
|
"62056c26d5ec8e87",
|
|
"3cc31621bae4b8f4",
|
|
"9fffdbd918ac2457",
|
|
"7a340e512e7cec9a",
|
|
"775013411d26e549",
|
|
"12ee535e8df383e4",
|
|
"baa85c145ba7e3cd",
|
|
"d301485b0e0dced0",
|
|
"5e387209f4a1be63",
|
|
"f1d9b13e80b9da4c",
|
|
"f33d7419f0933e00",
|
|
"9c9fde57b61d7940",
|
|
"bf4f0e66f58b0244",
|
|
"c9f8f3d06381d3b2",
|
|
"e66b05819afe5f9b",
|
|
"284f816c5e8bbfec",
|
|
"fe346a68ed6e7772",
|
|
"ad55dad3f3184232"
|
|
],
|
|
"x": 1315,
|
|
"y": 780,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "bfa594bf1f876c92",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "kernel - device",
|
|
"links": [
|
|
"7f76434616f622dc",
|
|
"80459ca7317cce90",
|
|
"8d6827df412a4059",
|
|
"11010cbbc6f9b2c8",
|
|
"832cdc9413fa68e9",
|
|
"e6ea054f0c263d05",
|
|
"2a688b0630f5cca4",
|
|
"c726ae1ce799b0e5",
|
|
"b943866ac0bfd44c",
|
|
"ece815da9a3e1dab",
|
|
"209e2b300932e1ce",
|
|
"1d8bf8108e8ed2cc",
|
|
"51101010f440af18",
|
|
"83efec5c7865bc6b",
|
|
"d28f44d60a337af9",
|
|
"578976906b639a1f",
|
|
"ad43a0610ba77d34",
|
|
"17b39beef9bff4b1",
|
|
"4820c8ccc02ce067",
|
|
"f410fe38cd8f7bac",
|
|
"9fa653a9386bb2e5",
|
|
"ad5fb20957fedf7a",
|
|
"c205d9011b1d755d",
|
|
"89f3d6996d451326",
|
|
"6d1ed5ed6224be09",
|
|
"d0cdac452033d9a2",
|
|
"42f17a35a7d311ab",
|
|
"56833e1ff5565e6b",
|
|
"6d8b9ac84c8dc897",
|
|
"20c8bf0069977a11",
|
|
"ef0e9a242ec12c56",
|
|
"ff10168a22e047ee",
|
|
"d5927599e8114a95",
|
|
"100b75c92fbd601d",
|
|
"4e3ee2464a6b28f4",
|
|
"6dc8754b02a8e394",
|
|
"b8690e2acb308498",
|
|
"fdd7ba07c8184ce8",
|
|
"ed98374ec783034a",
|
|
"d47a5d29139aca1c",
|
|
"ebe2f8029bf3db01",
|
|
"ccd530a40dec79f3",
|
|
"021ed4766414be0d",
|
|
"035654b1d4cd63d6",
|
|
"0de5b7fcdb0aa040",
|
|
"6afea9dc42323877",
|
|
"05e8fa641a3e8478",
|
|
"8f8a3cf8eff18bc0",
|
|
"ec9a2ee558dee047"
|
|
],
|
|
"x": 135,
|
|
"y": 780,
|
|
"wires": [
|
|
[
|
|
"fabb645e0d88c91c"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2dedf503efee73c8",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "kernel - device",
|
|
"active": false,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "payload",
|
|
"targetType": "msg",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 1380,
|
|
"y": 720,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "e5f9a77af592fc78",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "wait for all devices registration",
|
|
"op1": "",
|
|
"op2": "true",
|
|
"op1type": "nul",
|
|
"op2type": "bool",
|
|
"duration": "50",
|
|
"extend": true,
|
|
"overrideDelay": false,
|
|
"units": "ms",
|
|
"reset": "",
|
|
"bytopic": "all",
|
|
"topic": "topic",
|
|
"outputs": 1,
|
|
"x": 870,
|
|
"y": 780,
|
|
"wires": [
|
|
[
|
|
"2ba23548e87b0292"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "35c936be0ce55676",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "register device to global metrics",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "metrics[msg.bucket][msg.measurement][msg.field]",
|
|
"pt": "global",
|
|
"to": "payload",
|
|
"tot": "msg"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1230,
|
|
"y": 840,
|
|
"wires": [
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "c1d2a5b213c6568a",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "check if device exists in global metrics",
|
|
"property": "metrics[msg.bucket][msg.measurement][msg.field]",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 1,
|
|
"x": 890,
|
|
"y": 840,
|
|
"wires": [
|
|
[
|
|
"35c936be0ce55676"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "6d65af0eaae695a3",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "kernel - device uncomplete",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 540,
|
|
"y": 720,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d3ac50a83c871cc8",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "register device to global devices",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "devices[msg.bucket][msg.measurement][msg.field]",
|
|
"pt": "global",
|
|
"to": "{\t 'default':msg.payload,\t 'format':msg.format,\t 'protocol':msg.protocol,\t 'model':msg.model,\t 'option':msg.option,\t 'id':msg.id\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 550,
|
|
"y": 780,
|
|
"wires": [
|
|
[
|
|
"c1d2a5b213c6568a",
|
|
"e5f9a77af592fc78"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "fabb645e0d88c91c",
|
|
"type": "function",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "bbf7bb18989048e1",
|
|
"name": "check device",
|
|
"func": "// Check and recreate clean message of device description\n// output 1 : error message\n// output 2 : device registration\n\n// script var\nvar msg = msg;\nvar newmsg = {};\n\n// no message\nif (typeof msg === 'undefined'){\n return [null,null];\n}\n\n// check possible var existence\nif (typeof msg.bucket === 'undefined' ||\n typeof msg.measurement === 'undefined' ||\n typeof msg.field === 'undefined' ||\n typeof msg.format === 'undefined' ||\n typeof msg.default === 'undefined'\n) {\n node.status({\n fill: \"red\", shape: \"ring\", text: 'undefined device'});\n return [msg,null];\n}\n\n// recreate msg\nnewmsg = {\n 'bucket': msg.bucket,\n 'measurement': msg.measurement,\n 'field': msg.field,\n 'format': msg.format,\n 'path': msg.bucket + '/' + msg.measurement + '/' + msg.field,\n 'payload': msg.default,\n\n 'protocol': typeof msg.protocol === 'undefined' ? '' : msg.protocol,\n 'model': typeof msg.model === 'undefined' ? '' : msg.model,\n 'id': typeof msg.id === 'undefined' ? '' : msg.id,\n 'option': typeof msg.option === 'undefined' ? 0 : msg.option\n};\n\nnode.status({ fill: 'green', shape: \"ring\", text: newmsg.path + ' = ' + newmsg.payload });\nreturn [null,newmsg];",
|
|
"outputs": 2,
|
|
"timeout": "",
|
|
"noerr": 0,
|
|
"initialize": "\n",
|
|
"finalize": "\n",
|
|
"libs": [],
|
|
"x": 290,
|
|
"y": 780,
|
|
"wires": [
|
|
[
|
|
"6d65af0eaae695a3"
|
|
],
|
|
[
|
|
"d3ac50a83c871cc8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e68b067b48b94ca2",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "kernel - automate start",
|
|
"mode": "link",
|
|
"links": [
|
|
"92dac97dfb662f2d"
|
|
],
|
|
"x": 375,
|
|
"y": 300,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "acd42b52bd581740",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "kernel - automate reset",
|
|
"mode": "link",
|
|
"links": [
|
|
"d74bb73a0966b4bd"
|
|
],
|
|
"x": 375,
|
|
"y": 240,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "d74bb73a0966b4bd",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "kernel - boot - reset",
|
|
"links": [
|
|
"acd42b52bd581740"
|
|
],
|
|
"x": 135,
|
|
"y": 480,
|
|
"wires": [
|
|
[
|
|
"f7b2d28d9c7d66ae"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "92dac97dfb662f2d",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "kernel - boot - start",
|
|
"links": [
|
|
"e68b067b48b94ca2"
|
|
],
|
|
"x": 135,
|
|
"y": 540,
|
|
"wires": [
|
|
[
|
|
"464bfd100a5740b8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b0f54ce6c23c6da6",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "define global timers",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "timers",
|
|
"pt": "global",
|
|
"to": "{}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1670,
|
|
"y": 480,
|
|
"wires": [
|
|
[
|
|
"cb09b67a37901112"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "011c5e62deb510bb",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "check if global timers exists",
|
|
"property": "timers",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1400,
|
|
"y": 540,
|
|
"wires": [
|
|
[
|
|
"b0f54ce6c23c6da6"
|
|
],
|
|
[
|
|
"cb09b67a37901112"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "4bab6cfef1e2c932",
|
|
"type": "link call",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "",
|
|
"links": [
|
|
"797eac89000183db"
|
|
],
|
|
"linkType": "static",
|
|
"timeout": "30",
|
|
"x": 860,
|
|
"y": 540,
|
|
"wires": [
|
|
[
|
|
"3e652e3da2c711ec"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "df1059b56622c582",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "automate reset",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"x": 220,
|
|
"y": 240,
|
|
"wires": [
|
|
[
|
|
"acd42b52bd581740"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7c98833082d48029",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "kernel - boot - load",
|
|
"links": [
|
|
"ee66fb38bde2fdf4",
|
|
"afd6a49ad55de215",
|
|
"68a233d0b60bf782",
|
|
"3088a9f9a1d45b09",
|
|
"72f3d70342e83655",
|
|
"fdea9ff531a587a8",
|
|
"1d9d8c969ccdf2be"
|
|
],
|
|
"x": 135,
|
|
"y": 600,
|
|
"wires": [
|
|
[
|
|
"3308d2aa53cd0bbd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "25445f5a9b787a0a",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "kernel - boot",
|
|
"mode": "link",
|
|
"links": [
|
|
"eed8990163b1ca81",
|
|
"4e6003732b266fe2",
|
|
"4bec446170e0294c",
|
|
"ef0d3b8996ec469c",
|
|
"804c8129107645c1",
|
|
"05787fb2b77146c8",
|
|
"5d277429bd835728",
|
|
"5c64177e3bbfd337",
|
|
"c13917bf46188642",
|
|
"30497b91559e19be",
|
|
"88c0a82bdddf789a",
|
|
"3520d6c943a27bd7",
|
|
"f77161cc0db67bcc",
|
|
"12524f8ba90c6cdc",
|
|
"de134f8b977ac772",
|
|
"4d7778e0678c41e6",
|
|
"3a2f314ba935d912",
|
|
"d7c09b7acb97a3f4",
|
|
"4f436f02ac97f81c",
|
|
"45ebf96bc050779f",
|
|
"a629c78a79a3ee17",
|
|
"65725013d8d62c50",
|
|
"1961ac6e5cc5b6de",
|
|
"12b4bbe2a3116456",
|
|
"77101da728821929",
|
|
"b82fc05a14b170cf",
|
|
"30b79bef19c885d0",
|
|
"1f0752e42a5e6a86",
|
|
"a7ec84c30a5b9423",
|
|
"cf9ef266c6a8ce02",
|
|
"7544f23d7669ef75",
|
|
"06a2c66e1e278b6a",
|
|
"c0f802fd747208b3",
|
|
"d129c40c48c09bac",
|
|
"87bee795cb96b8ec",
|
|
"2260fb9363658a31",
|
|
"f69e62af3ec487cd",
|
|
"633ef89ae7ff3aac",
|
|
"c622c7d8b085a6d6",
|
|
"13a75f13ba9ce529",
|
|
"65c543a69d403cd7",
|
|
"244bd83e904aba26"
|
|
],
|
|
"x": 2295,
|
|
"y": 600,
|
|
"wires": []
|
|
},
|
|
{
|
|
"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": [
|
|
[
|
|
"3308d2aa53cd0bbd"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"t": "set",
|
|
"p": "buckets",
|
|
"pt": "global",
|
|
"to": "{}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 1110,
|
|
"y": 540,
|
|
"wires": [
|
|
[
|
|
"011c5e62deb510bb"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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": "464bfd100a5740b8",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "check if global metrics exists",
|
|
"property": "metrics",
|
|
"propertyType": "global",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 340,
|
|
"y": 540,
|
|
"wires": [
|
|
[
|
|
"f7b2d28d9c7d66ae"
|
|
],
|
|
[
|
|
"4bab6cfef1e2c932"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "324b4e5e9a9419cc",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "9ea365cc69a1f2bf",
|
|
"name": "automate start",
|
|
"props": [],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": true,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"x": 220,
|
|
"y": 300,
|
|
"wires": [
|
|
[
|
|
"e68b067b48b94ca2"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d248a5e5ab11c9d7",
|
|
"type": "catch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "648d078d534a93be",
|
|
"name": "catch error",
|
|
"scope": null,
|
|
"uncaught": false,
|
|
"x": 620,
|
|
"y": 60,
|
|
"wires": [
|
|
[
|
|
"4781986f3e559778"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"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 'lang':'fr'\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 270,
|
|
"y": 60,
|
|
"wires": [
|
|
[
|
|
"d49116054bd5cd56"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "d49116054bd5cd56",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "818a8590288d6409",
|
|
"name": "kernel - about",
|
|
"mode": "return",
|
|
"links": [],
|
|
"x": 395,
|
|
"y": 60,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "797eac89000183db",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "818a8590288d6409",
|
|
"name": "kernel - about",
|
|
"links": [],
|
|
"x": 135,
|
|
"y": 60,
|
|
"wires": [
|
|
[
|
|
"d9b8f97fb0897586"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "a52f0e788cd4dca3",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e456c4e7cfd87c26",
|
|
"name": "kernel - catch error",
|
|
"links": [
|
|
"1ee8ceb3125ebd76",
|
|
"243984ca9c174883",
|
|
"2475f7b012c187fb",
|
|
"56268dd3950d582f",
|
|
"60a8e2bc9a992202",
|
|
"69fc7c7c14fa81f3",
|
|
"6fd2028d522ac563",
|
|
"7313123929b92e4c",
|
|
"77a5eb0c4cd17bfa",
|
|
"7a47df709c00596e",
|
|
"8437dc846be5af12",
|
|
"9be1a70bcb57bda6",
|
|
"a6e7e3de32ef63ca",
|
|
"bc345ebb0941581d",
|
|
"cff2ab3b56cd2174",
|
|
"d7b616f51fec6d9a",
|
|
"e7fabccd7044ccb6",
|
|
"efdfaa2b7173a43a",
|
|
"f21a1bff030f3d3d",
|
|
"fd4ec723ef30dfd8",
|
|
"7ff240db7b508375",
|
|
"688678bca50b4911",
|
|
"4a57670feb22dd22",
|
|
"73cb90b1dfb06aa9",
|
|
"29876145b02128ba",
|
|
"4b285e7f94d3b8eb",
|
|
"5f003111067c7d2b",
|
|
"9466a626346eb4a2",
|
|
"d7c0f15bcf4b068e",
|
|
"3cc080156ec677bf",
|
|
"56ddaec6b46fba54",
|
|
"099bcc479f19f5e8",
|
|
"9d8d5a2c4331cc1a",
|
|
"4d3d46033f209d6f",
|
|
"3859758a7fa85959",
|
|
"869dcd5abf4c9bb5",
|
|
"af6e09cdd2199095",
|
|
"d69c9016584d1fd3",
|
|
"f91e7a1c2c512a0e",
|
|
"8257f8177d899a49",
|
|
"2d7299cd90641836"
|
|
],
|
|
"x": 135,
|
|
"y": 2880,
|
|
"wires": [
|
|
[
|
|
"2b16dee056f4ac27",
|
|
"26ee3b5b75b8d83f"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2b16dee056f4ac27",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e456c4e7cfd87c26",
|
|
"name": "kernel - catch error",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 310,
|
|
"y": 2880,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "4781986f3e559778",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "648d078d534a93be",
|
|
"name": "topic",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "topic",
|
|
"pt": "msg",
|
|
"to": "kernel",
|
|
"tot": "str"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 790,
|
|
"y": 60,
|
|
"wires": [
|
|
[
|
|
"243984ca9c174883"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "243984ca9c174883",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "648d078d534a93be",
|
|
"name": "catch error",
|
|
"mode": "link",
|
|
"links": [
|
|
"a52f0e788cd4dca3"
|
|
],
|
|
"x": 915,
|
|
"y": 60,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "26ee3b5b75b8d83f",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "e456c4e7cfd87c26",
|
|
"name": "kernel - catch error",
|
|
"mode": "link",
|
|
"links": [],
|
|
"x": 235,
|
|
"y": 2940,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "f4e4d84dd55f9d0d",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "kernel - preboot",
|
|
"mode": "link",
|
|
"links": [
|
|
"afacd9f13f6a5261",
|
|
"7620b4194034a250",
|
|
"a330cf9fee227d5f"
|
|
],
|
|
"x": 2295,
|
|
"y": 540,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "3308d2aa53cd0bbd",
|
|
"type": "trigger",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "cf7f82b8517f3250",
|
|
"name": "preboot delay",
|
|
"op1": "",
|
|
"op2": "",
|
|
"op1type": "pay",
|
|
"op2type": "payl",
|
|
"duration": "100",
|
|
"extend": false,
|
|
"overrideDelay": false,
|
|
"units": "ms",
|
|
"reset": "",
|
|
"bytopic": "all",
|
|
"topic": "topic",
|
|
"outputs": 2,
|
|
"x": 2140,
|
|
"y": 600,
|
|
"wires": [
|
|
[
|
|
"f4e4d84dd55f9d0d"
|
|
],
|
|
[
|
|
"25445f5a9b787a0a"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1266c0d95b69ccf5",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "add model to global",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "models[msg.protocol][msg.brand][msg.model]",
|
|
"pt": "global",
|
|
"to": "{\t 'measurement':msg.measurement,\t 'field':msg.field,\t 'format':msg.format,\t 'default':msg.default\t}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 2010,
|
|
"y": 3520,
|
|
"wires": [
|
|
[]
|
|
]
|
|
},
|
|
{
|
|
"id": "a330cf9fee227d5f",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "b96253f786c81415",
|
|
"name": "auto - model - in",
|
|
"links": [
|
|
"f4e4d84dd55f9d0d"
|
|
],
|
|
"x": 155,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"66f70658751b68f3"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9cb906bf8066d37e",
|
|
"type": "link out",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "b96253f786c81415",
|
|
"name": "auto - model - in",
|
|
"mode": "link",
|
|
"links": [
|
|
"2cd6d04618352d88",
|
|
"4125458fe3950d3d",
|
|
"7956edf72f807538",
|
|
"7a5b0b5583ea7343",
|
|
"4fa1971ba6183d55",
|
|
"9d33432184b532c8",
|
|
"2b16e085b48c0440",
|
|
"fad484a3f123ac37",
|
|
"370a85c93a8d561d",
|
|
"b463c81b1b187246",
|
|
"06e81a86a3217a48",
|
|
"a6900d3b869e3d1e",
|
|
"0df2f6e07a121689",
|
|
"40de83c24a607884",
|
|
"e31b48fc04ade3f3",
|
|
"2128f35825dde7a6",
|
|
"73bb43528b419bc3",
|
|
"502a76366d0afa9f",
|
|
"c52016c969292c72",
|
|
"c839570ef7a78a9f",
|
|
"b21a4e42ed9c41ea",
|
|
"18c15e43576295d6",
|
|
"5ecc13865846db0e",
|
|
"bec54e9477e4bd61",
|
|
"f4a990fd68343eba",
|
|
"cdd076b6b818d38f",
|
|
"39e9e59dd42094bb",
|
|
"b4066829ee5f163b",
|
|
"ff3a40b127910051",
|
|
"3d1e4fa0f23499e7"
|
|
],
|
|
"x": 455,
|
|
"y": 3520,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "94aa726ce8973d2c",
|
|
"type": "link in",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "auto - model - out",
|
|
"links": [
|
|
"4902a3b3378eb68c",
|
|
"5b6791e0c3031934",
|
|
"be033ed2f9099d29",
|
|
"e7c8646d0179e346",
|
|
"1b2b173864b5b18f",
|
|
"68937215c80c0f7c",
|
|
"23cde9c0dc38671b",
|
|
"b9beacf10a894eba",
|
|
"96dc3b51e121f1c9",
|
|
"4eb7f83fca4bcb34",
|
|
"79409b5134de7f76",
|
|
"f26c156abc555775",
|
|
"ac9c9b4e7caf4c7c",
|
|
"72a29139af6e48a9",
|
|
"f5d43b55f6998570",
|
|
"68455293ad284dd5",
|
|
"1ba6fff915be6924",
|
|
"7730cebb6d30dd0f",
|
|
"425bce213a925d73",
|
|
"4c23495713170d6d",
|
|
"98015f2feffa655e",
|
|
"200dd435b42e8ec3",
|
|
"76e3b03e619c3fbc",
|
|
"08e5a3df0b2c2c95",
|
|
"3b8391f25d2d2849",
|
|
"7dd6e99d1c259084",
|
|
"b8e2db56d1fe5f75",
|
|
"4ad7402573722786",
|
|
"fbe235d0cb60d161",
|
|
"a8b3e0ae1a87461c"
|
|
],
|
|
"x": 635,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"5d553844550b821e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "66f70658751b68f3",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "b96253f786c81415",
|
|
"name": "reset models",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "models",
|
|
"pt": "global",
|
|
"to": "{}",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 310,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"9cb906bf8066d37e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "13f4c9a49f9902dc",
|
|
"type": "debug",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "auto - model - uncomplete",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "true",
|
|
"targetType": "full",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 2030,
|
|
"y": 3460,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "a55fb25ac5e89398",
|
|
"type": "inject",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "b96253f786c81415",
|
|
"name": "reload models",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 310,
|
|
"y": 3460,
|
|
"wires": [
|
|
[
|
|
"66f70658751b68f3"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "5d553844550b821e",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "protocol",
|
|
"property": "protocol",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 780,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"1a40c588514eddb2"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1a40c588514eddb2",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "brand",
|
|
"property": "brand",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 950,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"b8199d733a66766b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b8199d733a66766b",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "model",
|
|
"property": "model",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1110,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"b9656cfcd1a2011e"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "b9656cfcd1a2011e",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "measurement",
|
|
"property": "measurement",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1300,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"3055080b9f38dbe8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3055080b9f38dbe8",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "field",
|
|
"property": "field",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1490,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"37838aa1f7d06a7b"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "9573e23ffd1bd3ec",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "default",
|
|
"property": "default",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "null"
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1810,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
],
|
|
[
|
|
"1266c0d95b69ccf5"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "37838aa1f7d06a7b",
|
|
"type": "switch",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "abae3c836f2269b3",
|
|
"name": "format",
|
|
"property": "format",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "regex",
|
|
"v": "(number|boolean|text)",
|
|
"vt": "str",
|
|
"case": false
|
|
},
|
|
{
|
|
"t": "else"
|
|
}
|
|
],
|
|
"checkall": "false",
|
|
"repair": false,
|
|
"outputs": 2,
|
|
"x": 1650,
|
|
"y": 3520,
|
|
"wires": [
|
|
[
|
|
"9573e23ffd1bd3ec"
|
|
],
|
|
[
|
|
"13f4c9a49f9902dc"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "cf2b3440a4b8c304",
|
|
"type": "change",
|
|
"z": "ab51b1e8cad7b700",
|
|
"g": "3be00f677c6457bd",
|
|
"name": "extract protocol values",
|
|
"rules": [
|
|
{
|
|
"t": "set",
|
|
"p": "protocol",
|
|
"pt": "msg",
|
|
"to": "teleinfo",
|
|
"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": "'teleinfo/'&msg.id",
|
|
"tot": "jsonata"
|
|
}
|
|
],
|
|
"action": "",
|
|
"property": "",
|
|
"from": "",
|
|
"to": "",
|
|
"reg": false,
|
|
"x": 740,
|
|
"y": 4240,
|
|
"wires": [
|
|
[
|
|
"5891781e4a61525a"
|
|
]
|
|
]
|
|
}
|
|
] |