Solar Manager in Node-RED verwenden

Die API vom Solarmanager kann natürlich auch via Node-RED konsumiert werden. Hier ein kleines Bespiel dafür

Wenn du den Flow nicht selber machen willst kannst du den folgenden Code importieren:


[
    {
        "id": "29660baf1ea8883f",
        "type": "tab",
        "label": "Blog Demos (Solarmanager API)",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "fabcd8f46d92e5be",
        "type": "http request",
        "z": "29660baf1ea8883f",
        "name": "Montatstats",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "https://cloud.solar-manager.ch/v1/consumption/gateway/{{smId}}?period=month",
        "tls": "9e2506617d70d2bf",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "basic",
        "senderr": false,
        "headers": [],
        "x": 730,
        "y": 300,
        "wires": [
            [
                "0f7b9fb4164095eb"
            ]
        ]
    },
    {
        "id": "0f7b9fb4164095eb",
        "type": "json",
        "z": "29660baf1ea8883f",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 910,
        "y": 300,
        "wires": [
            [
                "382a7b26cbeb5c40"
            ]
        ]
    },
    {
        "id": "28914758fe2deedc",
        "type": "inject",
        "z": "29660baf1ea8883f",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 520,
        "y": 300,
        "wires": [
            [
                "fabcd8f46d92e5be"
            ]
        ]
    },
    {
        "id": "382a7b26cbeb5c40",
        "type": "debug",
        "z": "29660baf1ea8883f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1090,
        "y": 300,
        "wires": []
    },
    {
        "id": "9e2506617d70d2bf",
        "type": "tls-config",
        "name": "Accept-Untrusted-Certs",
        "cert": "",
        "key": "",
        "ca": "",
        "certname": "",
        "keyname": "",
        "caname": "",
        "servername": "",
        "verifyservercert": false,
        "alpnprotocol": ""
    }
]

Nach dem Importieren muss du noch die Anmeldedaten von deinem Solarmanager Login im http-request Node eingeben.

Weitere Infos

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.