Replace some inject nodes with cron-plus nodes, add testers as well
This commit is contained in:
592
flows.json
592
flows.json
@ -1006,10 +1006,8 @@
|
||||
"nodes": [
|
||||
"4d724735025b0ed8",
|
||||
"6ec62f6cf4fcf994",
|
||||
"71bee01e93d372c4",
|
||||
"31ce8ad28dd41226",
|
||||
"20271b0662a4d5df",
|
||||
"69886cf636bf4f70",
|
||||
"16bf625c802d7910",
|
||||
"a32c37ccf0102258",
|
||||
"d5c6b45df763e57e",
|
||||
@ -1021,8 +1019,6 @@
|
||||
"92c97bdd3ffb345d",
|
||||
"1fd2518454b8b8a1",
|
||||
"cc54107a01eca8c2",
|
||||
"33845d78dadbb4df",
|
||||
"2a2e328746eed124",
|
||||
"80fcb34c004369e7",
|
||||
"5f0f296e4f242dfe",
|
||||
"d2d529b327823c22",
|
||||
@ -1030,7 +1026,11 @@
|
||||
"1e1eb662bad16e38",
|
||||
"149704b9f6497881",
|
||||
"b6cb206d9cb34610",
|
||||
"51b11f9d5b8bfbb0"
|
||||
"b3ff9d6b11d09cc9",
|
||||
"1e11dbd040532f1b",
|
||||
"2a12efb509915160",
|
||||
"b8ee23476d011484",
|
||||
"edb4d8fcc9fe02e0"
|
||||
],
|
||||
"x": 34,
|
||||
"y": 179,
|
||||
@ -1605,8 +1605,8 @@
|
||||
},
|
||||
"nodes": [
|
||||
"274be2385ae894ce",
|
||||
"dcc947fe66b6342b",
|
||||
"15f7382daddb4b3e"
|
||||
"15f7382daddb4b3e",
|
||||
"cc6386853b678420"
|
||||
],
|
||||
"x": 34,
|
||||
"y": 1139,
|
||||
@ -2894,6 +2894,26 @@
|
||||
"w": 712,
|
||||
"h": 82
|
||||
},
|
||||
{
|
||||
"id": "af7782943343a759",
|
||||
"type": "group",
|
||||
"z": "d49b385d8b582b20",
|
||||
"name": "Cron Plus Tester",
|
||||
"style": {
|
||||
"label": true
|
||||
},
|
||||
"nodes": [
|
||||
"3696700bebc8823a",
|
||||
"ed094c20ad524768",
|
||||
"cafa8a6b489484b7",
|
||||
"2f01ee1169769867",
|
||||
"4d4d04563f14bf1e"
|
||||
],
|
||||
"x": 794,
|
||||
"y": 519,
|
||||
"w": 392,
|
||||
"h": 262
|
||||
},
|
||||
{
|
||||
"id": "fba69dfc80829db7",
|
||||
"type": "junction",
|
||||
@ -36167,32 +36187,6 @@
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "71bee01e93d372c4",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "",
|
||||
"crontab": "00 01 * * *",
|
||||
"once": false,
|
||||
"onceDelay": 0.1,
|
||||
"topic": "",
|
||||
"payload": "off",
|
||||
"payloadType": "str",
|
||||
"x": 610,
|
||||
"y": 400,
|
||||
"wires": [
|
||||
[
|
||||
"486bca43ddc48fb8"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "31ce8ad28dd41226",
|
||||
"type": "api-render-template",
|
||||
@ -36235,32 +36229,6 @@
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "69886cf636bf4f70",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Set Schedule",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "",
|
||||
"crontab": "00 06 * * *",
|
||||
"once": false,
|
||||
"onceDelay": "1",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 160,
|
||||
"y": 240,
|
||||
"wires": [
|
||||
[
|
||||
"31ce8ad28dd41226"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "16bf625c802d7910",
|
||||
"type": "function",
|
||||
@ -36893,32 +36861,6 @@
|
||||
],
|
||||
"icon": "font-awesome/fa-clock-o"
|
||||
},
|
||||
{
|
||||
"id": "33845d78dadbb4df",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Set Schedule",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "",
|
||||
"crontab": "58 03 * * *",
|
||||
"once": false,
|
||||
"onceDelay": "1",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 160,
|
||||
"y": 460,
|
||||
"wires": [
|
||||
[
|
||||
"7a6299413cbbbdcf"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cc54107a01eca8c2",
|
||||
"type": "inject",
|
||||
@ -36938,36 +36880,10 @@
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 190,
|
||||
"y": 500,
|
||||
"wires": [
|
||||
[
|
||||
"7a6299413cbbbdcf"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "2a2e328746eed124",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "60",
|
||||
"crontab": "",
|
||||
"once": true,
|
||||
"onceDelay": "1",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 750,
|
||||
"y": 520,
|
||||
"wires": [
|
||||
[
|
||||
"d2c017d8f8c1dc68"
|
||||
"7a6299413cbbbdcf"
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -37077,32 +36993,6 @@
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "51b11f9d5b8bfbb0",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "60",
|
||||
"crontab": "",
|
||||
"once": true,
|
||||
"onceDelay": "1",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 750,
|
||||
"y": 300,
|
||||
"wires": [
|
||||
[
|
||||
"b6cb206d9cb34610"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "1e1eb662bad16e38",
|
||||
"type": "change",
|
||||
@ -37180,32 +37070,6 @@
|
||||
[]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dcc947fe66b6342b",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "385f03591bc34bcc",
|
||||
"name": "",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "60",
|
||||
"crontab": "",
|
||||
"once": true,
|
||||
"onceDelay": "30",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 150,
|
||||
"y": 1180,
|
||||
"wires": [
|
||||
[
|
||||
"274be2385ae894ce"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "15f7382daddb4b3e",
|
||||
"type": "function",
|
||||
@ -37230,39 +37094,15 @@
|
||||
"name": "Constants",
|
||||
"func": "// Set options here\nconst dynamicRooms = [\"living_room\",\"basement_studio\"]\nconst tvRooms = [\"living_room\",\"basement\",\"basement_studio\",\"master_bedroom\"]\n\n// Commit those options to global context\nglobal.set(\"dynamicRooms\", dynamicRooms, \"diskCon\")\nglobal.set(\"tvRooms\", tvRooms, \"diskCon\")\n\nnode.status({fill:\"green\",shape:\"dot\",text:\"Saved\"});",
|
||||
"outputs": 0,
|
||||
"timeout": "",
|
||||
"noerr": 0,
|
||||
"initialize": "",
|
||||
"finalize": "",
|
||||
"libs": [],
|
||||
"x": 1120,
|
||||
"x": 1200,
|
||||
"y": 620,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "f49fc3da65a68efd",
|
||||
"type": "inject",
|
||||
"z": "3e4ba157b540d183",
|
||||
"name": "Update",
|
||||
"props": [
|
||||
{
|
||||
"p": "payload"
|
||||
}
|
||||
],
|
||||
"repeat": "3600",
|
||||
"crontab": "",
|
||||
"once": true,
|
||||
"onceDelay": 0.1,
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"x": 960,
|
||||
"y": 620,
|
||||
"wires": [
|
||||
[
|
||||
"ec5628079748bafe"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "430d9054095580f1",
|
||||
"type": "inject",
|
||||
@ -37466,6 +37306,250 @@
|
||||
[]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cc6386853b678420",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "385f03591bc34bcc",
|
||||
"name": "Every Minute",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "minute",
|
||||
"topic": "minute",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 */1 * * * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 150,
|
||||
"y": 1180,
|
||||
"wires": [
|
||||
[
|
||||
"274be2385ae894ce"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "b3ff9d6b11d09cc9",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Set Schedule",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "morning",
|
||||
"topic": "work_schedule",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 58 3 * * ? *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 150,
|
||||
"y": 460,
|
||||
"wires": [
|
||||
[
|
||||
"7a6299413cbbbdcf"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "1e11dbd040532f1b",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "off",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "work_off",
|
||||
"topic": "work_off",
|
||||
"payloadType": "str",
|
||||
"payload": "off",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 0 1 * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 610,
|
||||
"y": 400,
|
||||
"wires": [
|
||||
[
|
||||
"486bca43ddc48fb8"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "2a12efb509915160",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Every Minute",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "minute",
|
||||
"topic": "minute",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 */1 * * * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 750,
|
||||
"y": 300,
|
||||
"wires": [
|
||||
[
|
||||
"b6cb206d9cb34610"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "b8ee23476d011484",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Every Minute",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "minute",
|
||||
"topic": "minute",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 */1 * * * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 750,
|
||||
"y": 520,
|
||||
"wires": [
|
||||
[
|
||||
"d2c017d8f8c1dc68"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "38adc9ec21c2287d",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"name": "Update",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "hour",
|
||||
"topic": "hour",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 0 * * * ? *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 960,
|
||||
"y": 620,
|
||||
"wires": [
|
||||
[
|
||||
"ec5628079748bafe"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "edb4d8fcc9fe02e0",
|
||||
"type": "cronplus",
|
||||
"z": "3e4ba157b540d183",
|
||||
"g": "5c50443a84910fb7",
|
||||
"name": "Set Schedule",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "output1",
|
||||
"defaultLocation": "",
|
||||
"defaultLocationType": "default",
|
||||
"outputs": 1,
|
||||
"options": [
|
||||
{
|
||||
"name": "set_schedule",
|
||||
"topic": "set_schedule",
|
||||
"payloadType": "date",
|
||||
"payload": "",
|
||||
"expressionType": "cron",
|
||||
"expression": "0 0 6 * * ? *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
}
|
||||
],
|
||||
"x": 150,
|
||||
"y": 240,
|
||||
"wires": [
|
||||
[
|
||||
"31ce8ad28dd41226"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "e038489eca14b1dd",
|
||||
"type": "discordMessage",
|
||||
@ -39358,5 +39442,133 @@
|
||||
"a89d872a45eae06c"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "3696700bebc8823a",
|
||||
"type": "cronplus",
|
||||
"z": "d49b385d8b582b20",
|
||||
"g": "af7782943343a759",
|
||||
"name": "",
|
||||
"outputField": "payload",
|
||||
"timeZone": "",
|
||||
"storeName": "",
|
||||
"commandResponseMsgOutput": "fanOut",
|
||||
"defaultLocation": "41.28173561740492 -84.36918631196022",
|
||||
"defaultLocationType": "fixed",
|
||||
"outputs": 4,
|
||||
"options": [
|
||||
{
|
||||
"name": "schedule1",
|
||||
"topic": "topic1",
|
||||
"payloadType": "global",
|
||||
"payload": "outdoorTemp",
|
||||
"expressionType": "cron",
|
||||
"expression": "*/30 * * * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "all",
|
||||
"solarEvents": "sunrise,sunset"
|
||||
},
|
||||
{
|
||||
"name": "schedule2",
|
||||
"topic": "topic2",
|
||||
"payloadType": "default",
|
||||
"payload": "",
|
||||
"expressionType": "solar",
|
||||
"expression": "0 * * * * * *",
|
||||
"location": "",
|
||||
"offset": "0",
|
||||
"solarType": "selected",
|
||||
"solarEvents": "sunriseEnd,sunsetStart"
|
||||
}
|
||||
],
|
||||
"x": 900,
|
||||
"y": 660,
|
||||
"wires": [
|
||||
[
|
||||
"ed094c20ad524768"
|
||||
],
|
||||
[
|
||||
"cafa8a6b489484b7"
|
||||
],
|
||||
[
|
||||
"2f01ee1169769867"
|
||||
],
|
||||
[
|
||||
"4d4d04563f14bf1e"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ed094c20ad524768",
|
||||
"type": "debug",
|
||||
"z": "d49b385d8b582b20",
|
||||
"g": "af7782943343a759",
|
||||
"name": "debug 1",
|
||||
"active": false,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"x": 1080,
|
||||
"y": 560,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "cafa8a6b489484b7",
|
||||
"type": "debug",
|
||||
"z": "d49b385d8b582b20",
|
||||
"g": "af7782943343a759",
|
||||
"name": "debug 2",
|
||||
"active": false,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"x": 1080,
|
||||
"y": 620,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "2f01ee1169769867",
|
||||
"type": "debug",
|
||||
"z": "d49b385d8b582b20",
|
||||
"g": "af7782943343a759",
|
||||
"name": "debug 3",
|
||||
"active": false,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"x": 1080,
|
||||
"y": 680,
|
||||
"wires": []
|
||||
},
|
||||
{
|
||||
"id": "4d4d04563f14bf1e",
|
||||
"type": "debug",
|
||||
"z": "d49b385d8b582b20",
|
||||
"g": "af7782943343a759",
|
||||
"name": "debug 4",
|
||||
"active": false,
|
||||
"tosidebar": true,
|
||||
"console": false,
|
||||
"tostatus": false,
|
||||
"complete": "true",
|
||||
"targetType": "full",
|
||||
"statusVal": "",
|
||||
"statusType": "auto",
|
||||
"x": 1080,
|
||||
"y": 740,
|
||||
"wires": []
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user