Snippets

Pete Matthews Flow to get Weather in Node red

Created by Pete Matthews
[{"id":"d52aba5b.843878","type":"http request","z":"f73f284d.d82888","name":"","method":"GET","ret":"txt","url":"https://api.forecast.io/forecast/657ddd4f5c55c8870a172c4cccad82bf/51.528308,-0.3817765","x":282,"y":52,"wires":[["dbb1a4c3.35dad8"]]},{"id":"dbb1a4c3.35dad8","type":"function","z":"f73f284d.d82888","name":"Prettify JSON","func":"msg.payload = JSON.stringify(JSON.parse(msg.payload),null,\"\\t\");\nreturn msg;","outputs":1,"noerr":0,"x":473,"y":52,"wires":[["e0efe5af.7a0ae8"]]},{"id":"e0efe5af.7a0ae8","type":"template","z":"f73f284d.d82888","name":"Display JSON","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the weather for London:\n{{{payload}}}","x":345,"y":123,"wires":[["18d6494.92689b7"]]},{"id":"8a22fa25.f32f28","type":"http in","z":"f73f284d.d82888","name":"","url":"/weather","method":"get","swaggerDoc":"","x":92,"y":54,"wires":[["d52aba5b.843878"]]},{"id":"18d6494.92689b7","type":"http response","z":"f73f284d.d82888","name":"","x":599,"y":122,"wires":[]}]

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.