Corona Dashboard mit NodeRed erstellen

Auf meinem Raspberry Pi läuft NodeRed. Damit kann man schnell eine Coron-Dashboard für Deutschland (oder jedes andere Land) erstellen. Es wird jede Stunde aus den Daten des CSSE via REST-API https://covid19.mathdro.id/api/confirmed gespeist.

Corona Dashboard mit NodeRed erstellen

Dafür einmalig die GUI Elemente installieren über: npm install node-red-dashboard oder

Corona Dashboard mit NodeRed erstellen

Dann diese Nodes zusammenklicken:

Corona Dashboard mit NodeRed erstellen

oder von hier importieren:

[
    {
        "id": "622e582b.b2261",
        "type": "comment",
        "z": "884ebfce.72d028",
        "name": "www.wenzlaff.info",
        "info": "",
        "x": 450,
        "y": 480,
        "wires": []
    },
    {
        "id": "8c6d68f.1965618",
        "type": "inject",
        "z": "884ebfce.72d028",
        "name": "Jede Stunde",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "3600",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 140,
        "y": 540,
        "wires": [
            [
                "3198308f.b1d0b"
            ]
        ]
    },
    {
        "id": "3198308f.b1d0b",
        "type": "http request",
        "z": "884ebfce.72d028",
        "name": "Covid-19 abfragen für Deutschland",
        "method": "GET",
        "ret": "obj",
        "paytoqs": false,
        "url": "https://covid19.mathdro.id/api/confirmed",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "basic",
        "x": 280,
        "y": 600,
        "wires": [
            [
                "1e19af2c.3c92f1",
                "e935b158.b1c868",
                "bb021e94.c516c8",
                "85336713.7e3e5"
            ]
        ]
    },
    {
        "id": "71ae5876.b57de8",
        "type": "comment",
        "z": "884ebfce.72d028",
        "name": "via Service von https://covid19.mathdro.id/api/confirmed",
        "info": "",
        "x": 830,
        "y": 480,
        "wires": []
    },
    {
        "id": "8e007bf2.5451c8",
        "type": "comment",
        "z": "884ebfce.72d028",
        "name": "covid-19 Live-Ticker für Deutschland",
        "info": "",
        "x": 190,
        "y": 480,
        "wires": []
    },
    {
        "id": "f7ef9b21.d54418",
        "type": "ui_gauge",
        "z": "884ebfce.72d028",
        "name": "Bestätigt",
        "group": "9a7db4b9.81f32",
        "order": 0,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Bestätigt",
        "label": "Personen",
        "format": "{{msg.payload | number:0}}",
        "min": 0,
        "max": "50000",
        "colors": [
            "#e5e500",
            "#e6e600",
            "#e5e500"
        ],
        "seg1": "",
        "seg2": "",
        "x": 880,
        "y": 540,
        "wires": []
    },
    {
        "id": "1e19af2c.3c92f1",
        "type": "function",
        "z": "884ebfce.72d028",
        "name": "Wert ermitteln",
        "func": "// Hier das gewünschte Land angeben\nvar land = \"Germany\"\n\n// Suche den Index des Land\nfor (var i = 0; i < msg.payload.length; i++){\n    if (msg.payload[i].countryRegion == land ){\n        land = i\n        break\n    }\n}        \n\nvar anzahl = msg.payload[land].confirmed\n\nmsg.payload = anzahl\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 700,
        "y": 540,
        "wires": [
            [
                "f7ef9b21.d54418"
            ]
        ]
    },
    {
        "id": "7f979e06.0f8f38",
        "type": "ui_gauge",
        "z": "884ebfce.72d028",
        "name": "Gestorben",
        "group": "9a7db4b9.81f32",
        "order": 0,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Gestorben",
        "label": "Personen",
        "format": "{{msg.payload | number:0}}",
        "min": 0,
        "max": "500",
        "colors": [
            "#ff4f3e",
            "#ff4c36",
            "#ff493f"
        ],
        "seg1": "",
        "seg2": "",
        "x": 890,
        "y": 580,
        "wires": []
    },
    {
        "id": "e935b158.b1c868",
        "type": "function",
        "z": "884ebfce.72d028",
        "name": "Wert ermitteln",
        "func": "// Hier das gewünschte Land angeben\nvar land = \"Germany\"\n\n// Suche den Index des Land\nfor (var i = 0; i < msg.payload.length; i++){\n    if (msg.payload[i].countryRegion == land ){\n        land = i\n        break\n    }\n}        \n\nvar anzahl = msg.payload[land].deaths\n\nmsg.payload = anzahl\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 700,
        "y": 580,
        "wires": [
            [
                "7f979e06.0f8f38"
            ]
        ]
    },
    {
        "id": "76728699.1a9478",
        "type": "ui_gauge",
        "z": "884ebfce.72d028",
        "name": "Genesen",
        "group": "9a7db4b9.81f32",
        "order": 0,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Genesen",
        "label": "Personen",
        "format": "{{msg.payload | number:0}}",
        "min": 0,
        "max": "500",
        "colors": [
            "#46b22a",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "x": 880,
        "y": 620,
        "wires": []
    },
    {
        "id": "bb021e94.c516c8",
        "type": "function",
        "z": "884ebfce.72d028",
        "name": "Wert ermitteln",
        "func": "// Hier das gewünschte Land angeben\nvar land = \"Germany\"\n\n// Suche den Index des Land\nfor (var i = 0; i < msg.payload.length; i++){\n    if (msg.payload[i].countryRegion == land ){\n        land = i\n        break\n    }\n}        \n\nvar anzahl = msg.payload[land].recovered\n\nmsg.payload = anzahl\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 700,
        "y": 620,
        "wires": [
            [
                "76728699.1a9478"
            ]
        ]
    },
    {
        "id": "9a7db4b9.81f32",
        "type": "ui_group",
        "z": "",
        "name": "Covid-19 in Deutschland",
        "tab": "9f205757.68494",
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "9f205757.68494",
        "type": "ui_tab",
        "z": "",
        "name": "wenzlaff.de",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

Corona Dashboard mit NodeRed erstellen

Ähnliche Artikel:

  1. Covid-19 NodeRED Ticker an Pushover und Twitter – update
  2. Covid-19 Live-Ticker für Deutschland mit Raspberry Pi und Node-RED via Twitter
  3. Wie können live Covid-19 Daten per Node-RED an Twitter und Pushover gesendet werden?

wallpaper-1019588
A Nobody’s Way Up to an Exploration Hero: Anime erscheint als Doppelfolge
wallpaper-1019588
[Manga] Nana & Kaoru [Max 9]
wallpaper-1019588
Reiseziele April
wallpaper-1019588
Dein Style-Guide: Finde deinen persönlichen Kleidungsstil