Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. Mit Node-Red Openweathermap mit Standorten mit Owentracks.

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    15
    1
    615

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    626

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    1.9k

Mit Node-Red Openweathermap mit Standorten mit Owentracks.

Geplant Angeheftet Gesperrt Verschoben Node-Red
10 Beiträge 2 Kommentatoren 647 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • N Offline
    N Offline
    NetFritz
    schrieb am zuletzt editiert von Homoran
    #1

    Hallo
    Ich möchte in einen Mobilen System (Wohnmobil) die Wetterdaten von Openweathermap abfragen.
    Owentracks liefert die Standortdaten über MQTT.
    Die Wetterdaten werden über Openweathermap API abgefragt.
    in der Simulation wo ich die GPS Daten lat un lon vorgebe läuft das schon.
    Blos bekomme ich es nicht hin die GPS Daten von Owentracks mit Openweathermap zu verbinden.

    [
        {
            "id": "9159ccfcf71468ba",
            "type": "tab",
            "label": "Flow 2",
            "disabled": false,
            "info": "",
            "env": []
        },
        {
            "id": "68ff18aa1b5e338e",
            "type": "function",
            "z": "9159ccfcf71468ba",
            "name": "lat",
            "func": "var latiude = { payload: msg.payload.lat };\nvar unix = latiude;\nvar str = \"lat:\";\nmsg.payload = unix;\nreturn msg.payload;\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 290,
            "y": 120,
            "wires": [
                [
                    "9e2cbcddc4ed8922"
                ]
            ]
        },
        {
            "id": "504c52975b40417a",
            "type": "function",
            "z": "9159ccfcf71468ba",
            "name": "lon",
            "func": "var longitude = { payload: msg.payload.lon };\nmsg.payload = longitude;\nreturn msg.payload;\n",
            "outputs": 1,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 290,
            "y": 180,
            "wires": [
                [
                    "4a5a62e0cbd3dceb"
                ]
            ]
        },
        {
            "id": "dd24d2477409f1e8",
            "type": "mqtt in",
            "z": "9159ccfcf71468ba",
            "name": "",
            "topic": "#",
            "qos": "2",
            "datatype": "auto-detect",
            "broker": "e72556340bb92c91",
            "nl": false,
            "rap": true,
            "rh": 0,
            "inputs": 0,
            "x": 130,
            "y": 140,
            "wires": [
                [
                    "504c52975b40417a",
                    "68ff18aa1b5e338e"
                ]
            ]
        },
        {
            "id": "9e2cbcddc4ed8922",
            "type": "debug",
            "z": "9159ccfcf71468ba",
            "name": "lat",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "payload",
            "targetType": "msg",
            "statusVal": "",
            "statusType": "auto",
            "x": 510,
            "y": 120,
            "wires": []
        },
        {
            "id": "4a5a62e0cbd3dceb",
            "type": "debug",
            "z": "9159ccfcf71468ba",
            "name": "lon",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "payload",
            "targetType": "msg",
            "statusVal": "",
            "statusType": "auto",
            "x": 510,
            "y": 180,
            "wires": []
        },
        {
            "id": "021a98c9b6d3c1cb",
            "type": "inject",
            "z": "9159ccfcf71468ba",
            "name": "",
            "props": [
                {
                    "p": "payload"
                },
                {
                    "p": "topic",
                    "vt": "str"
                }
            ],
            "repeat": "",
            "crontab": "",
            "once": false,
            "onceDelay": 0.1,
            "topic": "lat",
            "payload": "52.345",
            "payloadType": "num",
            "x": 160,
            "y": 340,
            "wires": [
                [
                    "7fd7848685667f31"
                ]
            ]
        },
        {
            "id": "7fd7848685667f31",
            "type": "join",
            "z": "9159ccfcf71468ba",
            "name": "",
            "mode": "custom",
            "build": "object",
            "property": "payload",
            "propertyType": "msg",
            "key": "topic",
            "joiner": "\\n",
            "joinerType": "str",
            "accumulate": true,
            "timeout": "",
            "count": "2",
            "reduceRight": false,
            "reduceExp": "",
            "reduceInit": "",
            "reduceInitType": "",
            "reduceFixup": "",
            "x": 320,
            "y": 380,
            "wires": [
                [
                    "5181d7da0422a756",
                    "a18da81bd8de15a8"
                ]
            ]
        },
        {
            "id": "c1237e7f1cad8040",
            "type": "inject",
            "z": "9159ccfcf71468ba",
            "name": "",
            "props": [
                {
                    "p": "payload"
                },
                {
                    "p": "topic",
                    "vt": "str"
                }
            ],
            "repeat": "",
            "crontab": "",
            "once": false,
            "onceDelay": 0.1,
            "topic": "lon",
            "payload": "9.1272736",
            "payloadType": "num",
            "x": 170,
            "y": 420,
            "wires": [
                [
                    "7fd7848685667f31"
                ]
            ]
        },
        {
            "id": "5181d7da0422a756",
            "type": "change",
            "z": "9159ccfcf71468ba",
            "name": "",
            "rules": [
                {
                    "t": "set",
                    "p": "payload.appid",
                    "pt": "msg",
                    "to": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "tot": "str"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 540,
            "y": 400,
            "wires": [
                [
                    "79f896ab2598bab8",
                    "01cce51743f36f9e"
                ]
            ]
        },
        {
            "id": "79f896ab2598bab8",
            "type": "debug",
            "z": "9159ccfcf71468ba",
            "name": "debug lat u. lon u key",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "payload",
            "targetType": "msg",
            "statusVal": "",
            "statusType": "auto",
            "x": 900,
            "y": 320,
            "wires": []
        },
        {
            "id": "01cce51743f36f9e",
            "type": "http request",
            "z": "9159ccfcf71468ba",
            "name": "",
            "method": "GET",
            "ret": "txt",
            "paytoqs": "query",
            "url": "http://api.openweathermap.org/data/2.5/weather",
            "tls": "",
            "persist": false,
            "proxy": "",
            "insecureHTTPParser": false,
            "authType": "",
            "senderr": false,
            "headers": [],
            "x": 870,
            "y": 400,
            "wires": [
                [
                    "95db18fe3639c97c"
                ]
            ]
        },
        {
            "id": "95db18fe3639c97c",
            "type": "debug",
            "z": "9159ccfcf71468ba",
            "name": "debug wetter",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "payload",
            "targetType": "msg",
            "statusVal": "",
            "statusType": "auto",
            "x": 1090,
            "y": 400,
            "wires": []
        },
        {
            "id": "a18da81bd8de15a8",
            "type": "debug",
            "z": "9159ccfcf71468ba",
            "name": "debug lat u. lon",
            "active": true,
            "tosidebar": true,
            "console": false,
            "tostatus": false,
            "complete": "payload",
            "targetType": "msg",
            "statusVal": "",
            "statusType": "auto",
            "x": 540,
            "y": 340,
            "wires": []
        },
        {
            "id": "e72556340bb92c91",
            "type": "mqtt-broker",
            "name": "Mosquitto",
            "broker": "127.0.0.1",
            "port": "1883",
            "clientid": "",
            "autoConnect": true,
            "usetls": false,
            "protocolVersion": "3",
            "keepalive": "60",
            "cleansession": true,
            "birthTopic": "",
            "birthQos": "0",
            "birthPayload": "",
            "birthMsg": {},
            "closeTopic": "",
            "closeQos": "0",
            "closePayload": "",
            "closeMsg": {},
            "willTopic": "",
            "willQos": "0",
            "willPayload": "",
            "willMsg": {},
            "userProps": "",
            "sessionExpiry": ""
        }
    ]
    


    MOD-EDIT: Code in code-tags und Spoiler gesetzt!

    Was kann ich machen das die GPS Daten von Owentracks mit der Openweathermap API verbunden werden?
    Gruß NetFritz
    NodeRed.jpg

    mickymM 1 Antwort Letzte Antwort
    0
    • N NetFritz

      Hallo
      Ich möchte in einen Mobilen System (Wohnmobil) die Wetterdaten von Openweathermap abfragen.
      Owentracks liefert die Standortdaten über MQTT.
      Die Wetterdaten werden über Openweathermap API abgefragt.
      in der Simulation wo ich die GPS Daten lat un lon vorgebe läuft das schon.
      Blos bekomme ich es nicht hin die GPS Daten von Owentracks mit Openweathermap zu verbinden.

      [
          {
              "id": "9159ccfcf71468ba",
              "type": "tab",
              "label": "Flow 2",
              "disabled": false,
              "info": "",
              "env": []
          },
          {
              "id": "68ff18aa1b5e338e",
              "type": "function",
              "z": "9159ccfcf71468ba",
              "name": "lat",
              "func": "var latiude = { payload: msg.payload.lat };\nvar unix = latiude;\nvar str = \"lat:\";\nmsg.payload = unix;\nreturn msg.payload;\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 290,
              "y": 120,
              "wires": [
                  [
                      "9e2cbcddc4ed8922"
                  ]
              ]
          },
          {
              "id": "504c52975b40417a",
              "type": "function",
              "z": "9159ccfcf71468ba",
              "name": "lon",
              "func": "var longitude = { payload: msg.payload.lon };\nmsg.payload = longitude;\nreturn msg.payload;\n",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "libs": [],
              "x": 290,
              "y": 180,
              "wires": [
                  [
                      "4a5a62e0cbd3dceb"
                  ]
              ]
          },
          {
              "id": "dd24d2477409f1e8",
              "type": "mqtt in",
              "z": "9159ccfcf71468ba",
              "name": "",
              "topic": "#",
              "qos": "2",
              "datatype": "auto-detect",
              "broker": "e72556340bb92c91",
              "nl": false,
              "rap": true,
              "rh": 0,
              "inputs": 0,
              "x": 130,
              "y": 140,
              "wires": [
                  [
                      "504c52975b40417a",
                      "68ff18aa1b5e338e"
                  ]
              ]
          },
          {
              "id": "9e2cbcddc4ed8922",
              "type": "debug",
              "z": "9159ccfcf71468ba",
              "name": "lat",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 510,
              "y": 120,
              "wires": []
          },
          {
              "id": "4a5a62e0cbd3dceb",
              "type": "debug",
              "z": "9159ccfcf71468ba",
              "name": "lon",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 510,
              "y": 180,
              "wires": []
          },
          {
              "id": "021a98c9b6d3c1cb",
              "type": "inject",
              "z": "9159ccfcf71468ba",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "lat",
              "payload": "52.345",
              "payloadType": "num",
              "x": 160,
              "y": 340,
              "wires": [
                  [
                      "7fd7848685667f31"
                  ]
              ]
          },
          {
              "id": "7fd7848685667f31",
              "type": "join",
              "z": "9159ccfcf71468ba",
              "name": "",
              "mode": "custom",
              "build": "object",
              "property": "payload",
              "propertyType": "msg",
              "key": "topic",
              "joiner": "\\n",
              "joinerType": "str",
              "accumulate": true,
              "timeout": "",
              "count": "2",
              "reduceRight": false,
              "reduceExp": "",
              "reduceInit": "",
              "reduceInitType": "",
              "reduceFixup": "",
              "x": 320,
              "y": 380,
              "wires": [
                  [
                      "5181d7da0422a756",
                      "a18da81bd8de15a8"
                  ]
              ]
          },
          {
              "id": "c1237e7f1cad8040",
              "type": "inject",
              "z": "9159ccfcf71468ba",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "lon",
              "payload": "9.1272736",
              "payloadType": "num",
              "x": 170,
              "y": 420,
              "wires": [
                  [
                      "7fd7848685667f31"
                  ]
              ]
          },
          {
              "id": "5181d7da0422a756",
              "type": "change",
              "z": "9159ccfcf71468ba",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload.appid",
                      "pt": "msg",
                      "to": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 540,
              "y": 400,
              "wires": [
                  [
                      "79f896ab2598bab8",
                      "01cce51743f36f9e"
                  ]
              ]
          },
          {
              "id": "79f896ab2598bab8",
              "type": "debug",
              "z": "9159ccfcf71468ba",
              "name": "debug lat u. lon u key",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 900,
              "y": 320,
              "wires": []
          },
          {
              "id": "01cce51743f36f9e",
              "type": "http request",
              "z": "9159ccfcf71468ba",
              "name": "",
              "method": "GET",
              "ret": "txt",
              "paytoqs": "query",
              "url": "http://api.openweathermap.org/data/2.5/weather",
              "tls": "",
              "persist": false,
              "proxy": "",
              "insecureHTTPParser": false,
              "authType": "",
              "senderr": false,
              "headers": [],
              "x": 870,
              "y": 400,
              "wires": [
                  [
                      "95db18fe3639c97c"
                  ]
              ]
          },
          {
              "id": "95db18fe3639c97c",
              "type": "debug",
              "z": "9159ccfcf71468ba",
              "name": "debug wetter",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 1090,
              "y": 400,
              "wires": []
          },
          {
              "id": "a18da81bd8de15a8",
              "type": "debug",
              "z": "9159ccfcf71468ba",
              "name": "debug lat u. lon",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 540,
              "y": 340,
              "wires": []
          },
          {
              "id": "e72556340bb92c91",
              "type": "mqtt-broker",
              "name": "Mosquitto",
              "broker": "127.0.0.1",
              "port": "1883",
              "clientid": "",
              "autoConnect": true,
              "usetls": false,
              "protocolVersion": "3",
              "keepalive": "60",
              "cleansession": true,
              "birthTopic": "",
              "birthQos": "0",
              "birthPayload": "",
              "birthMsg": {},
              "closeTopic": "",
              "closeQos": "0",
              "closePayload": "",
              "closeMsg": {},
              "willTopic": "",
              "willQos": "0",
              "willPayload": "",
              "willMsg": {},
              "userProps": "",
              "sessionExpiry": ""
          }
      ]
      


      MOD-EDIT: Code in code-tags und Spoiler gesetzt!

      Was kann ich machen das die GPS Daten von Owentracks mit der Openweathermap API verbunden werden?
      Gruß NetFritz
      NodeRed.jpg

      mickymM Online
      mickymM Online
      mickym
      Most Active
      schrieb am zuletzt editiert von mickym
      #2

      @netfritz Wenn Du den Flow nicht in CodeTags packst - dann brauchst Du den nicht hier posten, weil der nicht importierbar ist.

      Aber unabhängig davon - ich nutze auch die OPenweathermap API und ich vestehe das Problem nicht. Du musst doch nur die längen und Breitengrade von in die URL beim API Aufruf einbauen.

      Meine URL wird dann mit allen benötigten Daten zusammengebaut:

      6faa7249-5571-4220-b32f-04bf5284a978-image.png

      Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

      1 Antwort Letzte Antwort
      1
      • N Offline
        N Offline
        NetFritz
        schrieb am zuletzt editiert von
        #3

        @mickym
        Hallo habe es mal mitb einem node template versucht.
        Es leuft einfach nicht richtig.
        Es wir mir in der Debug entweder nur die Daten von Owentracks angezeigt oder es kommen nan einen deploy die Wetterdaten Stücken weise an.
        Ich hoffe Du kannst mir weiterhelfen.
        Vielen Dank
        Der Flow kommt noch das Forum schreibt immer nur Fehler
        Gruß NetFritz

        N mickymM 2 Antworten Letzte Antwort
        0
        • N NetFritz

          @mickym
          Hallo habe es mal mitb einem node template versucht.
          Es leuft einfach nicht richtig.
          Es wir mir in der Debug entweder nur die Daten von Owentracks angezeigt oder es kommen nan einen deploy die Wetterdaten Stücken weise an.
          Ich hoffe Du kannst mir weiterhelfen.
          Vielen Dank
          Der Flow kommt noch das Forum schreibt immer nur Fehler
          Gruß NetFritz

          N Offline
          N Offline
          NetFritz
          schrieb am zuletzt editiert von NetFritz
          #4
          code_text
          [
              {
                  "id": "9159ccfcf71468ba",
                  "type": "tab",
                  "label": "Flow 2",
                  "disabled": false,
                  "info": "",
                  "env": []
              },
              {
                  "id": "68ff18aa1b5e338e",
                  "type": "function",
                  "z": "9159ccfcf71468ba",
                  "name": "lat",
                  "func": "var latiude = { payload: msg.payload.lat };\nmsg.payload = latiude;\nreturn msg.payload;\n",
                  "outputs": 1,
                  "noerr": 0,
                  "initialize": "",
                  "finalize": "",
                  "libs": [],
                  "x": 950,
                  "y": 140,
                  "wires": [
                      [
                          "9e2cbcddc4ed8922"
                      ]
                  ]
              },
              {
                  "id": "504c52975b40417a",
                  "type": "function",
                  "z": "9159ccfcf71468ba",
                  "name": "lon",
                  "func": "var longitude = { payload: msg.payload.lon };\nmsg.payload = longitude;\nreturn msg.payload;\n",
                  "outputs": 1,
                  "noerr": 0,
                  "initialize": "",
                  "finalize": "",
                  "libs": [],
                  "x": 950,
                  "y": 220,
                  "wires": [
                      [
                          "4a5a62e0cbd3dceb"
                      ]
                  ]
              },
              {
                  "id": "dd24d2477409f1e8",
                  "type": "mqtt in",
                  "z": "9159ccfcf71468ba",
                  "name": "von Owentracks",
                  "topic": "#",
                  "qos": "2",
                  "datatype": "auto-detect",
                  "broker": "e72556340bb92c91",
                  "nl": false,
                  "rap": true,
                  "rh": 0,
                  "inputs": 0,
                  "x": 740,
                  "y": 300,
                  "wires": [
                      [
                          "504c52975b40417a",
                          "68ff18aa1b5e338e",
                          "340e4f32fdfeb328"
                      ]
                  ]
              },
              {
                  "id": "9e2cbcddc4ed8922",
                  "type": "debug",
                  "z": "9159ccfcf71468ba",
                  "name": "lat",
                  "active": true,
                  "tosidebar": true,
                  "console": false,
                  "tostatus": false,
                  "complete": "payload",
                  "targetType": "msg",
                  "statusVal": "",
                  "statusType": "auto",
                  "x": 1270,
                  "y": 140,
                  "wires": []
              },
              {
                  "id": "4a5a62e0cbd3dceb",
                  "type": "debug",
                  "z": "9159ccfcf71468ba",
                  "name": "lon",
                  "active": true,
                  "tosidebar": true,
                  "console": false,
                  "tostatus": false,
                  "complete": "payload",
                  "targetType": "msg",
                  "statusVal": "",
                  "statusType": "auto",
                  "x": 1270,
                  "y": 220,
                  "wires": []
              },
              {
                  "id": "340e4f32fdfeb328",
                  "type": "template",
                  "z": "9159ccfcf71468ba",
                  "name": "current with lat,lon",
                  "field": "url",
                  "fieldType": "msg",
                  "format": "handlebars",
                  "syntax": "mustache",
                  "template": "https://api.openweathermap.org/data/2.5/weather?lat={{lat}}&lon={{lon}}&lang=de&appid=f9cc084b8fe86a8c1d01f5xxxxxxxx",
                  "output": "str",
                  "x": 990,
                  "y": 300,
                  "wires": [
                      [
                          "b7474f232f101d7a"
                      ]
                  ]
              },
              {
                  "id": "b7474f232f101d7a",
                  "type": "debug",
                  "z": "9159ccfcf71468ba",
                  "name": "Request",
                  "active": true,
                  "tosidebar": true,
                  "console": false,
                  "tostatus": false,
                  "complete": "payload",
                  "targetType": "msg",
                  "statusVal": "",
                  "statusType": "auto",
                  "x": 1280,
                  "y": 300,
                  "wires": []
              },
              {
                  "id": "e72556340bb92c91",
                  "type": "mqtt-broker",
                  "name": "Mosquitto",
                  "broker": "127.0.0.1",
                  "port": "1883",
                  "clientid": "",
                  "autoConnect": true,
                  "usetls": false,
                  "protocolVersion": "3",
                  "keepalive": "60",
                  "cleansession": true,
                  "birthTopic": "",
                  "birthQos": "0",
                  "birthPayload": "",
                  "birthMsg": {},
                  "closeTopic": "",
                  "closeQos": "0",
                  "closePayload": "",
                  "closeMsg": {},
                  "willTopic": "",
                  "willQos": "0",
                  "willPayload": "",
                  "willMsg": {},
                  "userProps": "",
                  "sessionExpiry": ""
              }
          ]
          
          
          1 Antwort Letzte Antwort
          0
          • N NetFritz

            @mickym
            Hallo habe es mal mitb einem node template versucht.
            Es leuft einfach nicht richtig.
            Es wir mir in der Debug entweder nur die Daten von Owentracks angezeigt oder es kommen nan einen deploy die Wetterdaten Stücken weise an.
            Ich hoffe Du kannst mir weiterhelfen.
            Vielen Dank
            Der Flow kommt noch das Forum schreibt immer nur Fehler
            Gruß NetFritz

            mickymM Online
            mickymM Online
            mickym
            Most Active
            schrieb am zuletzt editiert von mickym
            #5

            @netfritz Längen und Breitengrad sind doch schon in einem Objekt enthalten. Das Schlechteste was man tun kann ist, das wieder auseinanderzureißen

            Normalerweise ist doch so ein waypoint etwas, wo beides schon enthalten ist - bei mir sieht das so aus:

            {
              "_type": "waypoint",
              "desc": "Test",
              "lat": 52.054783,
              "lon": 9.621828,
              "rad": 100,
              "rid": "3ff5fd",
              "tst": 1651687577
            }
            

            oder so ähnlich - da ist doch dann alles schon drin.

            Die msg.url dann halt in die http-request Node.

            498dfea5-6bb4-4274-ad22-58d52d351bd5-image.png

            [
               {
                   "id": "340e4f32fdfeb328",
                   "type": "template",
                   "z": "9159ccfcf71468ba",
                   "name": "current with lat,lon",
                   "field": "url",
                   "fieldType": "msg",
                   "format": "handlebars",
                   "syntax": "mustache",
                   "template": "https://api.openweathermap.org/data/2.5/weather?lat={{payload.lat}}&lon={{payload.lon}}&lang=de&appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                   "output": "str",
                   "x": 810,
                   "y": 320,
                   "wires": [
                       [
                           "b7474f232f101d7a"
                       ]
                   ]
               },
               {
                   "id": "b7474f232f101d7a",
                   "type": "debug",
                   "z": "9159ccfcf71468ba",
                   "name": "Request",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "url",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 1020,
                   "y": 320,
                   "wires": []
               },
               {
                   "id": "408321c5104ff51e",
                   "type": "inject",
                   "z": "9159ccfcf71468ba",
                   "name": "",
                   "props": [
                       {
                           "p": "payload"
                       }
                   ],
                   "repeat": "",
                   "crontab": "",
                   "once": false,
                   "onceDelay": 0.1,
                   "topic": "",
                   "payload": "{\"_type\":\"waypoint\",\"desc\":\"Test\",\"lat\":52.054783,\"lon\":9.621828,\"rad\":100,\"rid\":\"3ff5fd\",\"tst\":1651687577}",
                   "payloadType": "json",
                   "x": 570,
                   "y": 320,
                   "wires": [
                       [
                           "340e4f32fdfeb328",
                           "b3ce2f9474d3a32a"
                       ]
                   ]
               },
               {
                   "id": "b3ce2f9474d3a32a",
                   "type": "debug",
                   "z": "9159ccfcf71468ba",
                   "name": "Input",
                   "active": true,
                   "tosidebar": true,
                   "console": false,
                   "tostatus": false,
                   "complete": "payload",
                   "targetType": "msg",
                   "statusVal": "",
                   "statusType": "auto",
                   "x": 770,
                   "y": 260,
                   "wires": []
               }
            ]
            

            Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

            N 1 Antwort Letzte Antwort
            0
            • mickymM mickym

              @netfritz Längen und Breitengrad sind doch schon in einem Objekt enthalten. Das Schlechteste was man tun kann ist, das wieder auseinanderzureißen

              Normalerweise ist doch so ein waypoint etwas, wo beides schon enthalten ist - bei mir sieht das so aus:

              {
                "_type": "waypoint",
                "desc": "Test",
                "lat": 52.054783,
                "lon": 9.621828,
                "rad": 100,
                "rid": "3ff5fd",
                "tst": 1651687577
              }
              

              oder so ähnlich - da ist doch dann alles schon drin.

              Die msg.url dann halt in die http-request Node.

              498dfea5-6bb4-4274-ad22-58d52d351bd5-image.png

              [
                 {
                     "id": "340e4f32fdfeb328",
                     "type": "template",
                     "z": "9159ccfcf71468ba",
                     "name": "current with lat,lon",
                     "field": "url",
                     "fieldType": "msg",
                     "format": "handlebars",
                     "syntax": "mustache",
                     "template": "https://api.openweathermap.org/data/2.5/weather?lat={{payload.lat}}&lon={{payload.lon}}&lang=de&appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                     "output": "str",
                     "x": 810,
                     "y": 320,
                     "wires": [
                         [
                             "b7474f232f101d7a"
                         ]
                     ]
                 },
                 {
                     "id": "b7474f232f101d7a",
                     "type": "debug",
                     "z": "9159ccfcf71468ba",
                     "name": "Request",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "url",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 1020,
                     "y": 320,
                     "wires": []
                 },
                 {
                     "id": "408321c5104ff51e",
                     "type": "inject",
                     "z": "9159ccfcf71468ba",
                     "name": "",
                     "props": [
                         {
                             "p": "payload"
                         }
                     ],
                     "repeat": "",
                     "crontab": "",
                     "once": false,
                     "onceDelay": 0.1,
                     "topic": "",
                     "payload": "{\"_type\":\"waypoint\",\"desc\":\"Test\",\"lat\":52.054783,\"lon\":9.621828,\"rad\":100,\"rid\":\"3ff5fd\",\"tst\":1651687577}",
                     "payloadType": "json",
                     "x": 570,
                     "y": 320,
                     "wires": [
                         [
                             "340e4f32fdfeb328",
                             "b3ce2f9474d3a32a"
                         ]
                     ]
                 },
                 {
                     "id": "b3ce2f9474d3a32a",
                     "type": "debug",
                     "z": "9159ccfcf71468ba",
                     "name": "Input",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 770,
                     "y": 260,
                     "wires": []
                 }
              ]
              

              N Offline
              N Offline
              NetFritz
              schrieb am zuletzt editiert von
              #6

              @mickym
              Hallo Danke.
              Habe deinen Flow bei mir reinkopiert.
              Habe jetzt in der Debug Ausgabe die URL von der Wetter Seite drin.
              Brauche ich jetzt noch ein HTTp-Request Baustein.
              Habe mal einen hinter dem Template Baustein eingefügt und die URL freigelassen.
              Geht so aber nicht.
              Muß da was eingestellt werden oder ein anderen Baustein?
              Gruß NetFritz

              mickymM 1 Antwort Letzte Antwort
              0
              • N NetFritz

                @mickym
                Hallo Danke.
                Habe deinen Flow bei mir reinkopiert.
                Habe jetzt in der Debug Ausgabe die URL von der Wetter Seite drin.
                Brauche ich jetzt noch ein HTTp-Request Baustein.
                Habe mal einen hinter dem Template Baustein eingefügt und die URL freigelassen.
                Geht so aber nicht.
                Muß da was eingestellt werden oder ein anderen Baustein?
                Gruß NetFritz

                mickymM Online
                mickymM Online
                mickym
                Most Active
                schrieb am zuletzt editiert von mickym
                #7

                @netfritz

                Geht aber so nicht.

                Ist halt nicht besonders hilfreich. :(
                Was sagt den die HTTP Request Node - halt überall eine Debug Node dran machen und Screenshot von den aufgeklappten Ausgaben wenigstens posten. Oder hier in CodeTags - Du kannst doch überprüfen, ob dir URL die aus der Template Node rauskommt - auch im Browser was tut. Ausserdem weiß ich ja nicht, ob mein Input richtig war. Das eine ist der Flow - aber wichtig sind auch die richtigen Daten, damit man das ggf. nachvollziehen kann.

                Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                N 1 Antwort Letzte Antwort
                0
                • mickymM mickym

                  @netfritz

                  Geht aber so nicht.

                  Ist halt nicht besonders hilfreich. :(
                  Was sagt den die HTTP Request Node - halt überall eine Debug Node dran machen und Screenshot von den aufgeklappten Ausgaben wenigstens posten. Oder hier in CodeTags - Du kannst doch überprüfen, ob dir URL die aus der Template Node rauskommt - auch im Browser was tut. Ausserdem weiß ich ja nicht, ob mein Input richtig war. Das eine ist der Flow - aber wichtig sind auch die richtigen Daten, damit man das ggf. nachvollziehen kann.

                  N Offline
                  N Offline
                  NetFritz
                  schrieb am zuletzt editiert von
                  #8

                  @mickym
                  Die URL die im Debug erscheint habe ich im Broser eingegeben und die Ausgabe liefert die Wetterdaten.
                  Hier die Locations Daten von Owentracks:
                  Gruß NetFritz

                  code_
                  text
                  object
                  _type: "location"
                  BSSID: "44:4e:6d:22:57:c1"
                  SSID: "FRITZ22"
                  acc: 13
                  alt: 77
                  batt: 42
                  bs: 2
                  conn: "w"
                  created_at: 1665255249
                  lat: 52.5556384
                  lon: 9.1231715
                  m: 1
                  t: "u"
                  tid: "fl"
                  tst: 1665240465
                  vac: 1
                  vel: 0
                  
                  ```Die geteste URL
                  "https://api.openweathermap.org/data/2.5/weather?lat=52.5556384&lon=9.1231715&lang=de&appid=f9cc084b8fe86a8c1d01f57b608xxxx"
                  

                  code_text```

                  code_text

                  Der Flow
                  [
                      {
                          "id": "d001ab7a313af255",
                          "type": "tab",
                          "label": "Flow 5",
                          "disabled": false,
                          "info": "",
                          "env": []
                      },
                      {
                          "id": "82522982ba5818e6",
                          "type": "template",
                          "z": "d001ab7a313af255",
                          "name": "current with lat,lon",
                          "field": "url",
                          "fieldType": "msg",
                          "format": "handlebars",
                          "syntax": "mustache",
                          "template": "https://api.openweathermap.org/data/2.5/weather?lat={{payload.lat}}&lon={{payload.lon}}&lang=de&appid=f9cc084b8fe86a8c1d01f57b608xxxxxx",
                          "output": "str",
                          "x": 630,
                          "y": 240,
                          "wires": [
                              [
                                  "1637264f0faf5bff"
                              ]
                          ]
                      },
                      {
                          "id": "1ab5aafd2ecc2f34",
                          "type": "debug",
                          "z": "d001ab7a313af255",
                          "name": "Request",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "url",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1140,
                          "y": 240,
                          "wires": []
                      },
                      {
                          "id": "08d56aa9b9b8c5c9",
                          "type": "debug",
                          "z": "d001ab7a313af255",
                          "name": "Input",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 590,
                          "y": 200,
                          "wires": []
                      },
                      {
                          "id": "4f5db8ab7298dbb4",
                          "type": "mqtt in",
                          "z": "d001ab7a313af255",
                          "name": "",
                          "topic": "#",
                          "qos": "2",
                          "datatype": "auto-detect",
                          "broker": "e72556340bb92c91",
                          "nl": false,
                          "rap": true,
                          "rh": 0,
                          "inputs": 0,
                          "x": 290,
                          "y": 240,
                          "wires": [
                              [
                                  "82522982ba5818e6",
                                  "08d56aa9b9b8c5c9"
                              ]
                          ]
                      },
                      {
                          "id": "1637264f0faf5bff",
                          "type": "http request",
                          "z": "d001ab7a313af255",
                          "name": "",
                          "method": "GET",
                          "ret": "txt",
                          "paytoqs": "query",
                          "url": "",
                          "tls": "",
                          "persist": false,
                          "proxy": "",
                          "insecureHTTPParser": false,
                          "authType": "",
                          "senderr": false,
                          "headers": [],
                          "x": 930,
                          "y": 240,
                          "wires": [
                              [
                                  "1ab5aafd2ecc2f34"
                              ]
                          ]
                      },
                      {
                          "id": "e72556340bb92c91",
                          "type": "mqtt-broker",
                          "name": "Mosquitto",
                          "broker": "127.0.0.1",
                          "port": "1883",
                          "clientid": "",
                          "autoConnect": true,
                          "usetls": false,
                          "protocolVersion": "3",
                          "keepalive": "60",
                          "cleansession": true,
                          "birthTopic": "",
                          "birthQos": "0",
                          "birthPayload": "",
                          "birthMsg": {},
                          "closeTopic": "",
                          "closeQos": "0",
                          "closePayload": "",
                          "closeMsg": {},
                          "willTopic": "",
                          "willQos": "0",
                          "willPayload": "",
                          "willMsg": {},
                          "userProps": "",
                          "sessionExpiry": ""
                      }
                  ]
                  mickymM 1 Antwort Letzte Antwort
                  0
                  • N NetFritz

                    @mickym
                    Die URL die im Debug erscheint habe ich im Broser eingegeben und die Ausgabe liefert die Wetterdaten.
                    Hier die Locations Daten von Owentracks:
                    Gruß NetFritz

                    code_
                    text
                    object
                    _type: "location"
                    BSSID: "44:4e:6d:22:57:c1"
                    SSID: "FRITZ22"
                    acc: 13
                    alt: 77
                    batt: 42
                    bs: 2
                    conn: "w"
                    created_at: 1665255249
                    lat: 52.5556384
                    lon: 9.1231715
                    m: 1
                    t: "u"
                    tid: "fl"
                    tst: 1665240465
                    vac: 1
                    vel: 0
                    
                    ```Die geteste URL
                    "https://api.openweathermap.org/data/2.5/weather?lat=52.5556384&lon=9.1231715&lang=de&appid=f9cc084b8fe86a8c1d01f57b608xxxx"
                    

                    code_text```

                    code_text

                    Der Flow
                    [
                        {
                            "id": "d001ab7a313af255",
                            "type": "tab",
                            "label": "Flow 5",
                            "disabled": false,
                            "info": "",
                            "env": []
                        },
                        {
                            "id": "82522982ba5818e6",
                            "type": "template",
                            "z": "d001ab7a313af255",
                            "name": "current with lat,lon",
                            "field": "url",
                            "fieldType": "msg",
                            "format": "handlebars",
                            "syntax": "mustache",
                            "template": "https://api.openweathermap.org/data/2.5/weather?lat={{payload.lat}}&lon={{payload.lon}}&lang=de&appid=f9cc084b8fe86a8c1d01f57b608xxxxxx",
                            "output": "str",
                            "x": 630,
                            "y": 240,
                            "wires": [
                                [
                                    "1637264f0faf5bff"
                                ]
                            ]
                        },
                        {
                            "id": "1ab5aafd2ecc2f34",
                            "type": "debug",
                            "z": "d001ab7a313af255",
                            "name": "Request",
                            "active": true,
                            "tosidebar": true,
                            "console": false,
                            "tostatus": false,
                            "complete": "url",
                            "targetType": "msg",
                            "statusVal": "",
                            "statusType": "auto",
                            "x": 1140,
                            "y": 240,
                            "wires": []
                        },
                        {
                            "id": "08d56aa9b9b8c5c9",
                            "type": "debug",
                            "z": "d001ab7a313af255",
                            "name": "Input",
                            "active": true,
                            "tosidebar": true,
                            "console": false,
                            "tostatus": false,
                            "complete": "payload",
                            "targetType": "msg",
                            "statusVal": "",
                            "statusType": "auto",
                            "x": 590,
                            "y": 200,
                            "wires": []
                        },
                        {
                            "id": "4f5db8ab7298dbb4",
                            "type": "mqtt in",
                            "z": "d001ab7a313af255",
                            "name": "",
                            "topic": "#",
                            "qos": "2",
                            "datatype": "auto-detect",
                            "broker": "e72556340bb92c91",
                            "nl": false,
                            "rap": true,
                            "rh": 0,
                            "inputs": 0,
                            "x": 290,
                            "y": 240,
                            "wires": [
                                [
                                    "82522982ba5818e6",
                                    "08d56aa9b9b8c5c9"
                                ]
                            ]
                        },
                        {
                            "id": "1637264f0faf5bff",
                            "type": "http request",
                            "z": "d001ab7a313af255",
                            "name": "",
                            "method": "GET",
                            "ret": "txt",
                            "paytoqs": "query",
                            "url": "",
                            "tls": "",
                            "persist": false,
                            "proxy": "",
                            "insecureHTTPParser": false,
                            "authType": "",
                            "senderr": false,
                            "headers": [],
                            "x": 930,
                            "y": 240,
                            "wires": [
                                [
                                    "1ab5aafd2ecc2f34"
                                ]
                            ]
                        },
                        {
                            "id": "e72556340bb92c91",
                            "type": "mqtt-broker",
                            "name": "Mosquitto",
                            "broker": "127.0.0.1",
                            "port": "1883",
                            "clientid": "",
                            "autoConnect": true,
                            "usetls": false,
                            "protocolVersion": "3",
                            "keepalive": "60",
                            "cleansession": true,
                            "birthTopic": "",
                            "birthQos": "0",
                            "birthPayload": "",
                            "birthMsg": {},
                            "closeTopic": "",
                            "closeQos": "0",
                            "closePayload": "",
                            "closeMsg": {},
                            "willTopic": "",
                            "willQos": "0",
                            "willPayload": "",
                            "willMsg": {},
                            "userProps": "",
                            "sessionExpiry": ""
                        }
                    ]
                    mickymM Online
                    mickymM Online
                    mickym
                    Most Active
                    schrieb am zuletzt editiert von mickym
                    #9

                    @netfritz sagte in Mit Node-Red Openweathermap mit Standorten mit Owentracks.:

                    Schau Dir mal deine Debug Node hinter der http-request Node an. Du analysierst die msg.url und nicht die msg.payload. Außerdem solltest Du Dir ein analysiertes JSON Objekt ausgeben lassen. Ich hab die Debug Node - als msg.url genommen, da das die Eingabe für die HTTP-Request Node ist - die Ausgabe kommt aber in der payload.

                    Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

                    N 1 Antwort Letzte Antwort
                    0
                    • mickymM mickym

                      @netfritz sagte in Mit Node-Red Openweathermap mit Standorten mit Owentracks.:

                      Schau Dir mal deine Debug Node hinter der http-request Node an. Du analysierst die msg.url und nicht die msg.payload. Außerdem solltest Du Dir ein analysiertes JSON Objekt ausgeben lassen. Ich hab die Debug Node - als msg.url genommen, da das die Eingabe für die HTTP-Request Node ist - die Ausgabe kommt aber in der payload.

                      N Offline
                      N Offline
                      NetFritz
                      schrieb am zuletzt editiert von
                      #10

                      @mickym
                      Hallo
                      Fehler gefunden hatte im Debug Node msg.url stehen.
                      Umgeändert aus msg.playload schon zeigt er die Wetterdaten an.
                      Vielen Dank

                      1 Antwort Letzte Antwort
                      0
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      906

                      Online

                      32.6k

                      Benutzer

                      81.9k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe