openweathermap graphs

Graphs for openweathermap. Needs a free api key.

image

[{"id":"45f83a66cc516d4c","type":"tab","label":"Weather","disabled":false,"info":""},{"id":"933eed7c97701c44","type":"http request","z":"45f83a66cc516d4c","name":"openweathermap","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.openweathermap.org/data/2.5/onecall?lat=33.44&lon=-94.04&appid={OPENWEATHER KEY}=metric&lang=en","tls":"","persist":false,"proxy":"","authType":"","credentials":{"user":"","password":""},"x":130,"y":120,"wires":[["abca13f0a2ec8e07","b6f033c2c72efad6","57877ae933a99a4d","b9c5534f220ed60b","9ed151c624909110","038f27d5ebd179b8","19fe35b90dd5c9db","317120872d98876e","dc7ae7174e380d32","fa642cfc962fae7f"]]},{"id":"f9e0f19b980399cd","type":"inject","z":"45f83a66cc516d4c","name":"","props":[{"p":"last_update","v":"","vt":"date"},{"p":"topic","vt":"str"}],"repeat":"600","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":60,"wires":[["933eed7c97701c44"]]},{"id":"abca13f0a2ec8e07","type":"mqtt out","z":"45f83a66cc516d4c","name":"","topic":"/openweathermap/","qos":"","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"9b1fd2549fe06e22","x":370,"y":60,"wires":[]},{"id":"038f27d5ebd179b8","type":"ui_template","z":"45f83a66cc516d4c","group":"70fb931.dfc146c","name":"Weather description","order":1,"width":"6","height":"2","format":"<div>{{msg.payload.current.weather[0].description}}</div>\n<div>{{msg.payload.current.temp}}c, feels like {{msg.payload.current.feels_like}}c</div>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":560,"y":140,"wires":[[]]},{"id":"b6f033c2c72efad6","type":"change","z":"45f83a66cc516d4c","name":"Temperature chart","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"temperature\",\"feels like\"],\t\"data\":[\t        [[payload.hourly].{'x':dt*1000,'y':temp}],\t        [[payload.hourly].{'x':dt*1000,'y':feels_like}]\t\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":220,"wires":[["14a3b7286b35b67a"]]},{"id":"14a3b7286b35b67a","type":"ui_chart","z":"45f83a66cc516d4c","name":"","group":"70fb931.dfc146c","order":3,"width":"6","height":"3","label":"Temperature","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"bezier","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":580,"y":220,"wires":[[]]},{"id":"57877ae933a99a4d","type":"change","z":"45f83a66cc516d4c","name":"Rain/UV/clouds","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"UV percentage\",\"Cloud percentage\",\"Precipitation chance\",\"Humidity\"],\t\"data\":[\t        [[payload.hourly].{'x':dt*1000,'y':$round(uvi*10,2)}],\t        [[payload.hourly].{'x':dt*1000,'y':clouds}],\t        [[payload.hourly].{'x':dt*1000,'y':$round(pop*100,2)}],\t        [[payload.hourly].{'x':dt*1000,'y':humidity}]\t\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":320,"wires":[["308a2e6d007c49e4"]]},{"id":"308a2e6d007c49e4","type":"ui_chart","z":"45f83a66cc516d4c","name":"","group":"a8c1f1b6c055054c","order":1,"width":"6","height":"3","label":"Sky","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"bezier","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#bba01a","#6bb4cf","#12008a","#dcffdc","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":510,"y":320,"wires":[[]]},{"id":"b9c5534f220ed60b","type":"change","z":"45f83a66cc516d4c","name":"wind","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"Average Wind\",\"Gusting\"],\t\"data\":[\t        [[payload.hourly].{'x':dt*1000,'y':wind_speed}],\t        [[payload.hourly].{'x':dt*1000,'y':wind_gust}]\t\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":360,"wires":[["db8101c9f8340189"]]},{"id":"db8101c9f8340189","type":"ui_chart","z":"45f83a66cc516d4c","name":"Wind","group":"a8c1f1b6c055054c","order":2,"width":"6","height":"3","label":"","chartType":"line","legend":"true","xformat":"dd HH:mm","interpolate":"bezier","nodata":"","dot":false,"ymin":"0","ymax":"","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":510,"y":360,"wires":[[]]},{"id":"9ed151c624909110","type":"change","z":"45f83a66cc516d4c","name":"Rain","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"Daily Rain mm\",\"Daily Snow mm\"],\t\"data\":[\t        [[payload.daily].{'x':dt*1000,'y':rain? rain : 0}],\t        [[payload.daily].{'x':dt*1000,'y':snow? snow: 0}]\t\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":500,"wires":[["e878e88063a0666f"]]},{"id":"e878e88063a0666f","type":"ui_chart","z":"45f83a66cc516d4c","name":"Daily rain","group":"9115ee4b98042819","order":2,"width":"3","height":"3","label":"Precipitation","chartType":"line","legend":"false","xformat":"ddd DD","interpolate":"step","nodata":"","dot":false,"ymin":"0","ymax":"","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":520,"y":500,"wires":[[]]},{"id":"19fe35b90dd5c9db","type":"ui_template","z":"45f83a66cc516d4c","group":"70fb931.dfc146c","name":"Weather alerts","order":2,"width":0,"height":0,"format":"<div ng-repeat=\"alert in msg.payload.alerts\">\n    <h4>{{alert.event}}</h4>\n    <p>{{alert.description}}</p>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":540,"y":180,"wires":[[]]},{"id":"5d980c2d9491c6eb","type":"ui_button","z":"45f83a66cc516d4c","name":"","group":"70fb931.dfc146c","order":4,"width":0,"height":0,"passthru":false,"label":"Refresh data","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":110,"y":180,"wires":[["933eed7c97701c44"]]},{"id":"317120872d98876e","type":"change","z":"45f83a66cc516d4c","name":"Sun and moon","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"Sunrise\",\"Moonrise\",\"Moon Phase\"],\t\"data\":[\t        [[\t          [payload.daily].{'x':sunrise*1000,'y':1},\t          [payload.daily].{'x':sunset*1000,'y':0}\t        ]^(x)],\t        [[\t          [payload.daily].{'x':moonrise*1000,'y':1},\t          [payload.daily].{'x':moonset*1000,'y':0}\t        ]^(x)],\t        /* convert moon phase so that 0.5 is 1, then start counting back down */\t        [[payload.daily].{'x':moonrise*1000,'y': $round(moon_phase > 0.51 ? 1-moon_phase : moon_phase*2, 2)}]\t    ]\t}]","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"sun-and-moon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":540,"wires":[["4d670e17f89a62de"]]},{"id":"4d670e17f89a62de","type":"ui_chart","z":"45f83a66cc516d4c","name":"Sun and moon","group":"9115ee4b98042819","order":4,"width":"6","height":"4","label":"","chartType":"line","legend":"true","xformat":"dd HH:mm","interpolate":"step","nodata":"","dot":true,"ymin":"-0.5","ymax":"1.5","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#ff7f0e","#1f77b4","#002c41","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":540,"y":540,"wires":[[]]},{"id":"dc7ae7174e380d32","type":"change","z":"45f83a66cc516d4c","name":"Daily Rain/UV/clouds","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"UV percentage\",\"Cloud percentage\",\"Precipitation chance\", \"Humidity\"],\t\"data\":[\t        [[payload.daily].{'x':dt*1000,'y':$round(uvi*10,2)}],\t        [[payload.daily].{'x':dt*1000,'y':clouds}],\t        [[payload.daily].{'x':dt*1000,'y':$round(pop*100,2)}],\t        [[payload.daily].{'x':dt*1000,'y':humidity}]\t\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":420,"wires":[["b30f5e396fe6edea"]]},{"id":"b30f5e396fe6edea","type":"ui_chart","z":"45f83a66cc516d4c","name":"","group":"9115ee4b98042819","order":3,"width":"6","height":"3","label":"Daily Sky","chartType":"line","legend":"false","xformat":"ddd MMMM Do","interpolate":"step","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#bba01a","#6bb4cf","#12008a","#dcffdc","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":580,"y":420,"wires":[[]]},{"id":"fa642cfc962fae7f","type":"change","z":"45f83a66cc516d4c","name":"Daily temperature chart","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\t'series':[\"Average\",\"Minimum\",\"Maximum\"],\t\"data\":[\t        [[payload.daily].{'x':dt*1000,'y':temp.day}],\t        [[payload.daily].{'x':dt*1000,'y':temp.min}],\t        [[payload.daily].{'x':dt*1000,'y':temp.max}]\t    ]\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":260,"wires":[["3668fd3f224d50d8"]]},{"id":"3668fd3f224d50d8","type":"ui_chart","z":"45f83a66cc516d4c","name":"Daily temp","group":"9115ee4b98042819","order":1,"width":"3","height":"3","label":"Temperature","chartType":"line","legend":"false","xformat":"ddd DD","interpolate":"step","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"26","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":610,"y":260,"wires":[[]]},{"id":"9b1fd2549fe06e22","type":"mqtt-broker","name":"test.mosquitto.org","broker":"test.mosquitto.org","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"70fb931.dfc146c","type":"ui_group","name":"MainGroup","tab":"4bb34f67.69a87","order":1,"disp":false,"width":"6","collapse":false},{"id":"a8c1f1b6c055054c","type":"ui_group","name":"Group2","tab":"4bb34f67.69a87","order":2,"disp":false,"width":"6","collapse":false},{"id":"9115ee4b98042819","type":"ui_group","name":"Weekly","tab":"4bb34f67.69a87","order":3,"disp":true,"width":"6","collapse":false},{"id":"4bb34f67.69a87","type":"ui_tab","name":"Weather","icon":"fa-cloud","order":3,"disabled":false,"hidden":false}]

Flow Info

Created 4 years ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x7)
  • http request (x1)
  • inject (x1)
  • mqtt out (x1)
  • mqtt-broker (x1)
Other
  • tab (x1)
  • ui_button (x1)
  • ui_chart (x7)
  • ui_group (x3)
  • ui_tab (x1)
  • ui_template (x2)

Tags

  • weather
  • dashboard
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option