[
{
"id": "5d414aae.1c44f4",
"type": "ui_gauge",
"z": "a444a9ff.e7a408",
"name": "wind direction",
"group": "304cf995.dc6556",
"order": 10,
"width": "3",
"height": "3",
"gtype": "compass",
"title": "wind direction",
"label": "degrees",
"format": "{{value}}",
"min": 0,
"max": "360",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 820,
"y": 580,
"wires": []
},
{
"id": "bbcf51d4.571d2",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 3,
"width": "2",
"height": "1",
"name": "",
"label": "temp ▲",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 800,
"y": 910,
"wires": []
},
{
"id": "cc017128.08002",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 2,
"width": "2",
"height": "1",
"name": "",
"label": "temp ▼",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 800,
"y": 950,
"wires": []
},
{
"id": "db5b3dc1.a0973",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 17,
"width": "2",
"height": "1",
"name": "",
"label": "time now",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 420,
"y": 1460,
"wires": []
},
{
"id": "df81e6b3.271328",
"type": "inject",
"z": "a444a9ff.e7a408",
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "60",
"crontab": "",
"once": true,
"x": 100,
"y": 1460,
"wires": [
[
"edebb4d8.5effe8"
]
]
},
{
"id": "aa8a2cde.84648",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 4,
"width": "2",
"height": "1",
"name": "Rain - day",
"label": "rain ",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 810,
"y": 990,
"wires": []
},
{
"id": "67eadd71.91a894",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 10,
"width": "3",
"height": "1",
"name": "",
"label": "max w/speed",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 810,
"y": 1150,
"wires": []
},
{
"id": "afc47cc3.dab22",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 6,
"width": "6",
"height": "1",
"name": "Date",
"label": "forecast for",
"format": "{{msg.payload | date:\"EEEE, MMMM d\"}}",
"layout": "col-center",
"x": 790,
"y": 830,
"wires": []
},
{
"id": "9f4425a1.ad90d8",
"type": "change",
"z": "a444a9ff.e7a408",
"name": "change",
"rules": [
{
"t": "move",
"p": "data",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 410,
"y": 140,
"wires": [
[
"16739c3e.cad3d4",
"868f4534.3b4098",
"4b5672c4.924c9c",
"35b2a800.b01218",
"66adc6b5.bffaa8"
]
]
},
{
"id": "16739c3e.cad3d4",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Rain intensity",
"func": "msg.payload = (msg.payload.currently.precipIntensity);\nmsg.payload = ((msg.payload*25.4).toFixed(1));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 640,
"y": 110,
"wires": [
[
"3f48dcc5.211744"
]
]
},
{
"id": "868f4534.3b4098",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Rain chance",
"func": "msg.payload = (msg.payload.currently.precipProbability);\nmsg.payload = (msg.payload*100).toFixed(0);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 150,
"wires": [
[
"d99bdb85.c74af8"
]
]
},
{
"id": "4b5672c4.924c9c",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Summary",
"func": "msg.payload = (msg.payload.minutely.summary);\nmsg.payload = (msg.payload+\" \");\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 70,
"wires": [
[
"d18fadda.36ac7"
]
]
},
{
"id": "35b2a800.b01218",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Ozone",
"func": "msg.payload = (msg.payload.currently.ozone).toFixed(1);\nmsg.payload = (msg.payload+\"du\");\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 190,
"wires": [
[
"624a642a.8f42dc"
]
]
},
{
"id": "d18fadda.36ac7",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 9,
"width": "6",
"height": "1",
"name": "for the hour",
"label": " ",
"format": "{{msg.payload}}",
"layout": "row-left",
"x": 810,
"y": 70,
"wires": []
},
{
"id": "2036273f.0b5818",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 12,
"width": "3",
"height": "1",
"name": "",
"label": "gusts",
"format": "{{msg.payload}} mph",
"layout": "row-spread",
"x": 790,
"y": 490,
"wires": []
},
{
"id": "7730383a.9fe0e8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 6,
"width": "2",
"height": "1",
"name": "",
"label": "pressure",
"format": "{{msg.payload}}mb",
"layout": "col-center",
"x": 800,
"y": 700,
"wires": []
},
{
"id": "624a642a.8f42dc",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 16,
"width": "2",
"height": "1",
"name": "",
"label": "ozone",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 790,
"y": 190,
"wires": []
},
{
"id": "89c76554.bc4ed8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 19,
"width": "5",
"height": "1",
"name": "",
"label": "",
"format": "{{msg.payload}}",
"layout": "row-left",
"x": 790,
"y": 620,
"wires": []
},
{
"id": "e695380c.df7ab8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 15,
"width": "2",
"height": "1",
"name": "dewpoint",
"label": "dewpoint",
"format": "{{msg.payload}}°C",
"layout": "col-center",
"x": 800,
"y": 540,
"wires": []
},
{
"id": "7ecf24ed.e5f57c",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 5,
"width": "2",
"height": "1",
"name": "",
"label": "humidity",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 800,
"y": 660,
"wires": []
},
{
"id": "d99bdb85.c74af8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 3,
"width": "2",
"height": "1",
"name": "",
"label": "rain prob",
"format": "{{msg.payload}}%",
"layout": "col-center",
"x": 800,
"y": 150,
"wires": []
},
{
"id": "3f48dcc5.211744",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 4,
"width": "2",
"height": "1",
"name": "",
"label": "rain",
"format": "{{msg.payload}}mm",
"layout": "col-center",
"x": 790,
"y": 110,
"wires": []
},
{
"id": "1d762d93.be4822",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 7,
"width": "3",
"height": "1",
"name": "",
"label": "temperature",
"format": "{{msg.payload}}°C",
"layout": "col-center",
"x": 810,
"y": 330,
"wires": []
},
{
"id": "977d821d.9c2e2",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 11,
"width": "3",
"height": "1",
"name": "",
"label": "w/spd",
"format": "{{msg.payload}} mph",
"layout": "row-spread",
"x": 790,
"y": 450,
"wires": []
},
{
"id": "66adc6b5.bffaa8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Cloud",
"func": "msg.payload = (msg.payload.currently.cloudCover).toFixed(1);\nmsg.payload = ((msg.payload*100)+\" %\");\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 230,
"wires": [
[
"37ad0f29.672f4"
]
]
},
{
"id": "37ad0f29.672f4",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 13,
"width": "3",
"height": "1",
"name": "cloud cover",
"label": "clouds",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 810,
"y": 230,
"wires": []
},
{
"id": "42cb8696.e24cc8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"order": 8,
"width": "3",
"height": "1",
"name": "",
"label": "feelslike",
"format": "{{msg.payload}}°C",
"layout": "col-center",
"x": 800,
"y": 370,
"wires": []
},
{
"id": "3ed4777c.0d2dc8",
"type": "inject",
"z": "a444a9ff.e7a408",
"name": "every 5 mins",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "*/5 0-23 * * *",
"once": false,
"x": 340,
"y": 1400,
"wires": [
[
"e3dc75c7.1fe5a8"
]
]
},
{
"id": "768fa07.070bd6",
"type": "http request",
"z": "a444a9ff.e7a408",
"name": "Get data",
"method": "GET",
"ret": "txt",
"url": "http://api.wunderground.com/api/{{secure}}/conditions_v11/q/EGCN.json",
"tls": "",
"x": 300,
"y": 570,
"wires": [
[
"79fa52b5.3c3a1c"
]
]
},
{
"id": "79fa52b5.3c3a1c",
"type": "json",
"z": "a444a9ff.e7a408",
"name": "",
"x": 440,
"y": 570,
"wires": [
[
"90c985d3.6072a8"
]
]
},
{
"id": "d41d47d.38b75b8",
"type": "comment",
"z": "a444a9ff.e7a408",
"name": "Wunderground current",
"info": "",
"x": 140,
"y": 480,
"wires": []
},
{
"id": "ec1733aa.67ef3",
"type": "darksky",
"z": "a444a9ff.e7a408",
"darksky": "",
"name": "",
"lon": "-1.054747",
"lat": "53.472963",
"date": "",
"time": "",
"mode": "message",
"lang": "en",
"units": "auto",
"x": 220,
"y": 140,
"wires": [
[
"9f4425a1.ad90d8"
]
]
},
{
"id": "e6caa906.ce5fc8",
"type": "ui_template",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"name": "icon Image",
"order": 1,
"width": "2",
"height": "2",
"format": "
\n\n
",
"storeOutMessages": false,
"fwdInMessages": false,
"templateScope": "local",
"x": 810,
"y": 870,
"wires": [
[]
]
},
{
"id": "b1f32bd5.527f28",
"type": "ui_gauge",
"z": "a444a9ff.e7a408",
"name": "Wind compass",
"group": "a9c0b162.e0664",
"order": 7,
"width": "3",
"height": "3",
"gtype": "compass",
"title": "wind direction",
"label": "degrees",
"format": "{{value}}",
"min": 0,
"max": "360",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"x": 820,
"y": 1110,
"wires": []
},
{
"id": "e3dc75c7.1fe5a8",
"type": "ui_button",
"z": "a444a9ff.e7a408",
"name": "Dash Refresh",
"group": "304cf995.dc6556",
"order": 18,
"width": "1",
"height": "1",
"passthru": true,
"label": "",
"color": "",
"bgcolor": "",
"icon": "fa-refresh fa-2x",
"payload": "",
"payloadType": "str",
"topic": "",
"x": 560.3300170898438,
"y": 1400.1099853515625,
"wires": [
[
"27afa2f2.6b35ce"
]
]
},
{
"id": "c78f398f.03efe8",
"type": "ui_template",
"z": "a444a9ff.e7a408",
"group": "304cf995.dc6556",
"name": "icon image",
"order": 1,
"width": "2",
"height": "2",
"format": "\n\n
",
"storeOutMessages": false,
"fwdInMessages": true,
"templateScope": "local",
"x": 810,
"y": 740,
"wires": [
[]
]
},
{
"id": "f7141e31.16de2",
"type": "http request",
"z": "a444a9ff.e7a408",
"name": "Wunderground",
"method": "GET",
"ret": "txt",
"url": "http://api.wunderground.com/api/{{secure}}/forecast10day/q/EGCN.json",
"tls": "",
"x": 690,
"y": 1280,
"wires": [
[
"6bf9da4c.da8f34"
]
]
},
{
"id": "f3889fbb.8b5d5",
"type": "json",
"z": "a444a9ff.e7a408",
"name": "",
"x": 180,
"y": 1090,
"wires": [
[
"aa9fa8ef.defea8",
"db626c57.382e9"
]
]
},
{
"id": "aa9fa8ef.defea8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Forecast",
"func": "try {\nvar selectday = msg.topic;\nvar wparse = msg.payload.forecast.simpleforecast.forecastday[selectday];\nmsg.payload = wparse;\n}\ncatch(e) {}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 420,
"y": 1000,
"wires": [
[
"3d353aea.fda316",
"fefc2d58.acbba",
"65974f5.65af7b",
"9dff34b9.9e3958",
"772353fd.3b940c",
"159eb656.324ada",
"b7278812.1dcab8",
"e304dbfd.279578",
"12593f3e.b6ec71"
]
]
},
{
"id": "3d353aea.fda316",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "high temp",
"func": "try {\nvar tempC = msg.payload.high.celsius;\nmsg.payload = (tempC+\"°C\");\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}\n",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 910,
"wires": [
[
"bbcf51d4.571d2"
]
]
},
{
"id": "fefc2d58.acbba",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "low temp",
"func": "try {\nvar tempC = msg.payload.low.celsius;\nmsg.payload = (tempC+\"°C\");\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 950,
"wires": [
[
"cc017128.08002"
]
]
},
{
"id": "65974f5.65af7b",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "icon",
"func": "try {\nvar tempC = msg.payload.icon;\nmsg.payload = tempC;\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 870,
"wires": [
[
"e6caa906.ce5fc8"
]
]
},
{
"id": "9dff34b9.9e3958",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "date",
"func": "try {\nvar time = (msg.payload.date.epoch * 1000);\nmsg.payload = time;\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 830,
"wires": [
[
"afc47cc3.dab22"
]
]
},
{
"id": "e304dbfd.279578",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "rain day",
"func": "try {\nvar rainD = (msg.payload.qpf_day.mm).toString();\nmsg.payload = (rainD +\"mm\");\nreturn msg;\n}\ncatch(e) {\n msg.payload = \"no data\";\n return msg;\n}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 990,
"wires": [
[
"aa8a2cde.84648"
]
]
},
{
"id": "12593f3e.b6ec71",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "rain night",
"func": "try {\nvar rainN = (msg.payload.qpf_night.mm).toString();\nmsg.payload = (rainN +\"mm\");\nreturn msg;\n}\ncatch(e) {\n msg.payload = \"no data\";\n return msg;\n}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 1030,
"wires": [
[
"2031fcea.49e464"
]
]
},
{
"id": "2031fcea.49e464",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 5,
"width": "2",
"height": "1",
"name": "Rain - night",
"label": "rain ",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 810,
"y": 1030,
"wires": []
},
{
"id": "772353fd.3b940c",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "humidity",
"func": "try {\nvar hum = msg.payload.avehumidity;\nmsg.payload = (hum)+\"%\";\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 1070,
"wires": [
[
"d16948aa.b123c8"
]
]
},
{
"id": "d16948aa.b123c8",
"type": "ui_text",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"order": 12,
"width": "3",
"height": "1",
"name": "",
"label": "humidity",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 800,
"y": 1070,
"wires": []
},
{
"id": "159eb656.324ada",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "wind deg",
"func": "try {\nvar wdir = msg.payload.maxwind.degrees;\nif (wdir <= 180) {\n wdir = (wdir + 180);\n}\nelse\nwdir = (wdir - 180);\nmsg.payload = wdir;\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 1110,
"wires": [
[
"b1f32bd5.527f28"
]
]
},
{
"id": "b7278812.1dcab8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "wspeed",
"func": "try {\nvar windS = msg.payload.maxwind.mph;\nmsg.payload = (windS+\" mph\");\nreturn msg;\n}\ncatch(e) {node.status({text:\"Warning \"+e});}",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 1150,
"wires": [
[
"67eadd71.91a894"
]
]
},
{
"id": "db626c57.382e9",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Summary",
"func": "var day = msg.topic;\nvar selectday = (day * 2);\nvar selectnight = (selectday + 1);\nvar summaryday = msg.payload.forecast.txt_forecast.forecastday[selectday].fcttext;\nvar day = msg.payload.forecast.txt_forecast.forecastday[selectday].title;\nvar dayicon = msg.payload.forecast.txt_forecast.forecastday[selectday].icon;\nvar summarynight = msg.payload.forecast.txt_forecast.forecastday[selectnight].fcttext;\nvar nighticon = msg.payload.forecast.txt_forecast.forecastday[selectnight].icon;\n\nvar comb = (day + \" day \" + '' + '
' + summaryday + '
' + day + \" night \" + '' + '
' + summarynight);\nmsg.payload = comb;\nreturn msg;\n",
"outputs": "1",
"noerr": 0,
"x": 420,
"y": 1190,
"wires": [
[
"51fcbf54.37652"
]
]
},
{
"id": "6da56493.0c874c",
"type": "ui_template",
"z": "a444a9ff.e7a408",
"group": "a9c0b162.e0664",
"name": "weather summary",
"order": 13,
"width": "6",
"height": "11",
"format": "Weather Forecast Summary
\n\n",
"storeOutMessages": false,
"fwdInMessages": false,
"templateScope": "local",
"x": 830,
"y": 1190,
"wires": [
[]
]
},
{
"id": "d4bd72a.dc5869",
"type": "link in",
"z": "a444a9ff.e7a408",
"name": "",
"links": [
"6bf9da4c.da8f34"
],
"x": 58.234375,
"y": 1090.109375,
"wires": [
[
"f3889fbb.8b5d5"
]
]
},
{
"id": "6bf9da4c.da8f34",
"type": "link out",
"z": "a444a9ff.e7a408",
"name": "",
"links": [
"d4bd72a.dc5869"
],
"x": 814.234375,
"y": 1279.75,
"wires": []
},
{
"id": "27afa2f2.6b35ce",
"type": "link out",
"z": "a444a9ff.e7a408",
"name": "",
"links": [
"3e03e98c.fe4746",
"7f822dd6.3206d4"
],
"x": 726.3300170898438,
"y": 1400.1099853515625,
"wires": []
},
{
"id": "3e03e98c.fe4746",
"type": "link in",
"z": "a444a9ff.e7a408",
"name": "",
"links": [
"27afa2f2.6b35ce"
],
"x": 65,
"y": 140,
"wires": [
[
"ec1733aa.67ef3"
]
]
},
{
"id": "7f822dd6.3206d4",
"type": "link in",
"z": "a444a9ff.e7a408",
"name": "",
"links": [
"27afa2f2.6b35ce"
],
"x": 45,
"y": 570,
"wires": [
[
"33bd1a93.e59e06"
]
]
},
{
"id": "28f7ee85.c6a102",
"type": "ui_dropdown",
"z": "a444a9ff.e7a408",
"name": "Select",
"label": "",
"place": "",
"group": "a9c0b162.e0664",
"order": 9,
"width": "3",
"height": "1",
"passthru": true,
"options": [
{
"label": "today",
"value": "0",
"type": "str"
},
{
"label": "today + 1",
"value": "1",
"type": "str"
},
{
"label": "today + 2",
"value": "2",
"type": "str"
},
{
"label": "today + 3",
"value": "3",
"type": "str"
},
{
"label": "today + 4",
"value": "4",
"type": "str"
},
{
"label": "today + 5",
"value": "5",
"type": "str"
},
{
"label": "today + 6",
"value": "6",
"type": "str"
},
{
"label": "today + 7",
"value": "7",
"type": "str"
},
{
"label": "today + 8",
"value": "8",
"type": "str"
},
{
"label": "today + 9",
"value": "9",
"type": "str"
}
],
"payload": "",
"topic": "dropdown",
"x": 209.234375,
"y": 1330.75,
"wires": [
[
"957fa78d.240da8"
]
]
},
{
"id": "90c985d3.6072a8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Current",
"func": "try {\nvar selectday = msg.topic;\nvar wparse = msg.payload.current_observation;\nmsg.payload = wparse;\n}\ncatch(e) {}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 435.2103157043457,
"y": 627.2501106262207,
"wires": [
[
"9b1a0ef3.77528",
"7f9ae0e5.9ce56",
"c6698c91.573c4",
"32bb3936.7aacd6",
"4934b52c.b442dc",
"952825ce.eef7a8",
"b074c353.079b2",
"f0546cf7.c293e"
]
]
},
{
"id": "9b1a0ef3.77528",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Dewpoint",
"func": "var dew = msg.payload.dewpoint_c;\nmsg.payload = dew;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 540,
"wires": [
[
"e695380c.df7ab8"
]
]
},
{
"id": "7f9ae0e5.9ce56",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Wind deg",
"func": "var windD = msg.payload.wind_degrees;\n if (windD <= 180) {\n windD = (windD + 180);\n }\n else\n windD = (windD - 180);\nmsg.payload = windD;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 580,
"wires": [
[
"5d414aae.1c44f4"
]
]
},
{
"id": "c6698c91.573c4",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Obs time",
"func": "var obs = msg.payload.observation_time;\nmsg.payload = obs;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 620,
"wires": [
[
"89c76554.bc4ed8"
]
]
},
{
"id": "32bb3936.7aacd6",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Humidity",
"func": "var hum = msg.payload.relative_humidity;\nmsg.payload = hum;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 660,
"wires": [
[
"7ecf24ed.e5f57c"
]
]
},
{
"id": "4934b52c.b442dc",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Pressure",
"func": "var pressure = msg.payload.pressure_mb;\nmsg.payload = pressure;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 700,
"wires": [
[
"7730383a.9fe0e8"
]
]
},
{
"id": "952825ce.eef7a8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Icon",
"func": "var icon = msg.payload.icon;\nmsg.payload = icon;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 740,
"wires": [
[
"c78f398f.03efe8"
]
]
},
{
"id": "1ab305b7.b32aaa",
"type": "inject",
"z": "a444a9ff.e7a408",
"name": "on startup",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": true,
"x": 118.33001708984375,
"y": 1401.1099853515625,
"wires": [
[
"e3dc75c7.1fe5a8"
]
]
},
{
"id": "33bd1a93.e59e06",
"type": "credentials",
"z": "a444a9ff.e7a408",
"name": "",
"props": [
{
"value": "secure",
"type": "msg"
}
],
"x": 150,
"y": 570,
"wires": [
[
"768fa07.070bd6"
]
]
},
{
"id": "d6192476.4026a8",
"type": "credentials",
"z": "a444a9ff.e7a408",
"name": "",
"props": [
{
"value": "secure",
"type": "msg"
}
],
"x": 512.234375,
"y": 1279.75,
"wires": [
[
"f7141e31.16de2"
]
]
},
{
"id": "35a0e994.665c66",
"type": "ui_ui_control",
"z": "a444a9ff.e7a408",
"name": "",
"x": 102.234375,
"y": 1256.75,
"wires": [
[
"957fa78d.240da8"
]
]
},
{
"id": "957fa78d.240da8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Reload",
"func": "//Load flow context to variable\nvar select = flow.get('dropdown')||1;\n\n//If dropdown option is changed\nif (msg.topic=='dropdown') {\n flow.set('dropdown',msg.payload);\n node.send ({topic:msg.payload});\n }\n \n//If http connection is made, or triggered by inject\nelse if (msg.payload=='connect') {\n node.send ({topic:select});\n }\n\n//Or do nothing\nelse {node.send (null);}\n",
"outputs": "1",
"noerr": 0,
"x": 353.234375,
"y": 1279.75,
"wires": [
[
"d6192476.4026a8"
]
]
},
{
"id": "87cec386.9daaa",
"type": "inject",
"z": "a444a9ff.e7a408",
"name": "New day",
"topic": "",
"payload": "connect",
"payloadType": "str",
"repeat": "",
"crontab": "01 00 * * *",
"once": false,
"x": 177.234375,
"y": 1293.75,
"wires": [
[
"957fa78d.240da8"
]
]
},
{
"id": "51fcbf54.37652",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Change units",
"func": "//Convert 65F to celsius\nvar temp1 = msg.payload.replace(/-?\\d+F/g,\n function(s){\n return Math.round((parseInt(s) - 32) * (5/9))+\"C\";\n });\n//Convert 'temperature in 60s' to celsius\nmsg.payload = temp1.replace(/-?\\d+s/g,\n function(s){\n return Math.round((parseInt(s) - 32) * (5/9))+\"s\";\n });\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 1190,
"wires": [
[
"6da56493.0c874c"
]
]
},
{
"id": "aac4d164.28ba9",
"type": "ui_chart",
"z": "a444a9ff.e7a408",
"name": "temp chart",
"group": "304cf995.dc6556",
"order": 2,
"width": 0,
"height": 0,
"label": "Temperature",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "24",
"removeOlderPoints": "",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"colors": [
"#00ff80",
"#0080c0",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 810,
"y": 290,
"wires": [
[
"4c65dcba.790234"
],
[]
]
},
{
"id": "4c65dcba.790234",
"type": "persist in",
"z": "a444a9ff.e7a408",
"name": "Temperature",
"storageNode": "321f5c79.72bc64",
"x": 990,
"y": 290,
"wires": []
},
{
"id": "2d481f60.6fcba",
"type": "persist out",
"z": "a444a9ff.e7a408",
"name": "Temperature",
"storageNode": "321f5c79.72bc64",
"x": 610,
"y": 290,
"wires": [
[
"aac4d164.28ba9"
]
]
},
{
"id": "b074c353.079b2",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Temp",
"func": "var temp = msg.payload.temp_c;\nvar feels = msg.payload.feelslike_c;\n\nvar newMess1 = {\n topic:\"temperature\",\n payload:temp,\n};\n\nvar newMess2 = {\n topic:\"feelslike\",\n payload:feels,\n};\n\nreturn [ newMess1, newMess2 ];\n",
"outputs": 2,
"noerr": 0,
"x": 610,
"y": 370,
"wires": [
[
"aac4d164.28ba9",
"1d762d93.be4822"
],
[
"aac4d164.28ba9",
"42cb8696.e24cc8"
]
]
},
{
"id": "5916b35a.2ad6ac",
"type": "persist out",
"z": "a444a9ff.e7a408",
"name": "Wind",
"storageNode": "321f5c79.72bc64",
"x": 620,
"y": 410,
"wires": [
[
"b74e17f4.f6fe18"
]
]
},
{
"id": "f0546cf7.c293e",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Wind",
"func": "var wind = msg.payload.wind_mph;\nvar gust = msg.payload.wind_gust_mph;\nvar gustB = gust;\n\nif (gust < wind) {\n gustB = wind;\n}\n\nvar newMess1 = {\n topic:\"wind\",\n payload:wind,\n};\n\nvar newMess2 = {\n topic:\"gust\",\n payload:gustB,\n};\n\nvar newMess3 = {\n payload:gust,\n};\n\n// return newMessage;\nreturn [ newMess1, newMess2, newMess3 ];\n",
"outputs": 3,
"noerr": 0,
"x": 610,
"y": 470,
"wires": [
[
"b74e17f4.f6fe18",
"977d821d.9c2e2"
],
[
"b74e17f4.f6fe18"
],
[
"2036273f.0b5818"
]
]
},
{
"id": "b74e17f4.f6fe18",
"type": "ui_chart",
"z": "a444a9ff.e7a408",
"name": "wind chart",
"group": "304cf995.dc6556",
"order": 14,
"width": 0,
"height": 0,
"label": "Wind",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "24",
"removeOlderPoints": "",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"colors": [
"#00ff80",
"#0080c0",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 810,
"y": 410,
"wires": [
[
"558afa5e.9d3034"
],
[]
]
},
{
"id": "558afa5e.9d3034",
"type": "persist in",
"z": "a444a9ff.e7a408",
"name": "Wind",
"storageNode": "321f5c79.72bc64",
"x": 970,
"y": 410,
"wires": []
},
{
"id": "edebb4d8.5effe8",
"type": "function",
"z": "a444a9ff.e7a408",
"name": "Create time",
"func": " var d = new Date();\n // dt = d.toDateString();\n h = (d.getHours());\n m = (d.getMinutes());\n if (m < 10) {\n var min = '0' + m;\n }\n else (min = m);\n msg.payload = (h+\":\"+min);\n node.send(msg);\n ",
"outputs": 1,
"noerr": 0,
"x": 260,
"y": 1460,
"wires": [
[
"db5b3dc1.a0973"
]
]
},
{
"id": "2ad10c01.af7f44",
"type": "comment",
"z": "a444a9ff.e7a408",
"name": "Darsky parser",
"info": "",
"x": 120,
"y": 50,
"wires": []
},
{
"id": "6b0d518d.cdfff",
"type": "comment",
"z": "a444a9ff.e7a408",
"name": "Wunderground forecast",
"info": "",
"x": 150,
"y": 1010,
"wires": []
},
{
"id": "304cf995.dc6556",
"type": "ui_group",
"z": "a444a9ff.e7a408",
"name": "Current Conditions",
"tab": "49e5ad81.6d6e24",
"order": 1,
"disp": true,
"width": "6"
},
{
"id": "a9c0b162.e0664",
"type": "ui_group",
"z": "",
"name": "Forecast",
"tab": "49e5ad81.6d6e24",
"order": 2,
"disp": true,
"width": "6"
},
{
"id": "321f5c79.72bc64",
"type": "persist-store",
"z": "",
"filename": "/home/pi/.node-red/cache/weather.json",
"interval": "600"
},
{
"id": "49e5ad81.6d6e24",
"type": "ui_tab",
"z": "a444a9ff.e7a408",
"name": "weather",
"icon": "cloud",
"order": 2
}
]