www.envertertecportal.com V2 – Daten auslesen

Hier die neuen URLs und Curl Befehle zum auslesen der Daten einer Solar Anlage vom Envertec Portal.

Login URL um das Cookie zu bekommen (Email und Passwort sind entsprechend anzupassen)

1  http://www.envertecportal.com/apiaccount/login?username=[EMAIL]&pwd=[PASSWORD]

Login mit CURL (Email und Passwort sind entsprechend anzupassen)

1  curl --silent --cookie-jar /tmp/cookies -o /dev/null -X POST -H "Content-Type: application/json" -X "Content-Length: 1000" http://www.envertecportal.com/apiaccount/login?username=[EMAIL]&pwd=[PASSWORD]

Daten der Anlage (ID muss durch die eigene Stations ID ersetzt werden)

1  http://www.envertecportal.com/ApiStations/getStationInfo?stationId=[ID]

Daten der Anlage mit CURL

1  curl --silent --cookie /tmp/cookies -X POST -d "" http://www.envertecportal.com/ApiStations/getStationInfo?stationId=[ID]

Ausgabe:

 1  {
 2    "Status": "0",
 3    "Result": null,
 4    "Data": {
 5        "UnitCapacity": "0.7 KWp",
 6        "UnitEToday": "1.21 W",
 7        "UnitEMonth": "7.73 KWh",
 8        "UnitEYear": "7.73 KWh",
 9        "UnitETotal": "714.7 KWh",
10        "Power": 469.88,
11        "PowerStr": "469.88 W",
12        "Capacity": 0.7,
13        "StrCO2": "0.713 ton",
14        "StrTrees": "1.952 trees",
15        "StrIncome": "€ 000.00",
16        "PwImg": "Default.jpg",
17        "StationName": "NAME",
18        "Lat": xx.xxxxxxx,
19        "Lng": xx.xxxxxxx,
20        "TimeZone": 1,
21        "StrPeakPower": "615.75 W",
22        "Installer": null,
23        "CreateTime": "21/10/2017 GMT +1",
24        "CreateYear": 2017,
25        "CreateMonth": 10,
26        "Etoday": 1.21,
27        "InvTotal": 3
28    }
29}

Am ID auslesen arbeite ich noch genauso wie an einer neuen Version meines Scripts. Leider dauert das etwas länger weil sich die Namen der Variablen geändert haben.