Windy widget that is updated with GPS location

Hi,

In my boat project, I want an updated weather forecast from Windy. Inserting an embed widget on the dashboard with fixed GPS coordinates works fine, but since I am in a boat, I want the weather forecast to be updated according to my actual GPS position.

The idea was to use a function node to generate the payload as the updated URL based on the GPS position and then inject it into a UI node.

[{"id":"b5d995a5.20f068","type":"ui_iframe","z":"2c10ded5.668062","group":"4acc60c0.d0499","name":"","order":17,"width":"10","height":"10","url":"{{{payload}}}","origin":"*","x":690,"y":420,"wires":[["96985776.50d0c8"]]},{"id":"96985776.50d0c8","type":"debug","z":"2c10ded5.668062","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":930,"y":460,"wires":[]},{"id":"4a47ca85.7447a4","type":"inject","z":"2c10ded5.668062","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"https://embed.windy.com/embed2.html?lat=70.444&lon=-5.669&detailLat=70.444&detailLon=-5.669&width=650&height=450&zoom=5&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=kt&metricTemp=default&radarRange=-1","payloadType":"str","x":510,"y":460,"wires":[["b5d995a5.20f068","8cd21b2.61600e8"]]},{"id":"8cd21b2.61600e8","type":"ui_template","z":"2c10ded5.668062","group":"4acc60c0.d0499","name":"","order":21,"width":0,"height":0,"format":"<iframe width=\"650\" height=\"450\" src=\"msg.payload\" frameborder=\"0\"></iframe>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":700,"y":500,"wires":[["96985776.50d0c8"]]},{"id":"4acc60c0.d0499","type":"ui_group","name":"on","tab":"f4c3145a.719528","order":1,"disp":true,"width":"10","collapse":false},{"id":"f4c3145a.719528","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

can anyone point me in the right direction?

MY

This will display the Ifame, using msg.template.

[{"id":"4a47ca85.7447a4","type":"inject","z":"5a245aa1.510164","name":"","props":[{"p":"template","v":"<iframe width=\"650\" height=\"450\"         src=\"https://embed.windy.com/embed2.html?lat=76.206&lon=20.566&detailLat=76.206&detailLon=20.566&width=650&height=450&zoom=3&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=default&metricTemp=default&radarRange=-1\"         frameborder=\"0\"></iframe>","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"1","topic":"","x":190,"y":2220,"wires":[["22536548.e9649a"]]},{"id":"22536548.e9649a","type":"ui_template","z":"5a245aa1.510164","group":"8b5cde76.edd58","name":"","order":5,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":340,"y":2220,"wires":[["96985776.50d0c8"]]},{"id":"96985776.50d0c8","type":"debug","z":"5a245aa1.510164","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":2220,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"","tab":"8f03e639.85956","order":1,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Perfect!

Thx!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.