Her er flowen. Det eneste du må huske, er å endre gps posisjonen i url, så den blir rett for ditt sted.
{
“Id”: “u99F0kOzHAy8yTB”,
“ClassId”: “jFrq6aP5seuh64d”,
“Author”: “”,
“Version”: 0,
“CreatedAt”: “2020-04-02T08:39:29.887208921+02:00”,
“UpdatedAt”: “2020-04-02T16:04:56.276996928+02:00”,
“Name”: “save_forecast”,
“Group”: “variables”,
“Description”: “Get forecast from api.met.no and save to global vars”,
“Nodes”: [
{
“Id”: “2”,
“Type”: “time_trigger”,
“Label”: “Every 30m”,
“SuccessTransition”: “3”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“DefaultMsg”: {
“Value”: “”,
“ValueType”: “”
},
“Expressions”: [
{
“Comments”: “”,
“Expression”: “@every 30m”,
“Name”: “”
}
],
“GenerateAstroTimeEvents”: false,
“Latitude”: null,
“Longitude”: null,
“SunriseTimeOffset”: 0,
“SunsetTimeOffset”: 0
},
“Ui”: {
“nodeType”: “”,
“x”: 330,
“y”: 138
}
},
{
“Id”: “3”,
“Type”: “rest_action”,
“Label”: “get forecast”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“Auth”: {
“ClientID”: “”,
“ClientSecret”: “”,
“Enabled”: false,
“GrantType”: “password”,
“Password”: “”,
“Scope”: “”,
“Url”: “http://”,
“Username”: “”
},
“Headers”: [
{
“Name”: “Content-type”,
“Value”: “application/json”
},
{
“Name”: “Content-type”,
“Value”: “text/xml”
}
],
“LogResponse”: false,
“Method”: “GET”,
“RequestPayloadType”: “xml”,
“RequestTemplate”: “”,
“ResponseMapping”: [
{
“IsVariableGlobal”: true,
“Name”: “temperature”,
“Path”: “//weatherdata/product/time[1]/location/temperature/@value”,
“PathType”: “xml”,
“TargetVariableName”: “forecast_temperature”,
“TargetVariableType”: “float”,
“UpdateTriggerMessage”: false
},
{
“IsVariableGlobal”: true,
“Name”: “weather”,
“Path”: “//symbol[1]/@id”,
“PathType”: “xml”,
“TargetVariableName”: “forecast_weather”,
“TargetVariableType”: “string”
},
{
“IsVariableGlobal”: true,
“Name”: “precipitation”,
“Path”: “//precipitation[1]/@value”,
“PathType”: “xml”,
“TargetVariableName”: “forecast_precipitation”,
“TargetVariableType”: “string”
},
{
“IsVariableGlobal”: true,
“Name”: “cloudiness”,
“Path”: “//time[1]/location/cloudiness/@percent”,
“PathType”: “xml”,
“TargetVariableName”: “forecast_cloudiness”,
“TargetVariableType”: “string”
}
],
“Url”: “https://api.met.no/weatherapi/locationforecast/1.9/?lat=59.15407&lon=11.00080”
},
“Ui”: {
“nodeType”: “”,
“x”: 382,
“y”: 374
}
}
],
“IsDisabled”: false,
“IsDefault”: false,
“ParallelExecution”: “parallel”
}