From 513d5dd17287ef93e0275db41663ae5e4829b2a5 Mon Sep 17 00:00:00 2001 From: io-debug <139538558+io-debug@users.noreply.github.com> Date: Tue, 17 Oct 2023 22:14:50 +0200 Subject: [PATCH] Develop (#38) * Set "_QUERY_SPARE_CAPACITY_TS=0", if res.status ==200 * Update DEVELOPER_DOCUMENTATION.md Added details, how to get and set peak shaving information --- DEVELOPER_DOCUMENTATION.md | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/DEVELOPER_DOCUMENTATION.md b/DEVELOPER_DOCUMENTATION.md index b5eb3bc..0039b9d 100644 --- a/DEVELOPER_DOCUMENTATION.md +++ b/DEVELOPER_DOCUMENTATION.md @@ -1035,3 +1035,55 @@ Information represented by the V_STECA-Object: |percent#v|0.0|| |percent#vf|0.0||| |percent#f|0||| + +## Web API +The following Information can be accessed via the Web-API (mein-senec.de). + +### Peak Shaving + +#### Read/Get Information +When logged in, call the following URL via GET: ```https://mein-senec.de/endkunde/api/peakshaving/getSettings?anlageNummer=0``` + +_Response_ + +```JSON + +{ + "einspeisebegrenzungKwpInPercent": 100, #export limit in kwh in percent + "peakShavingMode": "DEACTIVATED", #Current mode DEACTIVATED, MANUAL, AUTO + "peakShavingCapacityLimitInPercent": 0, #Battery capacity limit in percent + "peakShavingLocalEndTime": [ + 0, + 0 + ], + "bearbeitungsdatum": 1665062808000, + "bearbeiter": { + "id": 111111, + "geloescht": false, + "userRole": "STUB", + "aktiv": false + }, + "valid": true, + "peakShavingEndDate": 1696723200000 #END time of peak shaving +} +``` + +#### URL to set Settings +To set the changed configuration call ("GET") the following URL and set the respective query string parameter: +```https://mein-senec.de/endkunde/api/peakshaving/saveSettings?anlageNummer=0&mode=AUTO&capacityLimit=0&endzeit=1697414400000``` + + +#### Definition of variables + +##### Mode ("peakShavingMode" in response to read the current data, "mode" in request to save changes) +- Deactivated = no peak shaving, only dynamic export limit. Defined as "DEACTIVATED" in get and save Settings +- Manual = manual peak shaving parameter assignment. Defined as "MANUAL" in get and save Settings +- Automatic = forecast-based peak shaving parameter assignment (BETA). Defined as "AUTO" in get and save Settings + +##### Capacity limit ("peakShavingCapacityLimitInPercent" in response to read the current data,"capacityLimit" in request to save changes) +- Temporarily limits the capacity of the battery storage, so that the remaining capacity can be used for potential losses due to the export limit. + +##### End ("peakShavingEndDate" in response to read the current data, "endzeit" in request to save changes) +- Time of the day on which the capacity limitation should switch off again. + +