Micro Grid Inverter Envertech integration

You need to search for stationId: no stationID: this is done in the web developer tools in the inspector tab… When you search for stationId then you will get a 32 Hex. Hope this helps

For those who have node-red installed on Home Assistant I wrote this flow which is way easier then a script:

[
    {
        "id": "90236b67.e1466",
        "type": "inject",
        "z": "692a85b207f3c084",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "*/15 8-21 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 310,
        "y": 160,
        "wires": [
            [
                "413272a1.c40e84"
            ]
        ]
    },
    {
        "id": "413272a1.c40e84",
        "type": "http request",
        "z": "692a85b207f3c084",
        "name": "Envertech",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "https://www.envertecportal.com/ApiStations/getStationInfo?stationId=IMPORTANT ADD 32 DIGIT ID HERE",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "credentials": {
            "user": "",
            "password": ""
        },
        "x": 480,
        "y": 160,
        "wires": [
            [
                "855b5f6.0b7092"
            ]
        ]
    },
    {
        "id": "855b5f6.0b7092",
        "type": "json",
        "z": "692a85b207f3c084",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 290,
        "y": 240,
        "wires": [
            [
                "ffe8e97f.8cf26",
                "7566c765e37a9b59"
            ]
        ]
    },
    {
        "id": "ffe8e97f.8cf26",
        "type": "ha-entity",
        "z": "692a85b207f3c084",
        "name": "CurrentPower",
        "server": "cbb458bc.e8ad88",
        "version": 1,
        "debugenabled": true,
        "outputs": 1,
        "entityType": "sensor",
        "config": [
            {
                "property": "name",
                "value": "solar.currentpower"
            },
            {
                "property": "device_class",
                "value": ""
            },
            {
                "property": "icon",
                "value": "mdi:solar-panel"
            },
            {
                "property": "unit_of_measurement",
                "value": "W"
            }
        ],
        "state": "payload.Data.Power",
        "stateType": "msg",
        "attributes": [],
        "resend": true,
        "outputLocation": "",
        "outputLocationType": "none",
        "inputOverride": "allow",
        "outputOnStateChange": false,
        "outputPayload": "$entity().state ? \"on\": \"off\"",
        "outputPayloadType": "jsonata",
        "x": 460,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "7566c765e37a9b59",
        "type": "function",
        "z": "692a85b207f3c084",
        "name": "",
        "func": "var payload=msg.payload.Data.UnitETotal;\nmsg.payload=parseFloat(payload.substring(0, payload.length - 4));\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 320,
        "wires": [
            [
                "c8d65c0d.51b59"
            ]
        ]
    },
    {
        "id": "c8d65c0d.51b59",
        "type": "ha-entity",
        "z": "692a85b207f3c084",
        "name": "solarPower",
        "server": "cbb458bc.e8ad88",
        "version": 1,
        "debugenabled": true,
        "outputs": 1,
        "entityType": "sensor",
        "config": [
            {
                "property": "name",
                "value": "solarPower"
            },
            {
                "property": "device_class",
                "value": "energy"
            },
            {
                "property": "icon",
                "value": "mdi:solar-panel"
            },
            {
                "property": "unit_of_measurement",
                "value": "kWh"
            }
        ],
        "state": "payload",
        "stateType": "msg",
        "attributes": [
            {
                "property": "state_class",
                "value": "measurement",
                "valueType": "str"
            },
            {
                "property": "last_reset",
                "value": "2020-05-13T22:00:00+00:00",
                "valueType": "str"
            }
        ],
        "resend": true,
        "outputLocation": "",
        "outputLocationType": "none",
        "inputOverride": "allow",
        "outputOnStateChange": false,
        "outputPayload": "$entity().state ? \"on\": \"off\"",
        "outputPayloadType": "jsonata",
        "x": 450,
        "y": 320,
        "wires": [
            []
        ]
    }
]
1 Like