Files
nodered-hub/flows.json

1184 lines
34 KiB
JSON

[
{
"id": "ed4ea3c2bc13d1ec",
"type": "tab",
"label": "Weather",
"disabled": false,
"info": "",
"env": []
},
{
"id": "91324b2dbbd2a883",
"type": "tab",
"label": "Settings",
"disabled": false,
"info": "",
"env": []
},
{
"id": "50d1e20d24132c99",
"type": "tab",
"label": "Testing",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4107976aa434eb03",
"type": "subflow",
"name": "Weather Conversions",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 80,
"wires": [
{
"id": "388878f6056fa3e4"
}
]
}
],
"out": [
{
"x": 500,
"y": 80,
"wires": [
{
"id": "80ce4b42b82e3c78",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "font-awesome/fa-cloud"
},
{
"id": "0e70b91ae6570376",
"type": "subflow",
"name": "Area Weather Alerts",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 140,
"wires": [
{
"id": "8ac36baa32177bd6"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#3FADB5",
"icon": "font-awesome/fa-cloud",
"status": {
"x": 580,
"y": 320,
"wires": [
{
"id": "404170ec56d4c845",
"port": 5
}
]
}
},
{
"id": "df425a30fbcfb2e9",
"type": "group",
"z": "ed4ea3c2bc13d1ec",
"name": "General Alerts",
"style": {
"label": true
},
"nodes": [
"7d9f24e0a78ec15c",
"7a962f9a62b1c9bd",
"f9f2f5c1415ff1be",
"ca5ab0add7ccdb84",
"474ea9dc63cf9b40",
"42b8b21e40f8b824",
"e817e217a8d0d31a",
"f42e26da028d2230",
"f683f8c961246dc7"
],
"x": 14,
"y": 19,
"w": 1152,
"h": 202
},
{
"id": "b0521ee44dc796d1",
"type": "group",
"z": "ed4ea3c2bc13d1ec",
"name": "Defiance Alerts",
"style": {
"label": true
},
"nodes": [
"aa989a69868fc5fe",
"67561d51aaa61dfa",
"bc210da75548aa27"
],
"x": 14,
"y": 239,
"w": 552,
"h": 142
},
{
"id": "56542cfc9d0c7a24",
"type": "group",
"z": "ed4ea3c2bc13d1ec",
"name": "KY Lake Alerts",
"style": {
"label": true
},
"nodes": [
"bce3a3a1210ab253",
"e8efcf839f012317",
"5a0e961755fd6b45"
],
"x": 14,
"y": 399,
"w": 552,
"h": 142
},
{
"id": "0cd2e4517585a8c3",
"type": "group",
"z": "ed4ea3c2bc13d1ec",
"name": "Ashland County Alerts",
"style": {
"label": true
},
"nodes": [
"e0c88351cce4178c",
"ee268b5bef276f45",
"028431d8cab86f80"
],
"x": 14,
"y": 559,
"w": 552,
"h": 142
},
{
"id": "b11deb643761dfcf",
"type": "group",
"z": "ed4ea3c2bc13d1ec",
"name": "Bayfield County Alerts",
"style": {
"label": true
},
"nodes": [
"d2c7d572608b7d19",
"26a089d3cbbb5ef1",
"eed501c9777eecb5"
],
"x": 14,
"y": 719,
"w": 552,
"h": 142
},
{
"id": "200f284a1171f0a8",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.251",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "388878f6056fa3e4",
"type": "function",
"z": "4107976aa434eb03",
"name": "Conversions",
"func": "msg.data.main.temp = ((msg.data.main.temp - 273.15) * 1.8) + 32\nmsg.data.main.feels_like = ((msg.data.main.feels_like - 273.15) * 1.8) + 32\nmsg.data.main.temp_min = ((msg.data.main.temp_min - 273.15) * 1.8) + 32\nmsg.data.main.temp_max = ((msg.data.main.temp_max - 273.15) * 1.8) + 32\nmsg.data.main.pressure = msg.data.main.pressure * 0.029529983071445\nmsg.data.wind.speed = msg.data.wind.speed * 2.237\nmsg.data.wind.gust = msg.data.wind.gust * 2.237\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 190,
"y": 80,
"wires": [
[
"80ce4b42b82e3c78"
]
]
},
{
"id": "80ce4b42b82e3c78",
"type": "function",
"z": "4107976aa434eb03",
"name": "Rounding",
"func": "const temp = msg.data.main.temp\nconst feels_like = msg.data.main.feels_like\nconst temp_min = msg.data.main.temp_min\nconst temp_max = msg.data.main.temp_max\nconst pressure = msg.data.main.pressure\nconst windspeed = msg.data.wind.speed\nconst windgust = msg.data.wind.gust\n\nmsg.data.main.temp = +temp.toFixed(1)\nmsg.data.main.feels_like = +feels_like.toFixed(1)\nmsg.data.main.temp_min = +temp_min.toFixed(1)\nmsg.data.main.temp_max = +temp_max.toFixed(1)\nmsg.data.main.pressure = +pressure.toFixed(2)\nmsg.data.wind.speed = +windspeed.toFixed(2)\nmsg.data.wind.gust = +windgust.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 80,
"wires": [
[]
]
},
{
"id": "8ac36baa32177bd6",
"type": "http request",
"z": "0e70b91ae6570376",
"name": "NWS Alerts API",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 200,
"y": 140,
"wires": [
[
"404170ec56d4c845"
]
]
},
{
"id": "404170ec56d4c845",
"type": "function",
"z": "0e70b91ae6570376",
"name": "Filter",
"func": "const severeWarningEvents = [\"Severe Thunderstorm Warning\",\"Destructive Severe Thunderstorm Warning\",\"Considerable Destructive Severe Thunderstorm Warning\"]\nconst tornadoWarningEvents = [\"Tornado Warning\",\"Radar Indicated Tornado Warning\",\"Confirmed Tornado Warning\",\"Tornado Emergency\"]\nconst tornadoWatchEvents = [\"Tornado Watch\"]\nconst severeThunderstormWatchEvents = [\"Severe Thunderstorm Watch\"]\nconst area = msg.area\nconst mqttTopic = \"weather/alerts/\" + area\nconst allTopic = mqttTopic + \"/alerts\"\nconst tstormTopic = mqttTopic + \"/severe_thunderstorm_warning\"\nconst tornadoWarnTopic = mqttTopic + \"/tornado_warning\"\nconst tornadoWatchTopic = mqttTopic + \"/tornado_watch\"\nconst severeThunderstormWatchTopic = mqttTopic + \"/severe_thunderstorm_watch\"\n\nlet alerts = msg.payload.features\nlet tornado_possible = false\nlet considerable_destructive = false\nlet confirmed = false\n\n// Filter for Severe Thunderstorm Warnings\n\nlet ts = alerts.filter(function(alert) {\n if (alert.properties &&\n severeWarningEvents.includes(alert.properties.event)) {\n return true\n }\n})\n\n// Filter for Severe Thunderstorm Warnings with tornado detection\n// that have a tornado possible parameter\n\nlet tstp = alerts.filter(function(alert) {\n if (alert.properties &&\n severeWarningEvents.includes(alert.properties.event) &&\n alert.properties.parameters &&\n alert.properties.parameters.tornadoDetection &&\n alert.properties.parameters.tornadoDetection.length > 0) {\n let tornadoPossible = alert.properties.parameters.tornadoDetection[0]\n return tornadoPossible === \"POSSIBLE\"\n }\n})\n\nif (tstp.length > 0) {\n tornado_possible = true\n}\n\n// Filter for considerable destructive severe thunderstorm warnings\n\nlet cdst = alerts.filter(function(alert) {\n if (alert.properties &&\n alert.properties.event === \"Considerable Destructive Severe Thunderstorm Warning\") {\n return true\n }\n})\n\nif (cdst.length > 0) {\n considerable_destructive = true\n}\n\n// Filter for Tornado Warnings\n\nlet tornado = alerts.filter(function(alert) {\n if (alert.properties &&\n tornadoWarningEvents.includes(alert.properties.event)) {\n return true\n }\n})\n\nlet confirmed_tornado = alerts.filter(function(alert) {\n if (alert.properties &&\n alert.properties.event === \"Confirmed Tornado Warning\") {\n return true\n }\n})\n\nif (confirmed_tornado.length > 0) {\n confirmed = true\n}\n\n// Filter for Tornado Watches\n\nlet tornado_watch = alerts.filter(function(alert) {\n if (alert.properties &&\n tornadoWatchEvents.includes(alert.properties.event)) {\n return true\n }\n})\n\n// Filter for Severe Thunderstorm Watches\n\nlet severe_thunderstorm_watch = alerts.filter(function(alert) {\n if (alert.properties &&\n severeThunderstormWatchEvents.includes(alert.properties.event)) {\n return true\n }\n})\n\n// If there are any alerts, return them\n\nlet allAlerts = {\n \"payload\": msg.payload.features,\n \"topic\": allTopic\n}\n\nlet tstormMsg = {\n \"payload\": {\n \"alerts\": ts,\n \"count\": ts.length,\n \"tornado_possible\": tornado_possible,\n \"considerable_destructive\": considerable_destructive\n },\n \"topic\": tstormTopic\n}\n\nlet tornadoWarnMsg = {\n \"payload\": {\n \"alerts\": tornado,\n \"count\": tornado.length,\n \"confirmed\": confirmed\n },\n \"topic\": tornadoWarnTopic\n}\n\nlet tornadoWatchMsg = {\n \"payload\": {\n \"alerts\": tornado_watch,\n \"count\": tornado_watch.length\n },\n \"topic\": tornadoWatchTopic\n}\n\nlet severeThunderstormWatchMsg = {\n \"payload\": {\n \"alerts\": severe_thunderstorm_watch,\n \"count\": severe_thunderstorm_watch.length\n },\n \"topic\": severeThunderstormWatchTopic\n}\n\n// Create status message for node\n\nlet statusMsg = {\n \"status\": {\n \"fill\": \"green\",\n \"shape\": \"dot\",\n \"text\": `${alerts.length} alerts processed at ${new Date().toLocaleString()}`\n }\n}\n\n// Send messages to output nodes\n\nnode.send([allAlerts,tstormMsg,tornadoWarnMsg,tornadoWatchMsg,severeThunderstormWatchMsg,statusMsg])",
"outputs": 6,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 140,
"wires": [
[
"846ac653b993bbec"
],
[
"9151c0cd48bb3c45"
],
[
"ab2e9b884521285a"
],
[
"6e785299ac298ccd"
],
[
"4d8ca3ed3f302d97"
],
[]
],
"outputLabels": [
"Severe Thunderstorm Warning",
"Tornado Warning",
"",
"",
"",
""
]
},
{
"id": "846ac653b993bbec",
"type": "mqtt out",
"z": "0e70b91ae6570376",
"name": "MQTT - All Alerts",
"topic": "",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 650,
"y": 20,
"wires": []
},
{
"id": "ab2e9b884521285a",
"type": "mqtt out",
"z": "0e70b91ae6570376",
"name": "MQTT - Tornado Warning",
"topic": "",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 670,
"y": 140,
"wires": []
},
{
"id": "9151c0cd48bb3c45",
"type": "mqtt out",
"z": "0e70b91ae6570376",
"name": "MQTT - Severe Thunderstorm Warning",
"topic": "",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 710,
"y": 80,
"wires": []
},
{
"id": "6e785299ac298ccd",
"type": "mqtt out",
"z": "0e70b91ae6570376",
"name": "MQTT - Tornado Watch",
"topic": "",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 670,
"y": 200,
"wires": []
},
{
"id": "4d8ca3ed3f302d97",
"type": "mqtt out",
"z": "0e70b91ae6570376",
"name": "MQTT - Severe Thunderstorm Watch",
"topic": "",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 710,
"y": 260,
"wires": []
},
{
"id": "7d9f24e0a78ec15c",
"type": "http request",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "AtmosphericX",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://192.168.1.106:3010/api/warnings",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 320,
"y": 120,
"wires": [
[
"f9f2f5c1415ff1be",
"f683f8c961246dc7"
]
]
},
{
"id": "7a962f9a62b1c9bd",
"type": "inject",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 120,
"wires": [
[
"7d9f24e0a78ec15c"
]
]
},
{
"id": "f9f2f5c1415ff1be",
"type": "function",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "Filter",
"func": "const severeWarningEvents = [\"Severe Thunderstorm Warning\", \"Destructive Severe Thunderstorm Warning\", \"Considerable Destructive Severe Thunderstorm Warning\"]\nconst tornadoWarningEvents = [\"Tornado Warning\", \"Radar Indicated Tornado Warning\", \"Confirmed Tornado Warning\", \"Tornado Emergency\"]\n\nlet alerts = msg.payload\n\n// Helper function to safely access nested properties\nconst getNestedProperty = (obj, path, defaultValue = undefined) => {\n return path.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : defaultValue), obj)\n}\n\n// Filter function\nconst filterAlerts = (alerts, condition) => {\n return alerts.filter(alert => {\n try {\n return condition(alert)\n } catch (e) {\n node.warn(`Error processing alert: ${e.message}`)\n return false\n }\n })\n}\n\n// Filtering logic\nconst ts = filterAlerts(alerts, alert => {\n const event = getNestedProperty(alert, ['raw', 'properties', 'event'])\n return severeWarningEvents.includes(event)\n})\n\nconst tstp = filterAlerts(alerts, alert => {\n const event = getNestedProperty(alert, ['raw', 'properties', 'event'])\n const tornadoDetection = getNestedProperty(alert, ['raw', 'properties', 'parameters', 'tornadoDetection'], [])\n return severeWarningEvents.includes(event) && tornadoDetection.includes(\"POSSIBLE\")\n})\n\nconst cdst = filterAlerts(alerts, alert => {\n const event = getNestedProperty(alert, ['raw', 'properties', 'event'])\n return event === \"Considerable Destructive Severe Thunderstorm Warning\"\n})\n\nconst tornado = filterAlerts(alerts, alert => {\n const event = getNestedProperty(alert, ['raw', 'properties', 'event'])\n return tornadoWarningEvents.includes(event)\n})\n\nconst confirmed_tornado = filterAlerts(alerts, alert => {\n const event = getNestedProperty(alert, ['raw', 'properties', 'event'])\n return event === \"Confirmed Tornado Warning\"\n})\n\n// Output messages\nlet tstormMsg = {\n \"payload\": {\n \"alerts\": ts,\n \"count\": ts.length,\n \"tornado_possible\": tstp.length,\n \"considerable_destructive\": cdst.length\n }\n}\n\nlet tornadoWarnMsg = {\n \"payload\": {\n \"alerts\": tornado,\n \"count\": tornado.length,\n \"confirmed\": confirmed_tornado.length\n }\n}\n\nnode.send([tstormMsg, tornadoWarnMsg])\nnode.status({ fill: 'green', shape: 'dot', text: `${alerts.length} alerts processed at ${new Date().toLocaleString()}`})",
"outputs": 2,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 490,
"y": 120,
"wires": [
[
"474ea9dc63cf9b40",
"e817e217a8d0d31a"
],
[
"ca5ab0add7ccdb84",
"f42e26da028d2230"
]
],
"outputLabels": [
"Severe Thunderstorm Warning",
"Tornado Warning"
]
},
{
"id": "ca5ab0add7ccdb84",
"type": "mqtt out",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "",
"topic": "weather/alerts/general/tornado_warning",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 900,
"y": 180,
"wires": []
},
{
"id": "474ea9dc63cf9b40",
"type": "mqtt out",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "",
"topic": "weather/alerts/general/severe_thunderstorm_warning",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "200f284a1171f0a8",
"x": 940,
"y": 120,
"wires": []
},
{
"id": "aa989a69868fc5fe",
"type": "inject",
"z": "ed4ea3c2bc13d1ec",
"g": "b0521ee44dc796d1",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "url",
"v": "https://api.weather.gov/alerts/active/zone/OHC039",
"vt": "str"
},
{
"p": "area",
"v": "defiance",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 280,
"wires": [
[
"bc210da75548aa27"
]
]
},
{
"id": "42b8b21e40f8b824",
"type": "link in",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "Weather - General Alerts Trigger",
"links": [
"b98e25d5de4ce89c"
],
"x": 185,
"y": 180,
"wires": [
[
"7d9f24e0a78ec15c"
]
]
},
{
"id": "67561d51aaa61dfa",
"type": "link in",
"z": "ed4ea3c2bc13d1ec",
"g": "b0521ee44dc796d1",
"name": "Weather - Defiance Alerts Trigger",
"links": [
"b98e25d5de4ce89c"
],
"x": 185,
"y": 340,
"wires": [
[
"bc210da75548aa27"
]
]
},
{
"id": "e817e217a8d0d31a",
"type": "debug",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "STS",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 60,
"wires": []
},
{
"id": "f42e26da028d2230",
"type": "debug",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "TW",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 60,
"wires": []
},
{
"id": "f683f8c961246dc7",
"type": "debug",
"z": "ed4ea3c2bc13d1ec",
"g": "df425a30fbcfb2e9",
"name": "Pre-Filter",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 500,
"y": 180,
"wires": []
},
{
"id": "bc210da75548aa27",
"type": "subflow:0e70b91ae6570376",
"z": "ed4ea3c2bc13d1ec",
"g": "b0521ee44dc796d1",
"name": "",
"x": 440,
"y": 280,
"wires": []
},
{
"id": "bce3a3a1210ab253",
"type": "inject",
"z": "ed4ea3c2bc13d1ec",
"g": "56542cfc9d0c7a24",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "url",
"v": "https://api.weather.gov/alerts/active/zone/KYC157",
"vt": "str"
},
{
"p": "area",
"v": "ky_lake",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 440,
"wires": [
[
"e8efcf839f012317"
]
]
},
{
"id": "e8efcf839f012317",
"type": "subflow:0e70b91ae6570376",
"z": "ed4ea3c2bc13d1ec",
"g": "56542cfc9d0c7a24",
"name": "",
"x": 440,
"y": 440,
"wires": []
},
{
"id": "5a0e961755fd6b45",
"type": "link in",
"z": "ed4ea3c2bc13d1ec",
"g": "56542cfc9d0c7a24",
"name": "Weather - KY Lake Alerts Trigger",
"links": [
"b98e25d5de4ce89c"
],
"x": 185,
"y": 500,
"wires": [
[
"e8efcf839f012317"
]
]
},
{
"id": "e0c88351cce4178c",
"type": "inject",
"z": "ed4ea3c2bc13d1ec",
"g": "0cd2e4517585a8c3",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "url",
"v": "https://api.weather.gov/alerts/active/zone/WIC003",
"vt": "str"
},
{
"p": "area",
"v": "ashland_co",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 600,
"wires": [
[
"ee268b5bef276f45"
]
]
},
{
"id": "ee268b5bef276f45",
"type": "subflow:0e70b91ae6570376",
"z": "ed4ea3c2bc13d1ec",
"g": "0cd2e4517585a8c3",
"name": "",
"x": 440,
"y": 600,
"wires": []
},
{
"id": "028431d8cab86f80",
"type": "link in",
"z": "ed4ea3c2bc13d1ec",
"g": "0cd2e4517585a8c3",
"name": "Weather - KY Lake Alerts Trigger",
"links": [
"b98e25d5de4ce89c"
],
"x": 185,
"y": 660,
"wires": [
[
"ee268b5bef276f45"
]
]
},
{
"id": "d2c7d572608b7d19",
"type": "inject",
"z": "ed4ea3c2bc13d1ec",
"g": "b11deb643761dfcf",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "url",
"v": "https://api.weather.gov/alerts/active/zone/WIC007",
"vt": "str"
},
{
"p": "area",
"v": "bayfield_co",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 760,
"wires": [
[
"26a089d3cbbb5ef1"
]
]
},
{
"id": "26a089d3cbbb5ef1",
"type": "subflow:0e70b91ae6570376",
"z": "ed4ea3c2bc13d1ec",
"g": "b11deb643761dfcf",
"name": "",
"x": 440,
"y": 760,
"wires": []
},
{
"id": "eed501c9777eecb5",
"type": "link in",
"z": "ed4ea3c2bc13d1ec",
"g": "b11deb643761dfcf",
"name": "Weather - KY Lake Alerts Trigger",
"links": [
"b98e25d5de4ce89c"
],
"x": 185,
"y": 820,
"wires": [
[
"26a089d3cbbb5ef1"
]
]
},
{
"id": "a1c109993f7dd396",
"type": "mqtt in",
"z": "91324b2dbbd2a883",
"name": "",
"topic": "house/time/night_mode",
"qos": "2",
"datatype": "auto-detect",
"broker": "200f284a1171f0a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 140,
"y": 60,
"wires": [
[
"0ea09d79d6de5c53"
]
]
},
{
"id": "0ea09d79d6de5c53",
"type": "change",
"z": "91324b2dbbd2a883",
"name": "",
"rules": [
{
"t": "set",
"p": "night_mode",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 380,
"y": 60,
"wires": [
[]
]
},
{
"id": "395e101ae9c12369",
"type": "mqtt in",
"z": "91324b2dbbd2a883",
"name": "",
"topic": "house/time/give_me_darkness",
"qos": "2",
"datatype": "auto-detect",
"broker": "200f284a1171f0a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 120,
"wires": [
[
"7e79da9ecd800892"
]
]
},
{
"id": "7e79da9ecd800892",
"type": "change",
"z": "91324b2dbbd2a883",
"name": "",
"rules": [
{
"t": "set",
"p": "give_me_darkness",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 120,
"wires": [
[]
]
},
{
"id": "a67eb32acf21917c",
"type": "mqtt in",
"z": "91324b2dbbd2a883",
"name": "",
"topic": "house/time/early_night_mode",
"qos": "2",
"datatype": "auto-detect",
"broker": "200f284a1171f0a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 180,
"wires": [
[
"e183038952420a88"
]
]
},
{
"id": "e183038952420a88",
"type": "change",
"z": "91324b2dbbd2a883",
"name": "",
"rules": [
{
"t": "set",
"p": "early_night_mode",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 180,
"wires": [
[]
]
},
{
"id": "da24109fa6585678",
"type": "mqtt in",
"z": "91324b2dbbd2a883",
"name": "",
"topic": "house/studio/live",
"qos": "2",
"datatype": "auto-detect",
"broker": "200f284a1171f0a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 120,
"y": 240,
"wires": [
[
"f7219402165cd674"
]
]
},
{
"id": "f7219402165cd674",
"type": "change",
"z": "91324b2dbbd2a883",
"name": "",
"rules": [
{
"t": "set",
"p": "studio_live",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 340,
"y": 240,
"wires": [
[]
]
},
{
"id": "59d2d6fec223bd16",
"type": "mqtt in",
"z": "91324b2dbbd2a883",
"name": "",
"topic": "services/homeassistant/reboot",
"qos": "0",
"datatype": "auto-detect",
"broker": "200f284a1171f0a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 300,
"wires": [
[
"b98e25d5de4ce89c"
]
]
},
{
"id": "b98e25d5de4ce89c",
"type": "link out",
"z": "91324b2dbbd2a883",
"name": "Home Assistant Reboot",
"mode": "link",
"links": [
"42b8b21e40f8b824",
"5a0e961755fd6b45",
"67561d51aaa61dfa",
"028431d8cab86f80",
"eed501c9777eecb5"
],
"x": 335,
"y": 300,
"wires": []
},
{
"id": "2fe03a09d418699b",
"type": "exec",
"z": "50d1e20d24132c99",
"command": "",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "",
"x": 370,
"y": 180,
"wires": [
[
"652d9b04c03a88b8"
],
[
"b784a6fd67e1cac0"
],
[
"38d4b39d1405b540"
]
]
},
{
"id": "b114d9e490180bbc",
"type": "inject",
"z": "50d1e20d24132c99",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 200,
"y": 180,
"wires": [
[
"2fe03a09d418699b"
]
]
},
{
"id": "652d9b04c03a88b8",
"type": "debug",
"z": "50d1e20d24132c99",
"name": "stdout",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 120,
"wires": []
},
{
"id": "b784a6fd67e1cac0",
"type": "debug",
"z": "50d1e20d24132c99",
"name": "stderr",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 180,
"wires": []
},
{
"id": "38d4b39d1405b540",
"type": "debug",
"z": "50d1e20d24132c99",
"name": "return code",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 550,
"y": 240,
"wires": []
}
]