Advertisement
NittyGritty

GetInfoFromDarkSkyWeather

Jan 18th, 2020
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [
  2.     {
  3.         "id": "ae845d09.71def",
  4.         "type": "http request",
  5.         "z": "5a11cc5.689e934",
  6.         "name": "DarkSky API Request",
  7.         "method": "GET",
  8.         "ret": "txt",
  9.         "paytoqs": false,
  10.         "url": "https://api.darksky.net/forecast/96d2fb3d4672e9deb78606a58023320f/49.0,9.0?units=si&lang=de",
  11.         "tls": "",
  12.         "proxy": "",
  13.         "authType": "basic",
  14.         "x": 340,
  15.         "y": 560,
  16.         "wires": [
  17.             [
  18.                 "39dc384d.801f98"
  19.             ]
  20.         ]
  21.     },
  22.     {
  23.         "id": "fc189d06.c5c26",
  24.         "type": "inject",
  25.         "z": "5a11cc5.689e934",
  26.         "name": "",
  27.         "topic": "",
  28.         "payload": "",
  29.         "payloadType": "date",
  30.         "repeat": "",
  31.         "crontab": "",
  32.         "once": false,
  33.         "onceDelay": 0.1,
  34.         "x": 120,
  35.         "y": 560,
  36.         "wires": [
  37.             [
  38.                 "ae845d09.71def"
  39.             ]
  40.         ]
  41.     },
  42.     {
  43.         "id": "39dc384d.801f98",
  44.         "type": "json",
  45.         "z": "5a11cc5.689e934",
  46.         "name": "",
  47.         "property": "payload",
  48.         "action": "",
  49.         "pretty": false,
  50.         "x": 520,
  51.         "y": 560,
  52.         "wires": [
  53.             [
  54.                 "370ecf51.0a74f"
  55.             ]
  56.         ]
  57.     },
  58.     {
  59.         "id": "370ecf51.0a74f",
  60.         "type": "function",
  61.         "z": "5a11cc5.689e934",
  62.         "name": "",
  63.         "func": "var currentTime = msg.payload.currently.time*1000\n\nvar Temp = msg.payload.currently.temperature\nvar Hum  = msg.payload.currently.humidity * 100\nvar Dew = msg.payload.currently.dewPoint\nvar Pres = msg.payload.currently.pressure\n\nvar newMsg1 = {payload:currentTime};\nvar newMsg2 = {payload:Temp};\nvar newMsg3 = {payload:Hum};\nvar newMsg4 = {payload:Dew};\nvar newMsg5 = {payload:Pres};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Temp: \" + Temp + \"°C, Hum: \" + Hum + \"%rH\" + \", Dew: \" + Dew + \"°C\" });\nreturn [newMsg1, newMsg2, newMsg3, newMsg4, newMsg5];",
  64.         "outputs": 5,
  65.         "noerr": 0,
  66.         "x": 700,
  67.         "y": 560,
  68.         "wires": [
  69.             [
  70.                 "13f90fdd.9c227"
  71.             ],
  72.             [
  73.                 "635f1a83.f86194"
  74.             ],
  75.             [
  76.                 "d5e72b7c.a91138"
  77.             ],
  78.             [
  79.                 "a9b6f59.3f3f608"
  80.             ],
  81.             [
  82.                 "e8019b8f.06aee8"
  83.             ]
  84.         ]
  85.     },
  86.     {
  87.         "id": "4ca64f67.38c2a",
  88.         "type": "debug",
  89.         "z": "5a11cc5.689e934",
  90.         "name": "Current Time",
  91.         "active": true,
  92.         "tosidebar": true,
  93.         "console": false,
  94.         "tostatus": false,
  95.         "complete": "payload",
  96.         "targetType": "msg",
  97.         "x": 1050,
  98.         "y": 480,
  99.         "wires": []
  100.     },
  101.     {
  102.         "id": "635f1a83.f86194",
  103.         "type": "debug",
  104.         "z": "5a11cc5.689e934",
  105.         "name": "Temp",
  106.         "active": true,
  107.         "tosidebar": true,
  108.         "console": false,
  109.         "tostatus": false,
  110.         "complete": "payload",
  111.         "targetType": "msg",
  112.         "x": 1030,
  113.         "y": 520,
  114.         "wires": []
  115.     },
  116.     {
  117.         "id": "d5e72b7c.a91138",
  118.         "type": "debug",
  119.         "z": "5a11cc5.689e934",
  120.         "name": "Hum",
  121.         "active": true,
  122.         "tosidebar": true,
  123.         "console": false,
  124.         "tostatus": false,
  125.         "complete": "payload",
  126.         "targetType": "msg",
  127.         "x": 1030,
  128.         "y": 560,
  129.         "wires": []
  130.     },
  131.     {
  132.         "id": "a9b6f59.3f3f608",
  133.         "type": "debug",
  134.         "z": "5a11cc5.689e934",
  135.         "name": "Dew",
  136.         "active": true,
  137.         "tosidebar": true,
  138.         "console": false,
  139.         "tostatus": false,
  140.         "complete": "payload",
  141.         "targetType": "msg",
  142.         "x": 1030,
  143.         "y": 600,
  144.         "wires": []
  145.     },
  146.     {
  147.         "id": "e8019b8f.06aee8",
  148.         "type": "debug",
  149.         "z": "5a11cc5.689e934",
  150.         "name": "Pressure",
  151.         "active": true,
  152.         "tosidebar": true,
  153.         "console": false,
  154.         "tostatus": false,
  155.         "complete": "payload",
  156.         "targetType": "msg",
  157.         "x": 1040,
  158.         "y": 640,
  159.         "wires": []
  160.     },
  161.     {
  162.         "id": "13f90fdd.9c227",
  163.         "type": "moment",
  164.         "z": "5a11cc5.689e934",
  165.         "name": "",
  166.         "topic": "",
  167.         "input": "",
  168.         "inputType": "msg",
  169.         "inTz": "ETC/GMT",
  170.         "adjAmount": 0,
  171.         "adjType": "days",
  172.         "adjDir": "add",
  173.         "format": "dddd, DD. MMMM YYYY HH:mm:ss Z",
  174.         "locale": "de_DE",
  175.         "output": "",
  176.         "outputType": "msg",
  177.         "outTz": "Europe/Berlin",
  178.         "x": 860,
  179.         "y": 480,
  180.         "wires": [
  181.             [
  182.                 "4ca64f67.38c2a"
  183.             ]
  184.         ]
  185.     }
  186. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement