Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. Wetter API's mit NodeRed abrufen

    NEWS

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    Wetter API's mit NodeRed abrufen

    This topic has been deleted. Only users with topic management privileges can see it.
    • mickym
      mickym Most Active last edited by mickym

      Nachdem ich heute über eine Anforderung einer Wetter API gestolpert bin und ich festgestellt habe, dass meine DarkSky API noch läuft, aber ich nicht mehr weiß, wie lange, habe ich mich mal nach einer Alternative umgesehen. Es gibt einige Spezialadapter zum Wetter im iobroker, aber entweder haben diese regionalen Charakter oder sind Spezialanforderungen, wie Pollenflug etc.

      Den wetter.com Adapter habe ich ehrlich gesagt nicht probiert, da ich keine Doku zur API gefunden habe.

      Ich habe mich mal generell an die Top5 aus dieser Liste gehalten.

      Im Prinzip gibts aktuell im iobroker 3 relativ universelle Adapter für das Wetter:

      1. DasWetter.com

      Dieser Adapter ist im Prinzip ein XML Parser für von Das Wetter erzeugte XML Dateien.

      1. openweathermap.org Wetter

      Update 21.5.2021
      Die Openwaether API stellt sich nun doch als sinnvoll heraus, wenn man tatsächlich bis zu 1000 Calls frei hat für die 1 Call API die stündliche und tägliche Vorhersagen enthält. Der Adapter und die Node scheinen nur eine 5 Tagesvorhersage zu beinhalten.

      1. Vorhersage Weatherunderground

      Die Weatherunderground API soll mächtig sein, aber wie gesagt da kommt man ohne Registrierung erst mal nicht dran. Den Adapter habe ich ausprobiert - da kann man zwar dann ohne API Key arbeiten, kann aber beispielsweise die Periode für den Forecast nicht bestimmten und eine Monatsvorhersage für 6 Monate finde ich ehrlich gesagt nicht besonders sinnvoll.

      DarkSky scheidet wie gesagt aus .

      1. AccuWeather API verfügbar zu machen.

      Update 21.5.2021: Es gibt doch bereits einen Adapter für Accu Weather.
      Insofern stellt der bisherige Flow kaum mehr einen Mehrwert dar.

      Dieses Projekt ist auch noch am Laufen und noch nicht ganz durchgetestet - zudem auch mit dem Free-Account nur 50 Abfragen am Tag möglich sind.

      Da ich bis jetzt noch keinen Adapter geschrieben habe, mich da auch nicht gut auskenne und der Aufwand über NodeRed die Informationen verfügbar zu machen für mich schnell und unkompliziert geht, wähle ich halt diesen Weg.

      Was man mit dem FreeAccount und den 50 Abfragen bekommt sieht man hier.

      Ich hab das mal so designed - dass die Tagesvorhersage einmal täglich abgefragt wird und die 12 Stündliche 1x die Stunde.

      So nun zu den Informationen die verfügbar sind:

      1. Die stündliche Vorhersage - 12 Stunden:

      https://developer.accuweather.com/accuweather-forecast-api/apis/get/forecasts/v1/hourly/12hour/{locationKey}

      1. Die tägliche Vorhersage - 5 Tage:

      https://developer.accuweather.com/accuweather-forecast-api/apis/get/forecasts/v1/daily/5day/{locationKey}

      Das ganze gibt wieder ein Objekt, das man dann über meine JSON Node in die iobroker Datenstruktur schreiben kann.

      Momentan sind die Anzahl der Abfragen erschöpft, aber so würde die API dann im iobroker abgebildet werden:

      6902dd30-8605-4249-a81a-db7a2405dc2a-image.png

      Der Minimalflow würde dann wie folgt aussehen:

      screen.png

      1. Einen Trigger, der den API Key und den Location Key mit true oder false triggert.
      2. Dann kann man entweder mit dem Objekt direkt in NodeRed weiterarbeiten oder schreibt dieses eben in eine iobroker Struktur wie in dem Flow dargestellt.

      Eine Beschreibung wie die Node funktioniert gibts wieder in der Node:

      aeb83b54-84c2-4f22-9426-5e2061aa8bd2-image.png

      So hier die Node zum Import und zum Test - in den nächsten Tagen kommen vielleicht ein paar Posts zu den Infos aus dieser API.

      EDIT 11.5.2021 - Node mit Scheduler

      [
         {
             "id": "f187b86b.724298",
             "type": "subflow",
             "name": "AccuWeather",
             "info": "# AccuWeather\n\nWith this node can get a hourly forecast for the next 12 hours, or a daily forcast for the next 5 days from [AccuWeather](https://www.accuweather.com/). \n\nThe result is stored in an payload object.\nFor the 12 hours forcast - the data is stored in the `msg.payload.hourly` object, \nfor the daiily forcast - the data is stored in the `msg.payload.daily` object.\n\nYou need is an API Key and a Location Key for this node to be functional.\n\nYou can get both, if you register yourself as [developer](https://developer.accuweather.com/). \n\nAfter you have registered yourself successfully, you need to add an application under myApps. You will be linked to this page as well, if you click on a limited trial package under packages & pricing. \n\nUnder my apps open your defined application. Under keys you can see your API key - as you need it for each request.\n\nAfter you have recieved your api key, you can use this key to get the location key which is needed für your weather forcast in your location.\nUnder API Reference open the locations API and you will see a lot of methods how to get a specific location. Open one of those methods and insert all needed information. You will receive a JSONS string with a key property which will the be used for the forecasts to a specific location.\nThe location key should also be saved.\n\nYou trigger the node with `msg.payload` as _true_ or _false_ as boolean, which enables or disables the scheduled requests to AccuWeather. When you provide _false_ in ` msg.payload`, a AccuWeather will be requested for new data, in case when true is provided the next request will be performed according the scheduler. The status therefore of this node reflects if the schedule is allowed to perform a request or not.\n\nRegardless if you provide _true_ or _false_ as `msg.payload`, you have always to deliver `msg.api` with the API Key,`msg.location` with the Location Key and finally `msg.language` for the language otherwise the message will completly ignored. Examples for language strings are: `en-us` for US-English or `de-de` for German.\n\n# AccuWeather\n\nMit dieser Node kann man eine stündliche Wettervorhersage für die nächsten 12 Stunden und eine 5 Tages-Vorhersage von [AccuWeather](https://www.accuweather.com/) abrufen. \n\nDas Resultat wird in einem payload-Objekt gespeichert.\nFür die 12 Stunden-Vorhersage - werden die Daten im `msg.payload.hourly` Objekt gespeichert, \nfür die 5 Tage Tagesvorhersage - werden die Daten im `msg.payload.daily` Objekt gespeichert.\n\nDamit diese Node funktioniert braucht man einen API Key und einen Location Key.\n\nBeides bekommt man, wenn man sich als [Entwickler](https://developer.accuweather.com/) registriert. \n\nNach erfolgreicher Registrierung, muss man unter myApps eine Anwendung registrieren. Auf diese Seite wird man auch verlinkt, wenn man auf das limitierte \"Versuchspaket\" unter packages & pricing klickt.\n\n\nUnter myApps öffnen Sie die von Ihnen definierte Applikation. Unter keys können Sie Ihren API Key sehen. Speichern Sie ihn, Sie brauchen Ihnen für alle künftigen Requests.\n\nNachdem man nun den API-Key erhalten hat, kann man diesen nutzen, um einen Location Key zu ermitteln und die Wettervorherage für einen bestimmten Ort zu bekommen. \nUnter API Reference öffnet man die Locations API und man bekommt eine Vielzahl von Möglichkeiten angeboten, um einen Ort zu bestimmen. Öffnen Sie eine dieser Methoden und geben Sie alle Information ein. Senden Sie den Request und Sie erhalten einen JSON String, der dann für den einen Ort den gewünschten Location Schlüssel (key Eigenschaft) enthält. Speichern Sie den Location key.\n\nDie gesamte Node kann über die `msg.payload` mit _true_ oder _false_ als Datentyp Boolean getriggert werden. Dies aktiviert bzw. deaktiviert die periodischen Abfragen zu AccuWeather. Selbst wenn man  _false_ in der ` msg.payload` mitgibt, wird eine Abfrage zu AccuWeather durchgeführt, der Scheduler aber deaktiviert. Der Status der Node gibt also den Status des Schedulers für periodische Abfragen wider.\n\nEgal ob in der `msg.payload` true oder false mitgegeben wird, es muss immer auch die `msg.api` mit dem API Key, die `msg.location` mit dem Location Key mitgegeben werden und schließlich die Sprache mit` msg.language` mitgegeben werden, sonst wird die Nachricht vollständig ignoriert. Beispiele für Spracheinstellungen sind: `en-us` für US-Englisch oder `de-de` für Deutsch.\n",
             "category": "Weather",
             "in": [
                 {
                     "x": 40,
                     "y": 240,
                     "wires": [
                         {
                             "id": "f69c66e2.6bed68"
                         }
                     ]
                 }
             ],
             "out": [
                 {
                     "x": 1880,
                     "y": 220,
                     "wires": [
                         {
                             "id": "3536a73e.2d13a8",
                             "port": 0
                         },
                         {
                             "id": "4eaaaba2.8c9314",
                             "port": 0
                         },
                         {
                             "id": "b9644e27.1c8ad",
                             "port": 0
                         }
                     ]
                 }
             ],
             "env": [],
             "meta": {},
             "color": "#FFCC66",
             "icon": "font-awesome/fa-certificate",
             "status": {
                 "x": 1520,
                 "y": 280,
                 "wires": [
                     {
                         "id": "88ea3083.006e8",
                         "port": 0
                     },
                     {
                         "id": "36aae7e1.469838",
                         "port": 0
                     },
                     {
                         "id": "b2f41fa7.fb978",
                         "port": 0
                     }
                 ]
             }
         },
         {
             "id": "f982be3e.f25ba",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "forecast 12 hours",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/{{location}}?apikey={{api}}&language={{language}}&details=true&metric=true",
             "output": "str",
             "x": 1130,
             "y": 140,
             "wires": [
                 [
                     "65e5c6a.9824a38"
                 ]
             ]
         },
         {
             "id": "c4fa64b1.7bed08",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "forecast 5 days",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/forecasts/v1/daily/5day/{{location}}?apikey={{api}}&language={{language}}&details=true&metric=true",
             "output": "str",
             "x": 1120,
             "y": 320,
             "wires": [
                 [
                     "f036a770.d710b8"
                 ]
             ]
         },
         {
             "id": "65e5c6a.9824a38",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1330,
             "y": 140,
             "wires": [
                 [
                     "94999ed6.a7c3f"
                 ]
             ]
         },
         {
             "id": "f036a770.d710b8",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1330,
             "y": 320,
             "wires": [
                 [
                     "1bcbed57.c4c3f3"
                 ]
             ]
         },
         {
             "id": "4eaaaba2.8c9314",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.daily",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1680,
             "y": 320,
             "wires": [
                 []
             ]
         },
         {
             "id": "3536a73e.2d13a8",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.hourly",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1680,
             "y": 140,
             "wires": [
                 []
             ]
         },
         {
             "id": "94999ed6.a7c3f",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1490,
             "y": 140,
             "wires": [
                 [
                     "3536a73e.2d13a8"
                 ]
             ]
         },
         {
             "id": "1bcbed57.c4c3f3",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1490,
             "y": 320,
             "wires": [
                 [
                     "4eaaaba2.8c9314"
                 ]
             ]
         },
         {
             "id": "9234341d.461a78",
             "type": "catch",
             "z": "f187b86b.724298",
             "name": "",
             "scope": [
                 "65e5c6a.9824a38",
                 "f036a770.d710b8",
                 "140eb801.15b7c8"
             ],
             "uncaught": false,
             "x": 870,
             "y": 200,
             "wires": [
                 [
                     "91b3fe5d.85dbc"
                 ]
             ]
         },
         {
             "id": "f69c66e2.6bed68",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "Only with api and location",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "jsonata_exp",
                     "v": "$exists(api) and $exists(location) and $exists(language)",
                     "vt": "jsonata"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 450,
             "y": 240,
             "wires": [
                 [
                     "59c8a82f.86b238"
                 ]
             ]
         },
         {
             "id": "59c8a82f.86b238",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "variables set",
             "rules": [
                 {
                     "t": "set",
                     "p": "schedule",
                     "pt": "flow",
                     "to": "payload",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "api",
                     "pt": "flow",
                     "to": "api",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "location",
                     "pt": "flow",
                     "to": "location",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "language",
                     "pt": "flow",
                     "to": "language",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 690,
             "y": 240,
             "wires": [
                 [
                     "794ca51f.be002c"
                 ]
             ]
         },
         {
             "id": "91b3fe5d.85dbc",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "schedule",
                     "pt": "flow",
                     "to": "false",
                     "tot": "bool"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "false",
                     "tot": "bool"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1110,
             "y": 200,
             "wires": [
                 [
                     "b2f41fa7.fb978"
                 ]
             ]
         },
         {
             "id": "3cab3288.53f38e",
             "type": "inject",
             "z": "f187b86b.724298",
             "name": "do every hour",
             "props": [
                 {
                     "p": "payload"
                 }
             ],
             "repeat": "3600",
             "crontab": "",
             "once": true,
             "onceDelay": 0.1,
             "topic": "",
             "payload": "true",
             "payloadType": "bool",
             "x": 120,
             "y": 140,
             "wires": [
                 [
                     "954e5e74.5edb3"
                 ]
             ]
         },
         {
             "id": "1f445537.01fa7b",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "schedule = true",
             "property": "schedule",
             "propertyType": "flow",
             "rules": [
                 {
                     "t": "true"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 700,
             "y": 140,
             "wires": [
                 [
                     "28dc1ed2.a20b12"
                 ]
             ]
         },
         {
             "id": "28dc1ed2.a20b12",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "variables get",
             "rules": [
                 {
                     "t": "set",
                     "p": "api",
                     "pt": "msg",
                     "to": "api",
                     "tot": "flow"
                 },
                 {
                     "t": "set",
                     "p": "location",
                     "pt": "msg",
                     "to": "location",
                     "tot": "flow"
                 },
                 {
                     "t": "set",
                     "p": "language",
                     "pt": "msg",
                     "to": "language",
                     "tot": "flow"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 890,
             "y": 140,
             "wires": [
                 [
                     "f982be3e.f25ba",
                     "b8280f03.f84a8"
                 ]
             ]
         },
         {
             "id": "16dc85a9.1b29ba",
             "type": "inject",
             "z": "f187b86b.724298",
             "name": "do each day at 07:10",
             "props": [
                 {
                     "p": "payload"
                 },
                 {
                     "p": "delay",
                     "v": "1000",
                     "vt": "num"
                 }
             ],
             "repeat": "",
             "crontab": "10 07 * * *",
             "once": false,
             "onceDelay": 0.1,
             "topic": "",
             "payload": "true",
             "payloadType": "bool",
             "x": 280,
             "y": 320,
             "wires": [
                 [
                     "f134c878.41b8d8",
                     "b27d914d.80047"
                 ]
             ]
         },
         {
             "id": "f134c878.41b8d8",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "schedule = true",
             "property": "schedule",
             "propertyType": "flow",
             "rules": [
                 {
                     "t": "true"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 700,
             "y": 320,
             "wires": [
                 [
                     "9c5b14f7.c9fab8"
                 ]
             ]
         },
         {
             "id": "9c5b14f7.c9fab8",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "variables get",
             "rules": [
                 {
                     "t": "set",
                     "p": "api",
                     "pt": "msg",
                     "to": "api",
                     "tot": "flow"
                 },
                 {
                     "t": "set",
                     "p": "location",
                     "pt": "msg",
                     "to": "location",
                     "tot": "flow"
                 },
                 {
                     "t": "set",
                     "p": "language",
                     "pt": "msg",
                     "to": "language",
                     "tot": "flow"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 890,
             "y": 320,
             "wires": [
                 [
                     "c4fa64b1.7bed08"
                 ]
             ]
         },
         {
             "id": "b8280f03.f84a8",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "current",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/currentconditions/v1/{{location}}?apikey={{api}}&language={{language}}&details=true",
             "output": "str",
             "x": 1100,
             "y": 60,
             "wires": [
                 [
                     "140eb801.15b7c8"
                 ]
             ]
         },
         {
             "id": "140eb801.15b7c8",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1330,
             "y": 60,
             "wires": [
                 [
                     "c61112d7.3153c"
                 ]
             ]
         },
         {
             "id": "b9644e27.1c8ad",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.current",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1680,
             "y": 60,
             "wires": [
                 []
             ]
         },
         {
             "id": "c61112d7.3153c",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1490,
             "y": 60,
             "wires": [
                 [
                     "b9644e27.1c8ad"
                 ]
             ]
         },
         {
             "id": "794ca51f.be002c",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "no schedule",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "false"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 890,
             "y": 280,
             "wires": [
                 [
                     "c4fa64b1.7bed08",
                     "f982be3e.f25ba",
                     "b8280f03.f84a8",
                     "36aae7e1.469838"
                 ]
             ]
         },
         {
             "id": "954e5e74.5edb3",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "schedule um hh:05",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "",
                     "tot": "date"
                 },
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "(65-$number($moment(payload).locale(\"de\").tz('Europe/Berlin').format('m')))%60",
                     "tot": "jsonata"
                 },
                 {
                     "t": "set",
                     "p": "delay",
                     "pt": "msg",
                     "to": "payload*60*1000",
                     "tot": "jsonata"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 330,
             "y": 140,
             "wires": [
                 [
                     "abc8a67b.696f88",
                     "b27d914d.80047"
                 ]
             ]
         },
         {
             "id": "abc8a67b.696f88",
             "type": "delay",
             "z": "f187b86b.724298",
             "name": "",
             "pauseType": "delayv",
             "timeout": "5",
             "timeoutUnits": "seconds",
             "rate": "1",
             "nbRateUnits": "1",
             "rateUnits": "second",
             "randomFirst": "1",
             "randomLast": "5",
             "randomUnits": "seconds",
             "drop": false,
             "x": 520,
             "y": 140,
             "wires": [
                 [
                     "1f445537.01fa7b"
                 ]
             ]
         },
         {
             "id": "68975fa6.a8e3e",
             "type": "function",
             "z": "f187b86b.724298",
             "name": "scheduler status",
             "func": "last = new Date();\nfirst = context.get('_schedulerAccuWeather');\nif (first == undefined){\n    context.set('_schedulerAccuWeather', true);\n    msg.scheduler = 'first request on: ' + last.toLocaleDateString() + ' at ' + last.toLocaleTimeString() + ' and ' + msg.delay/60/1000 + ' minutes';\n    return msg;\n}\n\nmsg.scheduler='last request on: ' + last.toLocaleDateString() + ' at ' + last.toLocaleTimeString();\nreturn msg;",
             "outputs": 1,
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 880,
             "y": 380,
             "wires": [
                 [
                     "88ea3083.006e8"
                 ]
             ]
         },
         {
             "id": "88ea3083.006e8",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status active",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{\"fill\":\"green\",\"shape\":\"dot\",\"text\":\"schedule: true\"}",
                     "tot": "json"
                 },
                 {
                     "t": "move",
                     "p": "scheduler",
                     "pt": "msg",
                     "to": "payload.text",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1320,
             "y": 380,
             "wires": [
                 []
             ]
         },
         {
             "id": "36aae7e1.469838",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status inactive",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{\"fill\":\"yellow\",\"shape\":\"dot\",\"text\":\"inactive\"}",
                     "tot": "json"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1310,
             "y": 280,
             "wires": [
                 []
             ]
         },
         {
             "id": "b2f41fa7.fb978",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status error",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{\"fill\":\"green\",\"shape\":\"dot\",\"text\":\"error\"}",
                     "tot": "json"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1320,
             "y": 200,
             "wires": [
                 []
             ]
         },
         {
             "id": "b27d914d.80047",
             "type": "trigger",
             "z": "f187b86b.724298",
             "name": "",
             "op1": "",
             "op2": "true",
             "op1type": "pay",
             "op2type": "bool",
             "duration": "250",
             "extend": false,
             "overrideDelay": true,
             "units": "ms",
             "reset": "",
             "bytopic": "all",
             "topic": "topic",
             "outputs": 1,
             "x": 540,
             "y": 380,
             "wires": [
                 [
                     "68975fa6.a8e3e"
                 ]
             ]
         },
         {
             "id": "478cb1aa.a79cf",
             "type": "subflow:f187b86b.724298",
             "z": "6a421c3f.cc35f4",
             "name": "",
             "env": [],
             "x": 480,
             "y": 1680,
             "wires": [
                 [
                     "344e42f.deb53be",
                     "a5f02194.a286b",
                     "3f9d49b5.8bfe56",
                     "1cf03a31.fbac86",
                     "bc13fb16.3cba18",
                     "f49ffb53.60d2d8",
                     "ec3b71b8.2b9d"
                 ]
             ]
         }
      ]
      

      So hier die 2. Variante (ohne Scheduler) der Node zur Integration von AccuWeather in den iobroker ist fertig:

      Hier die Beschreibung:

      9fd99227-57d9-4499-815c-52125002793c-image.png

      und hier die Node zum Import:

      [
         {
             "id": "f187b86b.724298",
             "type": "subflow",
             "name": "AccuWeather",
             "info": "# AccuWeather\n\nWith this node can get a hourly forecast for the next 12 hours, or a daily forcast for the next 5 days from [AccuWeather](https://www.accuweather.com/). \n\nThe result is stored in an payload object.\nFor the 12 hours forcast - the data is stored in the `msg.payload.hourly` object, \nfor the daiily forcast - the data is stored in the `msg.payload.daily` object.\n\nYou need is an API Key and a Location Key for this node to be functional.\n\nYou can get both, if you register yourself as [developer](https://developer.accuweather.com/). \n\nAfter you have registered yourself successfully, you need to add an application under myApps. You will be linked to this page as well, if you click on a limited trial package under packages & pricing. \n\nUnder my apps open your defined application. Under keys you can see your API key - as you need it for each request.\n\nAfter you have recieved your api key, you can use this key to get the location key which is needed für your weather forcast in your location.\nUnder API Reference open the locations API and you will see a lot of methods how to get a specific location. Open one of those methods and insert all needed information. You will receive a JSONS string with a key property which will the be used for the forecasts to a specific location.\nThe location key should also be saved.\n\nYou trigger the node with a message oject with the following properties:\nmsg = { api: `<API Key>`, location : `<location key>`, language : `<en-us>`, payload = `[<'current'>, <'hourly'>, <'daily'>]` }\nAll properties of the msg - object are mandatory. The payload must allways be an array, but it can contain only one request type (i.e. `'current'`, `'hourly'` or `'daily'`).\n\n\n# AccuWeather\n\nMit dieser Node kann man eine stündliche Wettervorhersage für die nächsten 12 Stunden und eine 5 Tages-Vorhersage von [AccuWeather](https://www.accuweather.com/) abrufen. \n\nDas Resultat wird in einem payload-Objekt gespeichert.\nFür die 12 Stunden-Vorhersage - werden die Daten im `msg.payload.hourly` Objekt gespeichert, \nfür die 5 Tage Tagesvorhersage - werden die Daten im `msg.payload.daily` Objekt gespeichert.\n\nDamit diese Node funktioniert braucht man einen API Key und einen Location Key.\n\nBeides bekommt man, wenn man sich als [Entwickler](https://developer.accuweather.com/) registriert. \n\nNach erfolgreicher Registrierung, muss man unter myApps eine Anwendung registrieren. Auf diese Seite wird man auch verlinkt, wenn man auf das limitierte \"Versuchspaket\" unter packages & pricing klickt.\n\n\nUnter myApps öffnen Sie die von Ihnen definierte Applikation. Unter keys können Sie Ihren API Key sehen. Speichern Sie ihn, Sie brauchen Ihnen für alle künftigen Requests.\n\nNachdem man nun den API-Key erhalten hat, kann man diesen nutzen, um einen Location Key zu ermitteln und die Wettervorherage für einen bestimmten Ort zu bekommen. \nUnter API Reference öffnet man die Locations API und man bekommt eine Vielzahl von Möglichkeiten angeboten, um einen Ort zu bestimmen. Öffnen Sie eine dieser Methoden und geben Sie alle Information ein. Senden Sie den Request und Sie erhalten einen JSON String, der dann für den einen Ort den gewünschten Location Schlüssel (key Eigenschaft) enthält. Speichern Sie den Location key.\n\nDer Subflow wird durch ein Nachrichtenobjekt mit folgenden Eigenschaften getriggert:\nmsg = { api: `<API Key>`, location : `<location key>`, language : `<en-us>`, payload = `[<'current'>, <'hourly'>, <'daily'>]` }\nAlle Eigenschaften des Nachrichtenobjektes sind erforderlich. Auch die payload muss ein Array sein, selbst wenn sie nur einen Parameter enthält. Gültige Parameter sind gültige Abfragen\n(z.Bsp. `'current'`, `'hourly'` or `'daily'`). Current liefert das aktuelle Wetter, hourly die stündliche Vorhersage und daily die tägliche Vorhersage.\n",
             "category": "Weather",
             "in": [
                 {
                     "x": 40,
                     "y": 240,
                     "wires": [
                         {
                             "id": "f69c66e2.6bed68"
                         },
                         {
                             "id": "1c74879b.9d8ea8"
                         }
                     ]
                 }
             ],
             "out": [
                 {
                     "x": 1900,
                     "y": 120,
                     "wires": [
                         {
                             "id": "3536a73e.2d13a8",
                             "port": 0
                         },
                         {
                             "id": "4eaaaba2.8c9314",
                             "port": 0
                         },
                         {
                             "id": "b9644e27.1c8ad",
                             "port": 0
                         }
                     ]
                 }
             ],
             "env": [],
             "meta": {},
             "color": "#FFCC66",
             "icon": "font-awesome/fa-certificate",
             "status": {
                 "x": 1120,
                 "y": 380,
                 "wires": [
                     {
                         "id": "b2f41fa7.fb978",
                         "port": 0
                     },
                     {
                         "id": "3c1b9662.2fc04a",
                         "port": 0
                     },
                     {
                         "id": "b6249a0.b6ca868",
                         "port": 0
                     }
                 ]
             }
         },
         {
             "id": "f982be3e.f25ba",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "forecast 12 hours",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/{{location}}?apikey={{api}}&language={{language}}&details=true&metric=true",
             "output": "str",
             "x": 1150,
             "y": 120,
             "wires": [
                 [
                     "65e5c6a.9824a38"
                 ]
             ]
         },
         {
             "id": "c4fa64b1.7bed08",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "forecast 5 days",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/forecasts/v1/daily/5day/{{location}}?apikey={{api}}&language={{language}}&details=true&metric=true",
             "output": "str",
             "x": 1140,
             "y": 220,
             "wires": [
                 [
                     "f036a770.d710b8"
                 ]
             ]
         },
         {
             "id": "65e5c6a.9824a38",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 120,
             "wires": [
                 [
                     "94999ed6.a7c3f"
                 ]
             ]
         },
         {
             "id": "f036a770.d710b8",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 220,
             "wires": [
                 [
                     "1bcbed57.c4c3f3"
                 ]
             ]
         },
         {
             "id": "4eaaaba2.8c9314",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.daily",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1700,
             "y": 220,
             "wires": [
                 []
             ]
         },
         {
             "id": "3536a73e.2d13a8",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.hourly",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1700,
             "y": 120,
             "wires": [
                 []
             ]
         },
         {
             "id": "94999ed6.a7c3f",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1510,
             "y": 120,
             "wires": [
                 [
                     "3536a73e.2d13a8"
                 ]
             ]
         },
         {
             "id": "1bcbed57.c4c3f3",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1510,
             "y": 220,
             "wires": [
                 [
                     "4eaaaba2.8c9314"
                 ]
             ]
         },
         {
             "id": "9234341d.461a78",
             "type": "catch",
             "z": "f187b86b.724298",
             "name": "",
             "scope": [
                 "65e5c6a.9824a38",
                 "f036a770.d710b8",
                 "140eb801.15b7c8"
             ],
             "uncaught": false,
             "x": 110,
             "y": 380,
             "wires": [
                 [
                     "91b3fe5d.85dbc"
                 ]
             ]
         },
         {
             "id": "f69c66e2.6bed68",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "Only with api and location",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "jsonata_exp",
                     "v": "$exists(api) and $exists(location) and $exists(language)",
                     "vt": "jsonata"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 230,
             "y": 240,
             "wires": [
                 [
                     "e96063e1.375bf"
                 ]
             ]
         },
         {
             "id": "91b3fe5d.85dbc",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "false",
                     "tot": "bool"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 290,
             "y": 380,
             "wires": [
                 [
                     "b2f41fa7.fb978"
                 ]
             ]
         },
         {
             "id": "b8280f03.f84a8",
             "type": "template",
             "z": "f187b86b.724298",
             "name": "current",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://dataservice.accuweather.com/currentconditions/v1/{{location}}?apikey={{api}}&language={{language}}&details=true",
             "output": "str",
             "x": 1120,
             "y": 40,
             "wires": [
                 [
                     "140eb801.15b7c8"
                 ]
             ]
         },
         {
             "id": "140eb801.15b7c8",
             "type": "http request",
             "z": "f187b86b.724298",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 40,
             "wires": [
                 [
                     "c61112d7.3153c"
                 ]
             ]
         },
         {
             "id": "b9644e27.1c8ad",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.current",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1700,
             "y": 40,
             "wires": [
                 []
             ]
         },
         {
             "id": "c61112d7.3153c",
             "type": "json",
             "z": "f187b86b.724298",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1510,
             "y": 40,
             "wires": [
                 [
                     "b9644e27.1c8ad"
                 ]
             ]
         },
         {
             "id": "794ca51f.be002c",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "request",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "eq",
                     "v": "current",
                     "vt": "str"
                 },
                 {
                     "t": "eq",
                     "v": "hourly",
                     "vt": "str"
                 },
                 {
                     "t": "eq",
                     "v": "daily",
                     "vt": "str"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 3,
             "x": 820,
             "y": 240,
             "wires": [
                 [
                     "3c1b9662.2fc04a",
                     "b8280f03.f84a8"
                 ],
                 [
                     "3c1b9662.2fc04a",
                     "f982be3e.f25ba"
                 ],
                 [
                     "3c1b9662.2fc04a",
                     "c4fa64b1.7bed08"
                 ]
             ]
         },
         {
             "id": "b2f41fa7.fb978",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status error",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{\"fill\":\"red\",\"shape\":\"ring\",\"text\":\"error\"}",
                     "tot": "json"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 500,
             "y": 380,
             "wires": [
                 []
             ]
         },
         {
             "id": "3c1b9662.2fc04a",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.text",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "payload.fill",
                     "pt": "msg",
                     "to": "green",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.shape",
                     "pt": "msg",
                     "to": "dot",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1000,
             "y": 280,
             "wires": [
                 [
                     "e9067241.f48b7"
                 ]
             ]
         },
         {
             "id": "1c74879b.9d8ea8",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "set status",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{}",
                     "tot": "json"
                 },
                 {
                     "t": "set",
                     "p": "payload.text",
                     "pt": "msg",
                     "to": "missing or invalid property",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.fill",
                     "pt": "msg",
                     "to": "yellow",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.shape",
                     "pt": "msg",
                     "to": "ring",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 340,
             "y": 340,
             "wires": [
                 [
                     "b6249a0.b6ca868"
                 ]
             ]
         },
         {
             "id": "e96063e1.375bf",
             "type": "switch",
             "z": "f187b86b.724298",
             "name": "payload is array?",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "istype",
                     "v": "array",
                     "vt": "array"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 470,
             "y": 240,
             "wires": [
                 [
                     "163582e4.83243d"
                 ]
             ]
         },
         {
             "id": "163582e4.83243d",
             "type": "split",
             "z": "f187b86b.724298",
             "name": "",
             "splt": "\\n",
             "spltType": "str",
             "arraySplt": 1,
             "arraySpltType": "len",
             "stream": false,
             "addname": "",
             "x": 650,
             "y": 240,
             "wires": [
                 [
                     "794ca51f.be002c"
                 ]
             ]
         },
         {
             "id": "b6249a0.b6ca868",
             "type": "trigger",
             "z": "f187b86b.724298",
             "name": "",
             "op1": "",
             "op2": "0",
             "op1type": "nul",
             "op2type": "str",
             "duration": "1",
             "extend": false,
             "overrideDelay": false,
             "units": "s",
             "reset": "",
             "bytopic": "all",
             "topic": "topic",
             "outputs": 1,
             "x": 820,
             "y": 340,
             "wires": [
                 []
             ]
         },
         {
             "id": "e9067241.f48b7",
             "type": "change",
             "z": "f187b86b.724298",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "reset",
                     "pt": "msg",
                     "to": "true",
                     "tot": "bool"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 620,
             "y": 320,
             "wires": [
                 [
                     "b6249a0.b6ca868"
                 ]
             ]
         },
         {
             "id": "952fcff0.c6327",
             "type": "subflow:f187b86b.724298",
             "z": "22b955e2.9d2d3a",
             "name": "",
             "x": 260,
             "y": 280,
             "wires": [
                 []
             ]
         }
      ]
      

      EDIT: 21.5.2021

      Ich werde hier nun doch noch eine Node mit Subflow für Openweather publizieren. Gegenüber AccuWeather hat man denke ich den Vorteil, dass man bis zu 1000 Calls pro Tag mit dem One API Call machen kann. Dort bekommt man mehr als die 5 Tagesvorhersagen, die mit dem iobroker Adapter bzw. der openweather NodeRed Node möglich sind. Deshalb auch noch mal den Titel geändert. Im Übrigen habe ich nun festgestellt, dass es im LATEST repository doch schon einen AccuWeather Adapter gibt. Insofern wird nun dieser Flow kaum einen Mehrwert darstellen.

      Update: 23.5.2021

      So - ich bin nun zu dem Schluß gekommen, beide APIs weiter zu benutzen. Die Openweather API hat einfach den Vorteil, dass ich recht oft Abfragen innerhalb des freien Kontingents machen kann und mit der OneCall API sowohl current, wie auch stündliche und tägliche Prognosen enthalten sind. Die täglichen Prognosen sind aber in der Aussagekraft, den der AccuWeather API unterlegen. Da auch bei der AccuWeather API die täglichen Prognosen auch nicht nur 1x täglich angepasst werden, ergibt sich somit auch der Vorteil, dass man mit den 50 freien Abfragen. Somit halte ich nun eine Kombination von beiden APIs für sinnvoll.

      HIer nun die Openweather Node mit den Erklärungen in der Hilfe:

      62499e2e-6336-4613-a1fd-352fc3ee7759-image.png

      [
         {
             "id": "61a60f39.c143",
             "type": "subflow",
             "name": "OpenWeather",
             "info": "# Openweather API calls\n\nThe openweather API subflow has no internal schedules and has to be triggered from outside. \n\nCurrently there are 3 API calls implemented: \n1. [current](https://openweathermap.org/current)\n2. [oneCall](https://openweathermap.org/api/one-call-api)\n3. [air](https://openweathermap.org/api/air-pollution)\n\nThe type has to be submitted in an array in the `msg.payload`. \n\nIn each call - mandatory parameters has to be submitted within the msg-object.\n\n1. [msg.api](https://openweathermap.org/api) - you need a subscription to openweather\n2. msg.lat - the [latidude](https://en.wikipedia.org/wiki/Latitude) of the location you want to get weather data.\n3. msg.lon - the [longitude](https://en.wikipedia.org/wiki/Longitude) of the location you want to get weather data.\n4. [msg.units](https://openweathermap.org/api/one-call-api#data) - standard, metric or imperial\n5. [msg.language](https://openweathermap.org/api/one-call-api#multi) for example en=English, de=German etc.\n\n\n# Aufrufe der Openweather API\n\nDer Subflow muss von außen getriggert werden, es ist kein Scheduler in dem Subflow enthalten. \n\nZur Zeit sind 3 API calls implementiert, die frei verfügbar sind: \n1. [current](https://openweathermap.org/current)\n2. [oneCall](https://openweathermap.org/api/one-call-api)\n3. [air](https://openweathermap.org/api/air-pollution)\n\nDer Typ muss wieder als Zeichenkette in einem Array der `msg.payload` mitgegeben werden.. \n\nBei jedem Aufruf der API müssen zwingend die folgenden Eigenschaften im msg-object entahlten sein.\n\n1. [msg.api](https://openweathermap.org/api) - der Schlüssel, den man bei der Registrierung von openWeather erhält\n2. msg.lat - the [latidude](https://de.wikipedia.org/wiki/Geographische_Breite) der Breitengrad des Ortes dessen Wetterdaten man abrufen will.\n3. msg.lon - the [longitude](https://de.wikipedia.org/wiki/Geographische_L%C3%A4nge) der Längengrad des Ortes dessen Wetterdaten man abrufen will.\n4. [msg.units](https://openweathermap.org/api/one-call-api#data) - standard, metric oder imperial\n5. [msg.language](https://openweathermap.org/api/one-call-api#multi) die Sprache, in der man bestimmte Angaben zurückerhalten will (z. Bsp.: en=Englisch, de=Deutsch etc.)\n\n\n \n",
             "category": "Weather",
             "in": [
                 {
                     "x": 40,
                     "y": 280,
                     "wires": [
                         {
                             "id": "d9c54eec.a6289"
                         },
                         {
                             "id": "64531fb1.67336"
                         }
                     ]
                 }
             ],
             "out": [
                 {
                     "x": 2180,
                     "y": 160,
                     "wires": [
                         {
                             "id": "dcfb2c2.6b624d",
                             "port": 0
                         },
                         {
                             "id": "e5677626.58c378",
                             "port": 0
                         },
                         {
                             "id": "b42ddba0.34b758",
                             "port": 0
                         }
                     ]
                 }
             ],
             "env": [],
             "meta": {},
             "color": "#FFCC66",
             "icon": "font-awesome/fa-certificate",
             "status": {
                 "x": 1000,
                 "y": 420,
                 "wires": [
                     {
                         "id": "2c1977cb.33d268",
                         "port": 0
                     },
                     {
                         "id": "4517930b.00c61c",
                         "port": 0
                     }
                 ]
             }
         },
         {
             "id": "3f7ff192.4bcb0e",
             "type": "template",
             "z": "61a60f39.c143",
             "name": "forecast One Call API",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "https://api.openweathermap.org/data/2.5/onecall?lat={{lat}}&lon={{lon}}&lang={{language}}&units={{units}}&appid={{api}}",
             "output": "str",
             "x": 1140,
             "y": 160,
             "wires": [
                 [
                     "fbb64327.0a5f1"
                 ]
             ]
         },
         {
             "id": "574a8c13.cf7124",
             "type": "template",
             "z": "61a60f39.c143",
             "name": "air pollution",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://api.openweathermap.org/data/2.5/air_pollution?lat={{lat}}&lon={{lon}}&appid={{api}}",
             "output": "str",
             "x": 1130,
             "y": 260,
             "wires": [
                 [
                     "dce5b43.57b6048"
                 ]
             ]
         },
         {
             "id": "fbb64327.0a5f1",
             "type": "http request",
             "z": "61a60f39.c143",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 160,
             "wires": [
                 [
                     "c2a56071.c92eb"
                 ]
             ]
         },
         {
             "id": "dce5b43.57b6048",
             "type": "http request",
             "z": "61a60f39.c143",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 260,
             "wires": [
                 [
                     "e75c8ab0.023578"
                 ]
             ]
         },
         {
             "id": "e5677626.58c378",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.air",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1980,
             "y": 260,
             "wires": [
                 []
             ]
         },
         {
             "id": "b42ddba0.34b758",
             "type": "json",
             "z": "61a60f39.c143",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1790,
             "y": 160,
             "wires": [
                 []
             ]
         },
         {
             "id": "ce1c9bc9.515318",
             "type": "json",
             "z": "61a60f39.c143",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1790,
             "y": 260,
             "wires": [
                 [
                     "e5677626.58c378"
                 ]
             ]
         },
         {
             "id": "61e67438.4c2c1c",
             "type": "catch",
             "z": "61a60f39.c143",
             "name": "",
             "scope": [
                 "fbb64327.0a5f1",
                 "dce5b43.57b6048",
                 "69af2c32.d9a644"
             ],
             "uncaught": false,
             "x": 110,
             "y": 420,
             "wires": [
                 [
                     "74528f99.6f803"
                 ]
             ]
         },
         {
             "id": "d9c54eec.a6289",
             "type": "switch",
             "z": "61a60f39.c143",
             "name": "mandatory is api, lat, lon, units, language",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "jsonata_exp",
                     "v": "$exists(api) and $exists(lat) and $exists(lon) and $exists(units) and $exists(language)",
                     "vt": "jsonata"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 260,
             "y": 280,
             "wires": [
                 [
                     "bb8720a0.3bd8f"
                 ]
             ]
         },
         {
             "id": "74528f99.6f803",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "false",
                     "tot": "bool"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 290,
             "y": 420,
             "wires": [
                 [
                     "2c1977cb.33d268"
                 ]
             ]
         },
         {
             "id": "4dc3153.9271aec",
             "type": "template",
             "z": "61a60f39.c143",
             "name": "current with lat,lon",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://api.openweathermap.org/data/2.5/find?lat={{lat}}&lon={{lon}}&lang={{language}}&units={{units}}&appid={{api}}",
             "output": "str",
             "x": 1130,
             "y": 60,
             "wires": [
                 [
                     "69af2c32.d9a644"
                 ]
             ]
         },
         {
             "id": "69af2c32.d9a644",
             "type": "http request",
             "z": "61a60f39.c143",
             "name": "",
             "method": "GET",
             "ret": "txt",
             "paytoqs": "ignore",
             "url": "",
             "tls": "",
             "persist": false,
             "proxy": "",
             "authType": "",
             "x": 1350,
             "y": 80,
             "wires": [
                 [
                     "efe41524.773b08"
                 ]
             ]
         },
         {
             "id": "dcfb2c2.6b624d",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.current",
                     "tot": "msg"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 2000,
             "y": 80,
             "wires": [
                 []
             ]
         },
         {
             "id": "f58dd923.e55de8",
             "type": "json",
             "z": "61a60f39.c143",
             "name": "",
             "property": "payload",
             "action": "",
             "pretty": false,
             "x": 1810,
             "y": 80,
             "wires": [
                 [
                     "dcfb2c2.6b624d"
                 ]
             ]
         },
         {
             "id": "3cbb3f8a.b595a",
             "type": "switch",
             "z": "61a60f39.c143",
             "name": "request",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "eq",
                     "v": "current",
                     "vt": "str"
                 },
                 {
                     "t": "eq",
                     "v": "oneCall",
                     "vt": "str"
                 },
                 {
                     "t": "eq",
                     "v": "air",
                     "vt": "str"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 3,
             "x": 880,
             "y": 280,
             "wires": [
                 [
                     "902ff501.8b3a38",
                     "902ff501.8b3a38",
                     "1c128e4c.743c82"
                 ],
                 [
                     "902ff501.8b3a38",
                     "3f7ff192.4bcb0e"
                 ],
                 [
                     "574a8c13.cf7124",
                     "902ff501.8b3a38"
                 ]
             ]
         },
         {
             "id": "2c1977cb.33d268",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "set status error",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{\"fill\":\"red\",\"shape\":\"ring\",\"text\":\"error\"}",
                     "tot": "json"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 500,
             "y": 420,
             "wires": [
                 []
             ]
         },
         {
             "id": "902ff501.8b3a38",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "set status",
             "rules": [
                 {
                     "t": "move",
                     "p": "payload",
                     "pt": "msg",
                     "to": "payload.text",
                     "tot": "msg"
                 },
                 {
                     "t": "set",
                     "p": "payload.fill",
                     "pt": "msg",
                     "to": "green",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.shape",
                     "pt": "msg",
                     "to": "dot",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 1060,
             "y": 320,
             "wires": [
                 [
                     "4517930b.00c61c"
                 ]
             ]
         },
         {
             "id": "64531fb1.67336",
             "type": "change",
             "z": "61a60f39.c143",
             "name": "set status",
             "rules": [
                 {
                     "t": "set",
                     "p": "payload",
                     "pt": "msg",
                     "to": "{}",
                     "tot": "json"
                 },
                 {
                     "t": "set",
                     "p": "payload.text",
                     "pt": "msg",
                     "to": "missing or invalid property",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.fill",
                     "pt": "msg",
                     "to": "yellow",
                     "tot": "str"
                 },
                 {
                     "t": "set",
                     "p": "payload.shape",
                     "pt": "msg",
                     "to": "ring",
                     "tot": "str"
                 }
             ],
             "action": "",
             "property": "",
             "from": "",
             "to": "",
             "reg": false,
             "x": 320,
             "y": 380,
             "wires": [
                 [
                     "4517930b.00c61c"
                 ]
             ]
         },
         {
             "id": "bb8720a0.3bd8f",
             "type": "switch",
             "z": "61a60f39.c143",
             "name": "payload is array?",
             "property": "payload",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "istype",
                     "v": "array",
                     "vt": "array"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 1,
             "x": 550,
             "y": 280,
             "wires": [
                 [
                     "7bb23d49.512904"
                 ]
             ]
         },
         {
             "id": "7bb23d49.512904",
             "type": "split",
             "z": "61a60f39.c143",
             "name": "",
             "splt": "\\n",
             "spltType": "str",
             "arraySplt": 1,
             "arraySpltType": "len",
             "stream": false,
             "addname": "",
             "x": 730,
             "y": 280,
             "wires": [
                 [
                     "3cbb3f8a.b595a"
                 ]
             ]
         },
         {
             "id": "4517930b.00c61c",
             "type": "trigger",
             "z": "61a60f39.c143",
             "name": "",
             "op1": "",
             "op2": "",
             "op1type": "nul",
             "op2type": "payl",
             "duration": "1",
             "extend": false,
             "overrideDelay": false,
             "units": "s",
             "reset": "",
             "bytopic": "all",
             "topic": "topic",
             "outputs": 1,
             "x": 820,
             "y": 380,
             "wires": [
                 []
             ]
         },
         {
             "id": "1c128e4c.743c82",
             "type": "switch",
             "z": "61a60f39.c143",
             "name": "",
             "property": "zip",
             "propertyType": "msg",
             "rules": [
                 {
                     "t": "null"
                 },
                 {
                     "t": "nnull"
                 }
             ],
             "checkall": "true",
             "repair": false,
             "outputs": 2,
             "x": 910,
             "y": 80,
             "wires": [
                 [
                     "4dc3153.9271aec"
                 ],
                 [
                     "5b14ee1d.1dd9d"
                 ]
             ]
         },
         {
             "id": "5b14ee1d.1dd9d",
             "type": "template",
             "z": "61a60f39.c143",
             "name": "current with zip",
             "field": "url",
             "fieldType": "msg",
             "format": "handlebars",
             "syntax": "mustache",
             "template": "http://api.openweathermap.org/data/2.5/weather?zip={{zip}}&lang={{language}}&units={{units}}&appid={{api}}",
             "output": "str",
             "x": 1120,
             "y": 100,
             "wires": [
                 [
                     "69af2c32.d9a644"
                 ]
             ]
         },
         {
             "id": "c2a56071.c92eb",
             "type": "function",
             "z": "61a60f39.c143",
             "name": "clean up",
             "func": "newMsg = {topic: 'oneCall', payload: msg.payload};\nreturn newMsg;",
             "outputs": 1,
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 1580,
             "y": 160,
             "wires": [
                 [
                     "b42ddba0.34b758"
                 ]
             ]
         },
         {
             "id": "e75c8ab0.023578",
             "type": "function",
             "z": "61a60f39.c143",
             "name": "clean up",
             "func": "newMsg = {topic: 'air', payload: msg.payload};\nreturn newMsg;",
             "outputs": 1,
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 1580,
             "y": 260,
             "wires": [
                 [
                     "ce1c9bc9.515318"
                 ]
             ]
         },
         {
             "id": "efe41524.773b08",
             "type": "function",
             "z": "61a60f39.c143",
             "name": "clean up",
             "func": "newMsg = {topic: 'onlyCurrent', payload: msg.payload};\nreturn newMsg;",
             "outputs": 1,
             "noerr": 0,
             "initialize": "",
             "finalize": "",
             "libs": [],
             "x": 1580,
             "y": 80,
             "wires": [
                 [
                     "f58dd923.e55de8"
                 ]
             ]
         },
         {
             "id": "c626ee0e.ef3",
             "type": "subflow:61a60f39.c143",
             "z": "f19174b9.aa88f8",
             "name": "",
             "env": [],
             "x": 840,
             "y": 740,
             "wires": [
                 []
             ]
         }
      ]
      

      mickym 2 Replies Last reply Reply Quote 3
      • mickym
        mickym Most Active @mickym last edited by mickym

        So es wird noch etwas dauern bis man die Daten einigermaßen präsentabel vorstellen kann. Gibt auch inzwischen eine neue Version von der Node. Aber werde ich wahrscheinlich erst eröffnen, wenn ich bisschen mehr im Node-Red Dashboard zeigen kann.

        Ich habe auch mal die in diesem Thread in anderem Zusammenhang eingebundene Bahnhofsuhr, die wohl in der ioQontrol eingebunden wurde, nun auch in das Node-Red Dashboard eingebunden. Ich finde die Animation und die Ablesbarkeit echt super.

        Den Orginallink zur Bahnhofsuhr verlinke ich deshalb auch mal. (wurde zwar schon in dem Thread gemacht, aber damit kann man ja bisschen rumspielen). Vielen Dank an den Entwickler, falls er dies lesen sollte. 😉

        Mit dem HTML bin ich zwar manchmal am verzweifeln - wenn man das Node-Red Dashboard ausreizen will, aber es geht mehr als man auf den ersten Blick vermutet. Die 12 Stunden Vorhersage habe ich schon mal ohne Details entwickelt:

        Hier schon mal ein erster Eindruck. 😉

        screen.png

        mickym 1 Reply Last reply Reply Quote 0
        • mickym
          mickym Most Active @mickym last edited by mickym

          So ich habe mal etwas weiter gemacht, allerdings überzeugt mich dieses AccuWeather nicht 100%.

          Deswegen weiß ich noch nicht, ob ich da weiter mache oder mir noch andere APIs anschaue.
          Für einen freien Key sind 50 Abfragen pro Tag doch sehr wenig.

          Ich habe mal die API mit dem Adapter des DWD kombiniert und folgendes in der NodeRed GUI veranstaltet:

          screen.png

          mickym 1 Reply Last reply Reply Quote 0
          • mickym
            mickym Most Active @mickym last edited by mickym

            so die AccuWeatherAPI ist in meinen Augen doch eine der Besten und ein würdiger Nachfolger von DarkSky. Man muss halt nur aufpassen, dass man nicht zu häufig die Abfragen macht.
            Bislang ist das Scheduling in dem Subflow - ich werde das nun aber aus designtechnischen Gründen wieder nach außen verlagern, so dass man selbst entscheidet, welche Abfragen, wann und wie oft erfolgen.

            1 Reply Last reply Reply Quote 0
            • mickym
              mickym Most Active @mickym last edited by mickym

              So ich habe mich nun entschlossen eine Node ohne Scheduler zu machen, sodass man die Abfragen ausserhalb des Subflows steuert. Das ist flexibler und jeder kann dann ohne an dem Subflow rumzubasteln direkt die Abfragen steuern.

              Dennoch bevor ich mich daran mache - hier nun der letzte Stand der Node mit dem Scheduler im Subflow (s. 1. Positing EDIT).

              Im Moment werden die stündlichen Vorhersagen und das aktuelle Wetter um xx:05 abgefragt (das werde ich auch beibehalten, aber wie gesagt in Zukunft kann das jeder selbst steuern) und einmal täglich die Tagesvorhersagen um 07:15.

              Um die Zeit zwischen 0 Uhr und ggf. 07:15 müsst ihr Euch dann selbst kümmern. Warum 07:15 - die AccuWeather API schaltet einfach nach US-Zeit um.

              Bei der Node mit dem Scheduler im Subflow - wird nun im Status festgehalten, wann der letzte Request abgesetzt wurde:

              d34b47de-9fed-4ef5-b296-1dc3d8860053-image.png

              Der aktuelle Stand mit den Wetterinformationen von AccuWeather sieht nun so aus:

              6d09e245-c2d2-4cbc-a492-1c46e8bff7f3-image.png

              mickym 2 Replies Last reply Reply Quote 0
              • mickym
                mickym Most Active @mickym last edited by mickym

                So das 1. Posting habe ich nun mit der 2. Node zur Nutzung der API von AccuWeather aktualisiert.

                Nun muss man eben den Abruf durch von außen steuern, ist dafür aber flexibler, was Zeiten etc. angeht und muss nicht den Subflow anpassen.

                Ich habe das nun so gelöst, dass jeweils um 5 Minuten nach der vollen Stunde, der aktuelle Wetterstatus, sowie die stündliche Vorhersage abgerufen wird und einmal täglich um 7:15 die tägliche Vorhersage (warum habe ich vorher gepostet).
                Hier mal der Flow als Screenshot - die API Keys, Sprache und Ort sind nun in der Inject Node:

                a359f1ca-4040-4a3a-9dc1-cfe8b923779a-image.png

                Damit werden 49 der 50 täglichen Anfragen ausgereizt.

                1 Reply Last reply Reply Quote 0
                • mickym
                  mickym Most Active @mickym last edited by

                  So die Tageswettervorhersagen sind nun auch eingearbeitet - nun kommen noch die Details bevor ich mit der Erläuterung bzw. was ich über die API herausgefunden habe mit Euch teilen kann:

                  Hier nun die beiden Screenshots - um die aktuelle Implementierung zu zeigen:

                  fd1d79c9-19e8-4c37-a99c-97131e1c43c6-image.png

                  a5e5049c-a0c1-40b2-bce2-c203216bc902-image.png

                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @mickym last edited by mickym

                    So immer noch nicht in die Details gegangen, aber noch ein paar Updates gemacht.

                    Wenn ich im Browser nun rauszoome, so sieht das ganze nun so aus:

                    2f204142-90bd-4fae-bb91-abaffec31097-image.png

                    Was ich zwischen zeitlich geändert habe, ist das ich statt dem Taupunkt beim aktuellen Wetterstatus die Windböen mit aufgenommen habe und ebenfalls in die stündlichen und Tageswettervorhersagen.

                    Unter der Haube gibts insofern 2 Änderungen, dass nun Farben zur Hervorhebung non Warnsituationen verwendet werden, siehe Nachts ganz rechts unten.

                    Die Kachelfarbe bei den Vorhersagen habe ich nun nicht mehr abhängig vom Symbol gemacht, sondern wird hellgrau bei Bewölkung>60% und hellblau bei Bewölkung unter 60%.

                    mickym 1 Reply Last reply Reply Quote 0
                    • mickym
                      mickym Most Active @mickym last edited by mickym

                      OK ich habe gerade festgestellt, dass es doch ein AccuWeather API Adapter gibt:

                      https://github.com/iobroker-community-adapters/ioBroker.accuweather/blob/master/README.md - allerdings doch der nur im Latest auf und deswegen habe ich den nicht gesehen.

                      Da ich aber mit de beschränkten Anzahl von 50 kostenfreien Aufrufen doch nicht 100% zufrieden bin, werde ich mich nun doch mal der Openweather API auseinandersetzen.

                      Wer keine stündlichen Vorhersagen braucht, der ist mit dem Openweather Adapter gut bedient, der bietet 5 Tagesvorhersagen und das aktuelle Wetter.

                      00b95512-95e1-4c3d-a4fd-ff5377d05c06-image.png

                      Ich werde mich jetzt mal daran machen diese 1 Call API von openweather map über eine Node im iobroker verfügbar zu machen.

                      mickym 1 Reply Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @mickym last edited by mickym

                        So wie in dem Eingangsposting nun aktualisiert, habe ich dort nun auch einen Subflow für die Openweather API veröffentlicht.

                        Wie gesagt nutze ich nun eine Kombination beider APIs. Die AccuWeather API ist wesentlich ausführlicher, aber man ist eben auf die 50 Calls pro Tag beschränkt.
                        Bei den OpenWeather Calls kann man mit den OneAPI calls theoretisch bis zu 1000 Calls am Tag machen. Ich plane so alle 10 Minuten, plus zufällig bei Aktualisierung der Webseite + Luftgüte Calls.
                        In so einem oneAPI Call - sind stündliche Vorhersagen für 48 Stunden enthalten, die minütliche Niederschlagsprognose für die nächste Stunde und die aktuelle Wettersituation.

                        Dafür kann ich nun alle halbe Stunden mit der AccuWeather API die täglichen Prognosen durchführen. Ausserdem habe ich noch ein paar Farben genommen, um bestimmte Werte hervorzuheben.

                        Da mir die AccuWeather Icons viel besser gefallen als die Strichmännchen bei OpenWeather habe ich diese selbst sogut wie möglich gemappt.
                        Die Tagesprognosen bleiben wie gesagt unverändert, damit auch die heutige Vorhersage, die aktuelle Situation stammt nun von OpenWeather.

                        So schaut nun die Seite aus:

                        5b03a3fd-6b09-4727-89be-2b303432faa9-image.png

                        Die stündlichen Vorhersagen sind nun in Reihen zu je 12 Stunden aufgeteilt:

                        d6dc2418-0cfa-45c9-997c-2e57cab0d206-image.png

                        Falls jemand Interesse hat, habe ich für das ganze Mapping zwischen OpenWeather und AccuWeather noch 2 Subflows erstellt, die ich aber nicht dokumentiert habe - muss man halt bissi reinschauen:

                        Hier ein Subflow - um Himmelsrichtungen auf Englisch in Grad zu konvertieren und umgekehrt:

                        4d11de7d-4b1c-403e-acf0-dba4462fdefb-image.png

                        Hier mal zum selber Ausprobieren:

                        [
                           {
                               "id": "dc6c47f2.043158",
                               "type": "subflow",
                               "name": "deg-dir",
                               "info": "# Convert degrees or direction\n\nThis flow converts a payload from a direction to degrees and vice versa.\n\nThe node treats a string as direction, a number as degree. \n\nIf the payload is an object, a `msg.translate` object can be added to the msg-object to specifiy the property within the payload which needs to converted and a target property which will contain the converted value. \n <br><br>\nmsg.translate= {\"from\": `<Property in payload to convert>`, \"to\": `<Result of conversion>` }\n\n# Konvertiert Grad oder Richtung \n\nDieser Subflow konvertiert eine in Grad angegebene Richtung in die englische Abkürzung einer Himmelsrichtung und umgekehrt eine englische Bezeichnung einer Himmelsrichtung in Grad.\n\nWenn die payload ein Objekt ist, kann ein msg.translate Objekt mitgegeben werden, dass festlegt, welche Eigenschaft in einer payload konvertiert und in welcher Eigenschaft diese ausgegeben werden soll. \n <br><br>\nmsg.translate= {\"from\": `<Zu konvertierende Eigenschaft>`, \"to\": `<Ergebnis der Konvertierung>` }",
                               "category": "function",
                               "in": [
                                   {
                                       "x": 60,
                                       "y": 680,
                                       "wires": [
                                           {
                                               "id": "eaa443f.72675c"
                                           }
                                       ]
                                   }
                               ],
                               "out": [
                                   {
                                       "x": 2860,
                                       "y": 820,
                                       "wires": [
                                           {
                                               "id": "40d53126.13193",
                                               "port": 0
                                           }
                                       ]
                                   }
                               ],
                               "env": [],
                               "meta": {},
                               "color": "#E2D96E",
                               "icon": "node-red/swap.svg"
                           },
                           {
                               "id": "9c1f6057.df6b6",
                               "type": "switch",
                               "z": "dc6c47f2.043158",
                               "name": "translate degrees to direction",
                               "property": "_deg",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "btwn",
                                       "v": "0",
                                       "vt": "num",
                                       "v2": "11.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "11.25",
                                       "vt": "num",
                                       "v2": "33.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "33.75",
                                       "vt": "num",
                                       "v2": "56.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "56.25",
                                       "vt": "num",
                                       "v2": "78.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "78.75",
                                       "vt": "num",
                                       "v2": "101.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "101.25",
                                       "vt": "num",
                                       "v2": "123.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "123.75",
                                       "vt": "num",
                                       "v2": "146.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "146.25",
                                       "vt": "num",
                                       "v2": "168.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "168.75",
                                       "vt": "num",
                                       "v2": "191.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "191.25",
                                       "vt": "num",
                                       "v2": "213.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "213.75",
                                       "vt": "num",
                                       "v2": "236.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "236.25",
                                       "vt": "num",
                                       "v2": "258.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "258.75",
                                       "vt": "num",
                                       "v2": "281.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "281.25",
                                       "vt": "num",
                                       "v2": "303.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "303.75",
                                       "vt": "num",
                                       "v2": "326.25",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "326.25",
                                       "vt": "num",
                                       "v2": "348.75",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "348.75",
                                       "vt": "num",
                                       "v2": "360",
                                       "v2t": "num"
                                   }
                               ],
                               "checkall": "false",
                               "repair": false,
                               "outputs": 17,
                               "x": 1500,
                               "y": 400,
                               "wires": [
                                   [
                                       "dcd8e264.45558"
                                   ],
                                   [
                                       "ed73bd8b.bdb2a"
                                   ],
                                   [
                                       "3228f954.922706"
                                   ],
                                   [
                                       "43ab513a.9d493"
                                   ],
                                   [
                                       "7dfc8619.8030b8"
                                   ],
                                   [
                                       "9410b154.fae1d"
                                   ],
                                   [
                                       "28d01d83.4fec12"
                                   ],
                                   [
                                       "bb936040.1425b"
                                   ],
                                   [
                                       "31a20939.0fde86"
                                   ],
                                   [
                                       "9cf64e97.5cd85"
                                   ],
                                   [
                                       "d25368bf.afacc8"
                                   ],
                                   [
                                       "297518d0.76bde8"
                                   ],
                                   [
                                       "60828d37.e87f24"
                                   ],
                                   [
                                       "da57bf27.65c4b"
                                   ],
                                   [
                                       "1aee8541.5ce58b"
                                   ],
                                   [
                                       "3606a1ee.49f0fe"
                                   ],
                                   [
                                       "246a8211.e0f6fe"
                                   ]
                               ]
                           },
                           {
                               "id": "ed73bd8b.bdb2a",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "NNE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "NNE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 120,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "3228f954.922706",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "NE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "NE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 160,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "43ab513a.9d493",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "ENE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "ENE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 200,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "7dfc8619.8030b8",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "E",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "E",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 240,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "9410b154.fae1d",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "ESE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "ESE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 280,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "28d01d83.4fec12",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "SE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "SE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 320,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "bb936040.1425b",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "SSE",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "SSE",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 360,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "31a20939.0fde86",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "S",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "S",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 400,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "9cf64e97.5cd85",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "SSW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "SSW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 440,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "d25368bf.afacc8",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "SW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "SW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 480,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "297518d0.76bde8",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "WSW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "WSW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 520,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "60828d37.e87f24",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "W",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "W",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 560,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "da57bf27.65c4b",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "WNW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "WNW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 600,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "1aee8541.5ce58b",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "NW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "NW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 640,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "3606a1ee.49f0fe",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "NNW",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "NNW",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 680,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "246a8211.e0f6fe",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "N",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "N",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 720,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "dcd8e264.45558",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "N",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "N",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1830,
                               "y": 80,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "eaa443f.72675c",
                               "type": "switch",
                               "z": "dc6c47f2.043158",
                               "name": "payload Type?",
                               "property": "payload",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "istype",
                                       "v": "number",
                                       "vt": "number"
                                   },
                                   {
                                       "t": "istype",
                                       "v": "string",
                                       "vt": "string"
                                   },
                                   {
                                       "t": "istype",
                                       "v": "object",
                                       "vt": "object"
                                   }
                               ],
                               "checkall": "true",
                               "repair": false,
                               "outputs": 3,
                               "x": 320,
                               "y": 820,
                               "wires": [
                                   [
                                       "1f825f89.a7d8b"
                                   ],
                                   [
                                       "5a5bca46.4541c4"
                                   ],
                                   [
                                       "cf0cd5c4.6d3b88"
                                   ]
                               ]
                           },
                           {
                               "id": "872617de.6d3b08",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "translate direction to degrees",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "_result",
                                       "pt": "msg",
                                       "to": "_dic",
                                       "tot": "msg"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "NNE",
                                       "fromt": "str",
                                       "to": "23",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "ENE",
                                       "fromt": "str",
                                       "to": "68",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "ESE",
                                       "fromt": "str",
                                       "to": "113",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "SSE",
                                       "fromt": "str",
                                       "to": "158",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "SSW",
                                       "fromt": "str",
                                       "to": "203",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "WSW",
                                       "fromt": "str",
                                       "to": "248",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "WNW",
                                       "fromt": "str",
                                       "to": "293",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "NNW",
                                       "fromt": "str",
                                       "to": "338",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "NE",
                                       "fromt": "str",
                                       "to": "45",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "SE",
                                       "fromt": "str",
                                       "to": "135",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "SW",
                                       "fromt": "str",
                                       "to": "225",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "NW",
                                       "fromt": "str",
                                       "to": "315",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "N",
                                       "fromt": "str",
                                       "to": "0",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "E",
                                       "fromt": "str",
                                       "to": "90",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "S",
                                       "fromt": "str",
                                       "to": "180",
                                       "tot": "num"
                                   },
                                   {
                                       "t": "change",
                                       "p": "_result",
                                       "pt": "msg",
                                       "from": "W",
                                       "fromt": "str",
                                       "to": "270",
                                       "tot": "num"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1760,
                               "y": 820,
                               "wires": [
                                   [
                                       "b32f860.9832a78"
                                   ]
                               ]
                           },
                           {
                               "id": "b32f860.9832a78",
                               "type": "function",
                               "z": "dc6c47f2.043158",
                               "name": "Dummy",
                               "func": "\nreturn msg;",
                               "outputs": 1,
                               "noerr": 0,
                               "initialize": "",
                               "finalize": "",
                               "libs": [],
                               "x": 2180,
                               "y": 820,
                               "wires": [
                                   [
                                       "4500ebb6.b3fd34"
                                   ]
                               ]
                           },
                           {
                               "id": "1f825f89.a7d8b",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "move",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "_deg",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 560,
                               "y": 400,
                               "wires": [
                                   [
                                       "9c1f6057.df6b6"
                                   ]
                               ]
                           },
                           {
                               "id": "cf0cd5c4.6d3b88",
                               "type": "switch",
                               "z": "dc6c47f2.043158",
                               "name": "msg.translate is object",
                               "property": "translate",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "istype",
                                       "v": "object",
                                       "vt": "object"
                                   }
                               ],
                               "checkall": "true",
                               "repair": false,
                               "outputs": 1,
                               "x": 600,
                               "y": 940,
                               "wires": [
                                   [
                                       "c043b979.6833f8"
                                   ]
                               ]
                           },
                           {
                               "id": "c043b979.6833f8",
                               "type": "function",
                               "z": "dc6c47f2.043158",
                               "name": "msg._var",
                               "func": "msg._var= msg.payload[msg.translate.from];\nreturn msg;",
                               "outputs": 1,
                               "noerr": 0,
                               "initialize": "",
                               "finalize": "",
                               "libs": [],
                               "x": 820,
                               "y": 940,
                               "wires": [
                                   [
                                       "ec838320.c0795"
                                   ]
                               ]
                           },
                           {
                               "id": "58a21aa3.623dd4",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "move",
                                       "p": "_var",
                                       "pt": "msg",
                                       "to": "_dic",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1210,
                               "y": 960,
                               "wires": [
                                   [
                                       "872617de.6d3b08"
                                   ]
                               ]
                           },
                           {
                               "id": "ec838320.c0795",
                               "type": "switch",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "property": "_var",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "istype",
                                       "v": "number",
                                       "vt": "number"
                                   },
                                   {
                                       "t": "istype",
                                       "v": "string",
                                       "vt": "string"
                                   }
                               ],
                               "checkall": "true",
                               "repair": false,
                               "outputs": 2,
                               "x": 980,
                               "y": 940,
                               "wires": [
                                   [
                                       "16176c46.69eb74"
                                   ],
                                   [
                                       "58a21aa3.623dd4"
                                   ]
                               ]
                           },
                           {
                               "id": "16176c46.69eb74",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "move",
                                       "p": "_var",
                                       "pt": "msg",
                                       "to": "_deg",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1210,
                               "y": 460,
                               "wires": [
                                   [
                                       "9c1f6057.df6b6"
                                   ]
                               ]
                           },
                           {
                               "id": "5a5bca46.4541c4",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "move",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "_dic",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 600,
                               "y": 820,
                               "wires": [
                                   [
                                       "872617de.6d3b08"
                                   ]
                               ]
                           },
                           {
                               "id": "4500ebb6.b3fd34",
                               "type": "switch",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "property": "payload",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "istype",
                                       "v": "object",
                                       "vt": "object"
                                   },
                                   {
                                       "t": "null"
                                   }
                               ],
                               "checkall": "false",
                               "repair": false,
                               "outputs": 2,
                               "x": 2330,
                               "y": 820,
                               "wires": [
                                   [
                                       "fc6c40af.50fb4"
                                   ],
                                   [
                                       "1ca3e36d.87d9dd"
                                   ]
                               ]
                           },
                           {
                               "id": "fc6c40af.50fb4",
                               "type": "function",
                               "z": "dc6c47f2.043158",
                               "name": "set msg.payload property",
                               "func": "msg.payload[msg.translate.to]= msg._result;\nreturn msg;",
                               "outputs": 1,
                               "noerr": 0,
                               "initialize": "",
                               "finalize": "",
                               "libs": [],
                               "x": 2530,
                               "y": 800,
                               "wires": [
                                   [
                                       "40d53126.13193"
                                   ]
                               ]
                           },
                           {
                               "id": "1ca3e36d.87d9dd",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "_result",
                                       "tot": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 2510,
                               "y": 840,
                               "wires": [
                                   [
                                       "40d53126.13193"
                                   ]
                               ]
                           },
                           {
                               "id": "40d53126.13193",
                               "type": "change",
                               "z": "dc6c47f2.043158",
                               "name": "clean up",
                               "rules": [
                                   {
                                       "t": "delete",
                                       "p": "_deg",
                                       "pt": "msg"
                                   },
                                   {
                                       "t": "delete",
                                       "p": "_dic",
                                       "pt": "msg"
                                   },
                                   {
                                       "t": "delete",
                                       "p": "_result",
                                       "pt": "msg"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 2740,
                               "y": 820,
                               "wires": [
                                   []
                               ]
                           },
                           {
                               "id": "e6e49680.352508",
                               "type": "subflow:dc6c47f2.043158",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "env": [],
                               "x": 860,
                               "y": 540,
                               "wires": [
                                   [
                                       "d941fae3.c19de8"
                                   ]
                               ]
                           },
                           {
                               "id": "4e6857c4.b2e2f8",
                               "type": "inject",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "ESE",
                               "payloadType": "str",
                               "x": 660,
                               "y": 500,
                               "wires": [
                                   [
                                       "e6e49680.352508"
                                   ]
                               ]
                           },
                           {
                               "id": "d941fae3.c19de8",
                               "type": "debug",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "false",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1070,
                               "y": 540,
                               "wires": []
                           },
                           {
                               "id": "190b7da.ee25a82",
                               "type": "inject",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "113",
                               "payloadType": "num",
                               "x": 660,
                               "y": 560,
                               "wires": [
                                   [
                                       "e6e49680.352508"
                                   ]
                               ]
                           },
                           {
                               "id": "a3cc8f90.9e85e",
                               "type": "inject",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "{\"Name\":\"Ein Wetterobjekt\",\"Grad\":113,\"Richtung\":\"\"}",
                               "payloadType": "json",
                               "x": 490,
                               "y": 720,
                               "wires": [
                                   [
                                       "a630f31c.5ecc9",
                                       "45331f03.b0b19"
                                   ]
                               ]
                           },
                           {
                               "id": "a630f31c.5ecc9",
                               "type": "debug",
                               "z": "f19174b9.aa88f8",
                               "name": "Vorher",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 690,
                               "y": 660,
                               "wires": []
                           },
                           {
                               "id": "45331f03.b0b19",
                               "type": "change",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "translate",
                                       "pt": "msg",
                                       "to": "{\"from\":\"Grad\",\"to\":\"Richtung\"}",
                                       "tot": "json"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 700,
                               "y": 720,
                               "wires": [
                                   [
                                       "a7b62853.90a188"
                                   ]
                               ]
                           },
                           {
                               "id": "43e76c62.f9f3f4",
                               "type": "debug",
                               "z": "f19174b9.aa88f8",
                               "name": "Nachher",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1060,
                               "y": 680,
                               "wires": []
                           },
                           {
                               "id": "a7b62853.90a188",
                               "type": "subflow:dc6c47f2.043158",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "x": 900,
                               "y": 720,
                               "wires": [
                                   [
                                       "43e76c62.f9f3f4"
                                   ]
                               ]
                           },
                           {
                               "id": "a317f624.e65ef8",
                               "type": "inject",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "{\"Name\":\"Ein Wetterobjekt\",\"Grad\":0,\"Richtung\":\"ESE\"}",
                               "payloadType": "json",
                               "x": 490,
                               "y": 860,
                               "wires": [
                                   [
                                       "82b01d90.3b412",
                                       "b664ad2f.d0483"
                                   ]
                               ]
                           },
                           {
                               "id": "82b01d90.3b412",
                               "type": "debug",
                               "z": "f19174b9.aa88f8",
                               "name": "Vorher",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 690,
                               "y": 800,
                               "wires": []
                           },
                           {
                               "id": "b664ad2f.d0483",
                               "type": "change",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "translate",
                                       "pt": "msg",
                                       "to": "{\"from\":\"Richtung\",\"to\":\"Grad\"}",
                                       "tot": "json"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 700,
                               "y": 860,
                               "wires": [
                                   [
                                       "57b177c7.252008"
                                   ]
                               ]
                           },
                           {
                               "id": "2ebe86d.7b9927a",
                               "type": "debug",
                               "z": "f19174b9.aa88f8",
                               "name": "Nachher",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1060,
                               "y": 820,
                               "wires": []
                           },
                           {
                               "id": "57b177c7.252008",
                               "type": "subflow:dc6c47f2.043158",
                               "z": "f19174b9.aa88f8",
                               "name": "",
                               "x": 900,
                               "y": 860,
                               "wires": [
                                   [
                                       "2ebe86d.7b9927a"
                                   ]
                               ]
                           }
                        ]
                        

                        ob dieser Icon Mapping Subflow Sinn macht - weiß ich nicht, da man ja die Icons gleich benennen müsste. Deswegen lass ich das mal weg.

                        Ich habe mir nun auch noch die cronplus Node installiert - super machtig um in einer Node mit verschiedenen Ereignissen und der Flexibilität der cron Syntax zu arbeiten - inkl. Astro Funktionen: https://flows.nodered.org/node/node-red-contrib-cron-plus

                        Einfach mal anschauen, wenn es interessiert. Man sieht auch gleich, wann die nächsten Ereignisse sind. 😉

                        G 1 Reply Last reply Reply Quote 2
                        • G
                          Garf @mickym last edited by

                          @mickym
                          Mir gefällt die Bahnhofsuhr. Nein, noch mehr gefällt mir die Arbeit die Du dir machst und dann noch hier veröffentlichst, ohne dass jemand überhaupt mal antwortet. In der Tat das Dashboard in Node Red ist wirklich schwierig zu handeln. Aber auch dies ist dir wirklich sehr gut gelungen. Mal sehen vielleicht importiere ich mir mal deinen Flow.
                          Mal eine allgemeine Frage zu Node Red. Gibt es irgendwo ein deutschsprachiges Forum für Node Red User?

                          mickym 1 Reply Last reply Reply Quote 0
                          • mickym
                            mickym Most Active @Garf last edited by mickym

                            @garf sagte in Wetter API's mit NodeRed abrufen:

                            @mickym
                            Mir gefällt die Bahnhofsuhr. Nein, noch mehr gefällt mir die Arbeit die Du dir machst und dann noch hier veröffentlichst, ohne dass jemand überhaupt mal antwortet. In der Tat das Dashboard in Node Red ist wirklich schwierig zu handeln. Aber auch dies ist dir wirklich sehr gut gelungen. Mal sehen vielleicht importiere ich mir mal deinen Flow.
                            Mal eine allgemeine Frage zu Node Red. Gibt es irgendwo ein deutschsprachiges Forum für Node Red User?

                            Mir ging es Anfang erst mal darum zu zeigen, wie einfach man - wenn ein Adapter fehlt man mit NodeRed die Datenpunkte in den iobroker bekommt. 😉

                            Ganz lieben Dank für Dein Feedback. Zumindest gibts hin und wieder jemand, der hier doch noch mitliest. Die Bahnhofsuhr habe ich ja hier im Forum aufgetan und bin ich durch Zufall in dem ioQontrol Thread gestoßen und dachte, die müsste sich doch auch im NodeRed Dashboard einbinden lassen. Das NodeRed Dashboard ist ein sehr mächtiges Tool - das man allerdings nicht mit VIS vergleichen kann, da es einen anderen Ansatz hat. Allerdings bekommt man sehr schnell Resultate, wenn einem die Steuerung am Herzen liegt. Man kann aber auch viel mehr machen, als man am Anfang denkt.
                            Das NR-Dashboard, mit dem responsive Design, wird ja versucht im iobroker erst nachzuahmen. Beispiel ist der jarvis Adapter, der im Prinzip mit dem NR Dashboard vergleichbar ist und auch die Material Design Elemente verwendet (Google Android Design).
                            Je grafisch anspruchsvoller man halt Dinge mit dem NR Dashborad darstellen will, desto mehr muss man sich halt mit HTML Programmierung beschäftigen - dann ist aber wie Du siehst vieles möglich und die Möglichkeiten nahezu unbegrenzt. Allerdings muss man halt immer entscheiden, was einem wichtiger ist - schnelles Steuern und Funktionalität oder grafischer Anspruch (für letzteres ist VIS einfacher zu erlernen). Wenn man also nicht will, dass einem das auf dem Handy alles durcheinander wirbelt muss man halt große Gruppen machen - sieht halt dann wie auf einem großen Bildschirm nur einen Ausschnitt.

                            Nun zu Deiner Frage - nein ein richtiges deutschsprachiges NodeRed Forum kenn ich nicht. Du wirst sicher auch schon mal gegoogelt haben . Dieses Bastelbunkerforum könnte man im Ansatz vielleicht nutzen, um bestimmte Dinge zu diskutieren, wenn man es hier nicht machen möchte.

                            Ergänzung:
                            Die ganze Seite so zur Verfügung zu stellen - davon sehe ich erst mal, ab da dazu erst mal einige Voraussetzungen geschaffen werden müssen, wie beispielsweise muss man sich die Keys besorgen, manuell die Icons runterladen und in einem Verzeichnis speichern. Diese Resourcen dann NR zur Verfügung stellen usw.
                            Deshalb bis jetzt erst mal nur die Subflows.

                            Ein Nachteil hat das NR Dashboard auch - in dem ich zum Beispiel bestimmte Kacheln nicht fixieren kann oder nur einen Teil des Bildschirms scrollbar mache. So verschwindet natürlich die Uhr etc. - das kann man im VIS schnell und einfach lösen, hier sind einfach Grenzen des responsive Designs.
                            Momentan fehlen auch noch die Popups - aber hier mal ein kleines Video um einen dynamischeren Eindruck der Seite zu bekommen und wie sich die um 15:00 selbst aktualisiert mit den Flows dahinter.

                            NR Dashboard Wetter.mp4

                            G 1 Reply Last reply Reply Quote 0
                            • G
                              Garf @mickym last edited by Garf

                              @mickym
                              Ich lese hier täglich mit. Aber auch nur die Beiträge zu Node Red. In der alten Forensoft hatten sich hier viele Anwender für Diskussionen und Fragen eingefunden. Seit der neuen Optik und vielleicht auch weil Node Red erst nicht als eigen Kategorie vertreten war, hat sich irgendwie alles in Luft aufgelöst und nimmt jetzt nicht mehr so wirklich Fahrt auf. Ist aber nur eine Vermutung von mir. Wäre vielleicht auch sonst eingetreten. Vom User rewenode habe ich auch schon lange nichts mehr gelesen. Den Bastelbunker habe ich schon gefunden, aber der letzte Beitrag ist nun auch schon 24 Tage alt. So richtig passieren tut da auch nichts. Im englischsprachigen Forum passiert da schon täglich mehr.

                              Ich habe mir so lustige Anzeigeinstrument ins Dashboard eingebaut. Damit dann aber auch nicht wirklich weitergemacht. Ist schon alles sehr zeitaufwändig.
                              Regent.JPG
                              Regen2.JPG

                              Das mit der Bahnhofsuhr lässt mir keine Ruhe, da juckt es immer noch in den Fingern mal zu schauen wie Du dass gemacht hast. Mit der Wettervorhersage habe ich es mir sehr einfach gemacht, über einen externen Link öffne ich in einem neuen Tab die Seite für die Vorhersage bzw. für das Regenradar. Da schaue ich mir dann selber an, was sich in den nächsten Stunden so ergeben wird. Als Zweiradfahrer hat man da so seine Erfahrungen gemacht. Die Vorhersagen sind mir einfach zu ungenau. Melden die Regen, dann bleibt es trocken, melden die trocken, dann regenet es. Ich bin schon immer froh, wenn der Folgetag einigermaßen stimmig vorhergesagt wird. Aber trotzdem sehr interssant was Du da auf die Beine gestellt hast und nur darum ging es dir ja.

                              mickym 1 Reply Last reply Reply Quote 0
                              • mickym
                                mickym Most Active @Garf last edited by mickym

                                @garf Wow - die Widgets schauen ja super clean und toll aus, wo hast Du die denn her?

                                Den Link zur Bahnhofsuhr hatte ich ja schon mal veröffentlicht. Dort kannst auch die verschiedenen Optionen auswählen.

                                Unten auf der Seite findest Du als Download so ein ZIP-File (Bahnhofsuhr). Du brauchst nur die Javascript-Datei und die Index.html - habe ich in eine Template Node verfrachtet:

                                Das Einzige was Du nun machen musst - ich brauchte das auch für meine Icons, dass Du einen lokalen Pfad in NodeRed definierst, mit dem Du auf eigene, lokale Resourcen zugreifen kannst. Ich hab schon mal die Entwickler angefragt, dass sie das doch bitte als Parameter in die Adapterkonfiguration aufnehmen. Ansonsten musst halt bei jedem Update die settings.js manuell anpassen:

                                In der settings.js gibst Du also den Pfad an, wo Du künftig Deine lokalen Ressourcen speicherst:

                                    // When httpAdminRoot is used to move the UI to a different root path, the
                                    // following property can be used to identify a directory of static content
                                    // that should be served at http://localhost:1880/.
                                    //httpStatic: '/home/nol/node-red-dashboard/',
                                    httpStatic: "/data/node-red",
                                

                                Aus der Index.html Datei der Bahnhofsuhr brauchst Du natürlich nur den Kernbereich:

                                <title>Bahnhofsuhr</title>
                                    
                                      <!--[if IE]>
                                        <script type="text/javascript" src="excanvas.js"></script>
                                      <![endif]-->
                                
                                      <script type="text/javascript" src="/station-clock.js"></script>
                                      <script type="text/javascript">
                                
                                      var clock = new StationClock("clock");
                                      clock.body = StationClock.RoundBody;
                                      clock.dial = StationClock.GermanStrokeDial;
                                      clock.hourHand = StationClock.PointedHourHand;
                                      clock.minuteHand = StationClock.PointedMinuteHand;
                                      clock.secondHand = StationClock.NewHoleShapedSecondHand;
                                      clock.boss = StationClock.RedBoss;
                                      clock.minuteHandBehavoir = StationClock.ElasticBouncingMinuteHand;
                                      clock.secondHandBehavoir = StationClock.OverhastySecondHand;
                                
                                      animate();
                                
                                      function animate() {
                                        clock.draw();
                                        window.setTimeout("animate()", 50);
                                      }
                                
                                </script>
                                	
                                <div style="text-align: center; padding-top: 0px">
                                    <canvas id="clock" width="230" height="230">
                                        Fehlermeldung       
                                    </canvas>
                                </div>
                                

                                Ich habe hier nur ein "/" bei der Pfadangabe zu dem Script gemacht (weiss nicht mal ob man das muss):

                                src="/station-clock.js"
                                

                                Im unteren div-Teil kannst Du mit Weite und Höhe die Dimensionen der Uhr variieren. Hier in Pixeln - wobei vielleicht auch % gehen. Dabei gilt als 100 % immer der Bereich, so breit und hoch Deine Template Node ist.

                                Das Root-Verzeichnis, in dem also meine station-clock.js liegt, ist also das http-static Verzeichnis.

                                Und die Optionen, wie Du Uhr auszusehen hat, kannst ja zum einen auf der Webseite ausprobieren und zum anderen siehst du im Javascript File selbst, welche Optionen man definiert, das hat der Entwickler schön dokumentiert -
                                hier nur exemplarisch, wie man das Aussehen der Uhr verändern kann:

                                // clock body (Uhrgehäuse)
                                StationClock.NoBody         = 0;
                                StationClock.SmallWhiteBody = 1;
                                StationClock.RoundBody      = 2;
                                StationClock.RoundGreenBody = 3;
                                StationClock.SquareBody     = 4;
                                StationClock.ViennaBody     = 5;
                                

                                Was ich selbst gerade getestet habe, man kann sogar einen Offset inder Template Node mitgeben in Form von:

                                    clock.hourOffset = 2;
                                

                                Damit kannst Du quasi in jeder Template Node eine andere Weltzeit anzeigen lassen.

                                G 2 Replies Last reply Reply Quote 1
                                • G
                                  Garf @mickym last edited by Garf

                                  @mickym
                                  Dass mit den Widges funktioniert ähnlich wie mit der Bahnhofsuhr, Bei Interesse teile ich gerne mein Wissen mit dir. Hier mal eine Übersicht der Möglichkeiten und eine fertige Wetterseite.

                                  https://nicolas-van.github.io/steelseries/
                                  https://www.epfenbachwetter.de/WDlive/gauges-ss-basic.htm

                                  Das mit der Bahnhofsuhr schaue ich mir bei Gelegenheit sicher näher an. Irgendwie möchte ich dass bei mir mit einbauen. Stehe zur Zeit total auf Wanduhren in jeglicher Form und Art. Warum nicht auch als Dashboardstartseite.

                                  1 Reply Last reply Reply Quote 0
                                  • mickym
                                    mickym Most Active last edited by

                                    @garf sagte in Wetter API's mit NodeRed abrufen:

                                    @mickym
                                    Dass mit den Widges funktioniert ähnlich wie mit der Bahnhofsuhr, Bei Interesse teile ich gerne mein Wissen mit dir. Hier mal eine Übersicht der Möglichkeiten und eine fertige Wetterseite.

                                    https://nicolas-van.github.io/steelseries/
                                    https://www.epfenbachwetter.de/WDlive/gauges-ss-basic.htm

                                    Das mit der Bahnhofsuhr schaue ich mir bei Gelegenheit sicher näher an. Irgendwie möchte ich dass bei mir mit einbauen. Stehe zur Zeit total auf Wanduhren in jeglicher Form und Art. Warum nicht auch als Dashboardstartseite.

                                    Na da brauche ich glaube Deine Hilfe - so fortgeschritten bin ich dann wieder nicht.

                                    1. Die installation npm install steelseries im http- static diectory durchführen?
                                    2. Eigenes Javascript Datei anlegen - und dann steelseries importieren
                                      ...

                                    dann fehlt mir aber komplett die Doku, was in dem .js File stehen muss und welche Paramter man dann im HTML nutzen kann oder muss ich den ganzen Souce Code durchgehen - ich befürchte. 😉

                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      Garf @mickym last edited by

                                      @mickym sagte in Wetter API's mit NodeRed abrufen:

                                      dann fehlt mir aber komplett die Doku, was in dem .js File stehen muss und welche Paramter man dann im HTML nutzen kann oder muss ich den ganzen Souce Code durchgehen - ich befürchte. 😉

                                      Ja, genau hier fängt die Problematik an. Es gibt keine Doku dafür. Deshalb habe ich mal angefangen mein Wissen aufzuschreiben. Über npm installiert habe ich nichts. Ich suche mal alles zusammen und stelle es dir zur Verfügung. Hier schon einmal etwas zum Einlesen.

                                      https://harmoniccode.blogspot.com/2011/09/steelseries-396.html
                                      https://harmoniccode.blogspot.com/2011/04/steelseries-javascript-edition.html
                                      https://tech.scargill.net/steelseries-and-node-red/
                                      https://tech.scargill.net/node-red-ui/

                                      mickym 1 Reply Last reply Reply Quote 0
                                      • mickym
                                        mickym Most Active @Garf last edited by mickym

                                        @garf Ok - vielen Dank. Nachdem ich gestern eigentlich ziemlich viel schon recherchiert habe, habe ich den einen Flow mit den alten Versionen ja auch hinbekommen, wie dem einen Artikel, den Du auch schon gepostet hast:

                                        https://tech.scargill.net/steelseries-and-node-red/

                                        2e9f14dd-cfad-4b56-807f-5414d9d2b8e7-image.png

                                        Das Problem habe ich mir den neuen Versionen, die eben nicht auf einer JAVASCRIPT Datei basieren, sondern sich mit imports immer Komponenten hinzuladen.
                                        Der Browser sagt dann immer dass man import nur in modulen verwenden kann etc.

                                        Mit dieser Anleitung komme ich einfach nicht hin:

                                        be466db8-3b4c-41bd-869f-0d5d02550453-image.png

                                        Und nur mal den Kompass darzustellen gelingt mir nicht - die ganzen *.js Dateien sind in einem Verzeichnis verstreut - werde nochmal versuchen - einfach dieses Verzeichnis nochmal kopieren - aber bin langsam mit meiner Weisheit am Ende.

                                        DEn Compass aus der Demo bekomme ich einfach nach der Anleitung nicht hin.

                                        G 1 Reply Last reply Reply Quote 0
                                        • G
                                          Garf @mickym last edited by Garf

                                          @mickym
                                          Sollte aber funktionieren. Die richtigen Javascript Dateien zu finden ist die Kunst.
                                          Einen grafisch dargestellten statischen Kompass habe ich auf meinem Testlaptop gefunden.
                                          testy.JPG
                                          Dashboard.JPG
                                          Die von dir beschriebene Methode mit Import kenne ich noch nicht. Ich habe nach der passenden Javascript Datei gesucht und diese im Verzeichnis abgelegt. Und da gibt es durchaus unterschiedliche Dateien im Netz.

                                          Hier mal der dazugehörige html Code

                                          <script src="/myjs/tween-min.js"></script>
                                          <script src="/myjs/steelseries-min.js"></script>
                                          <script>
                                          var compass;
                                              (function(scope){ 
                                                  scope.$watch('msg', function(msg) {
                                                     if (typeof(msg.value) != "undefined")compass.setValueAnimated(msg.value);
                                                    
                                                  });
                                              })(scope);
                                          
                                              
                                          
                                              compass = new steelseries.Compass('compass', {
                                                      gaugeType: steelseries.GaugeType.TYPE4,
                                                      
                                                      size: 190,
                                                      
                                                      rotateFace:  true,
                                                      //
                                                      //titleString: "Charge",
                                                      //unitString: "AMPS",
                                                     // threshold: 11.9,
                                                     // minValue: 0,
                                                     // maxValue:  10,
                                                     // thresholdRising: false,
                                                      //lcdVisible: true,
                                                     
                                                  });
                                          //cog.steelseries.BackgroundColor.(steelseries.BackgroundColor.WHITE); 
                                             compass.setFrameDesign(steelseries.FrameDesign.BRASS);
                                             compass.setValueAnimated(0);                   
                                             
                                             //cog.setPointerType(steelseries.PointerType.TYPE9);
                                              
                                          
                                          
                                          </script>
                                          
                                          <canvas id="compass" width="190" height="190"></canvas>
                                          

                                          Für den Weatherman gibt es auch eine Anleitung um die Steelserie einzubinden.
                                          https://github.com/Sineos/node-red-contrib-weatherman/blob/master/README_DE.md

                                          Den Flow habe ich testweise auch mal exportiert, Da sieht die grafische Dartsellung jedoch nicht wirklich vollständig aus.

                                          Weatherman.JPG

                                          Ja, die Widgets sind sehr schön, machen aber viel Arbeit in der Umsetzung und an Informationen und Hilfe findet man nicht wirklich viel.

                                          mickym 1 Reply Last reply Reply Quote 0
                                          • mickym
                                            mickym Most Active @Garf last edited by mickym

                                            @garf OK - denke das hilft mir schon mal. Ich sehe Du verwendest auch die alten Dateien.

                                            <script src="/myjs/tween-min.js"></script>
                                            <script src="/myjs/steelseries-min.js"></script>
                                            

                                            Wenn man damit auch alles machen kann, dann werde ich das mal weiterverfolgen. Reicht ja vollkommen.

                                            Dieses Weatherman Projekt ist auch hilfreich.

                                            Ganz lieben Dank. Wenn ich noch Fragen habe, dann melde ich mich.

                                            Dein Template hat jedenfalls schon mal auf Anhieb funktioniert, da ich die beiden Dateien ja schon eingebunden hatte. 😉

                                            f92712a1-b487-47b1-b649-41a882ac549e-image.png

                                            Zur ergänzenden Dokumentation zu der im Template gebrauchten Funktion scope:
                                            Diese dient dazu das msg-Objekt auch außerhalb der html Elemente in einer Template Node als zum Beispiel unter <scripts> verfügbar zu machen - hier die offizielle Node-Red Seite dazu:

                                            https://flows.nodered.org/flow/2f1aaf0635f9bf23207152682323240a

                                            (function(scope){ 
                                                    scope.$watch('msg', function(msg) {
                                                       if (typeof(msg.value) != "undefined")compass.setValueAnimated(msg.value);
                                                      
                                                    });
                                                })(scope);
                                            

                                            Der Artikel erklärt auch noch den Unterschied zwischen der Nutzung der geschweiften Klammer in der Template Node und diesen "voreingestellten Direktiven".

                                            <div ng-bind-html="msg.payload"></div>
                                            

                                            damit können auch in der Payload Formatierungen mitgegeben werden.

                                            G 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            1.0k
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

                                            node-red template
                                            2
                                            29
                                            6823
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo