Advertisement
NittyGritty

Untitled

May 22nd, 2022
991
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [
  2.     {
  3.         "id": "acb26b85.d853b8",
  4.         "type": "function",
  5.         "z": "8bb86979.658488",
  6.         "name": "Aktuelles Wetter ausgeben",
  7.         "func": "// var weather = JSON.parse(msg.payload);\n\n// var SunSet  = new Date(weather.sys.sunset * 1000) ;\n// var SunRise = new Date(weather.sys.sunrise * 1000);\n\nvar SunSet  = new Date(msg.payload.sys.sunset * 1000) ;\nvar SunRise = new Date(msg.payload.sys.sunrise * 1000);\n\n\n\nSunRiseForm = (SunRise.toLocaleTimeString([], {\n    hourCycle: 'h23',\n    hour: '2-digit',\n    minute: '2-digit',\n    second: '2-digit'\n}));\n\nSunSetForm = (SunSet.toLocaleTimeString([], {\n    hourCycle: 'h23',\n    hour: '2-digit',\n    minute: '2-digit',\n    second: '2-digit'\n}));\n\nvar newMsg  = \"Temperatur in \" + msg.payload.name +\n    \" ist \"+((msg.payload.main.temp-273).toFixed(1)) + \"°C.\\r\\n\" + \n    \"Luftdruck in Koßdorf \"+ msg.payload.main.pressure + \"hPa.\\r\\n\" + \n    \"Luftfeuchte in Koßdorf ist \"+ msg.payload.main.humidity + \"%rH.\\r\\n\"+\n    \"Sonnenaufgang ist um  \"  + SunRiseForm + \" Uhr\\r\\n\" + \n    \"Sonnenuntergang ist um \" + SunSetForm + \" Uhr\\r\\n\" \n\nmsg.payload = {}\nmsg.payload.chatId = '1528582458'\nmsg.payload.type = 'message'\nmsg.payload.content = newMsg\nreturn msg;",
  8.         "outputs": 1,
  9.         "noerr": 0,
  10.         "initialize": "",
  11.         "finalize": "",
  12.         "x": 660,
  13.         "y": 60,
  14.         "wires": [
  15.             [
  16.                 "bc410cc.8ffc9f",
  17.                 "c077e1ac.8ab92"
  18.             ]
  19.         ]
  20.     },
  21.     {
  22.         "id": "969f682e.9bbe28",
  23.         "type": "http request",
  24.         "z": "8bb86979.658488",
  25.         "name": "OpenWeatherMap API",
  26.         "method": "GET",
  27.         "paytoqs": false,
  28.         "url": "https://api.openweathermap.org/data/2.5/weather?q=Pusemucle,de&appid=<musstdudirbesorgen>",
  29.         "tls": "",
  30.         "persist": false,
  31.         "proxy": "",
  32.         "authType": "",
  33.         "credentials": {},
  34.         "x": 380,
  35.         "y": 60,
  36.         "wires": [
  37.             [
  38.                 "24f932a.e3a98ce"
  39.             ]
  40.         ]
  41.     },
  42.     {
  43.         "id": "faf93626.968808",
  44.         "type": "inject",
  45.         "z": "8bb86979.658488",
  46.         "name": "Wetter anfordern",
  47.         "repeat": "",
  48.         "crontab": "",
  49.         "once": false,
  50.         "topic": "",
  51.         "payload": "",
  52.         "payloadType": "date",
  53.         "x": 160,
  54.         "y": 60,
  55.         "wires": [
  56.             [
  57.                 "969f682e.9bbe28"
  58.             ]
  59.         ]
  60.     },
  61.     {
  62.         "id": "bc410cc.8ffc9f",
  63.         "type": "debug",
  64.         "z": "8bb86979.658488",
  65.         "name": "Ausgabe",
  66.         "active": true,
  67.         "complete": "payload",
  68.         "x": 920,
  69.         "y": 40,
  70.         "wires": []
  71.     },
  72.     {
  73.         "id": "c077e1ac.8ab92",
  74.         "type": "telegram sender",
  75.         "z": "8bb86979.658488",
  76.         "name": "",
  77.         "bot": "69cbe584.7c618c",
  78.         "haserroroutput": false,
  79.         "outputs": 1,
  80.         "x": 930,
  81.         "y": 100,
  82.         "wires": [
  83.             [
  84.                 "bc410cc.8ffc9f"
  85.             ]
  86.         ]
  87.     },
  88.     {
  89.         "id": "24f932a.e3a98ce",
  90.         "type": "json",
  91.         "z": "8bb86979.658488",
  92.         "name": "",
  93.         "property": "payload",
  94.         "action": "",
  95.         "pretty": false,
  96.         "x": 520,
  97.         "y": 120,
  98.         "wires": [
  99.             [
  100.                 "acb26b85.d853b8"
  101.             ]
  102.         ]
  103.     },
  104.     {
  105.         "id": "69cbe584.7c618c",
  106.         "type": "telegram bot",
  107.         "botname": "<deinBot>",
  108.         "usernames": "<DeinName>",
  109.         "chatids": "1528582458",
  110.         "baseapiurl": "",
  111.         "updatemode": "webhook",
  112.         "pollinterval": "300",
  113.         "usesocks": false,
  114.         "sockshost": "",
  115.         "socksport": "6667",
  116.         "socksusername": "anonymous",
  117.         "sockspassword": "",
  118.         "bothost": "",
  119.         "botpath": "",
  120.         "localbotport": "8443",
  121.         "publicbotport": "8443",
  122.         "privatekey": "",
  123.         "certificate": "",
  124.         "useselfsignedcertificate": false,
  125.         "sslterminated": false,
  126.         "verboselogging": false
  127.     }
  128. ]
Advertisement
RAW Paste Data Copied
Advertisement