]> git.basschouten.com Git - openhab-addons.git/commitdiff
[semsportal] Fix lastUpdate parse format to accept the format provided by the inverte...
authorJulio Vilmar Gesser <jgesser@gmail.com>
Sun, 22 Aug 2021 10:02:10 +0000 (07:02 -0300)
committerGitHub <noreply@github.com>
Sun, 22 Aug 2021 10:02:10 +0000 (12:02 +0200)
* Fixed lastUpdate date formating

Signed-off-by: Julio Gesser <jgesser@gmail.com>
bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/PortalHandler.java
bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/SEMSPortalBindingConstants.java
bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/dto/InverterDetails.java
bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/dto/StationInfo.java [new file with mode: 0644]
bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/dto/StationStatus.java
bundles/org.openhab.binding.semsportal/src/test/java/org/openhab/binding/semsportal/internal/SEMSJsonParserTest.java
bundles/org.openhab.binding.semsportal/src/test/resources/success_status_br.json [new file with mode: 0644]

index e51c96be046d47976bed7d40f63d2110449ac7db..ee857d10d68bf3fe5f705b175bd044fe4b286d5f 100644 (file)
@@ -85,7 +85,7 @@ public class PortalHandler extends BaseBridgeHandler {
     public PortalHandler(Bridge bridge, HttpClientFactory httpClientFactory) {
         super(bridge);
         httpClient = httpClientFactory.getCommonHttpClient();
-        gson = new GsonBuilder().setDateFormat(SEMSPortalBindingConstants.DATE_FORMAT).create();
+        gson = new GsonBuilder().create();
     }
 
     @Override
index d1170e507640bf6f86994b7580f4b9d1dfccc55d..2af117028a125670f2a2748eba0e1f5b78c8edab 100644 (file)
@@ -28,7 +28,7 @@ import org.openhab.core.thing.ThingTypeUID;
 public class SEMSPortalBindingConstants {
 
     private static final String BINDING_ID = "semsportal";
-    static final String DATE_FORMAT = "MM.dd.yyyy HH:mm:ss";
+    public static final String TIME_FORMAT = "HH:mm:ss";
 
     // List of all Thing Type UIDs
     public static final ThingTypeUID THING_TYPE_PORTAL = new ThingTypeUID(BINDING_ID, "portal");
index 3d2d128b02060e93b65192c1dd5857cbed9e89cb..49727404bf9ef62bdd16f20aaf7cc634a20f1c1a 100644 (file)
@@ -12,8 +12,6 @@
  */
 package org.openhab.binding.semsportal.internal.dto;
 
-import java.util.Date;
-
 import com.google.gson.annotations.SerializedName;
 
 /**
@@ -23,9 +21,9 @@ import com.google.gson.annotations.SerializedName;
  */
 public class InverterDetails {
     @SerializedName("last_refresh_time")
-    private Date lastUpdate;
+    private String lastUpdate;
 
-    public Date getLastUpdate() {
+    public String getLastUpdate() {
         return lastUpdate;
     }
 }
diff --git a/bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/dto/StationInfo.java b/bundles/org.openhab.binding.semsportal/src/main/java/org/openhab/binding/semsportal/internal/dto/StationInfo.java
new file mode 100644 (file)
index 0000000..0f5b5ca
--- /dev/null
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2010-2021 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.semsportal.internal.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * POJO containing details about the inverter. Only a very small subset of the available properties is mapped.
+ * 
+ * @author Julio Gesser - Initial contribution
+ */
+public class StationInfo {
+
+    @SerializedName("date_format")
+    private String dateFormat;
+
+    public String getDateFormat() {
+        return dateFormat;
+    }
+}
index f3783598036a188b17f6e7caa780cedfab78a63a..18b75bfdeb3d0fb0abff8b4ec115cc8f7ccc9a7f 100644 (file)
  */
 package org.openhab.binding.semsportal.internal.dto;
 
+import java.time.Instant;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
 import java.util.List;
 
+import org.openhab.binding.semsportal.internal.SEMSPortalBindingConstants;
+
 import com.google.gson.annotations.SerializedName;
 
 /**
@@ -29,6 +34,8 @@ public class StationStatus {
     private KeyPerformanceIndicators keyPerformanceIndicators;
     @SerializedName("inverter")
     private List<Station> stations;
+    @SerializedName("info")
+    private StationInfo info;
 
     public Double getCurrentOutput() {
         return keyPerformanceIndicators.getCurrentOutput();
@@ -62,7 +69,10 @@ public class StationStatus {
         if (stations.isEmpty()) {
             return null;
         }
-        return ZonedDateTime.ofInstant(stations.get(0).getDetails().getLastUpdate().toInstant(),
-                ZoneId.systemDefault());
+        DateTimeFormatter formatter = new DateTimeFormatterBuilder().appendPattern(info.getDateFormat())
+                .appendLiteral(" ").appendPattern(SEMSPortalBindingConstants.TIME_FORMAT).toFormatter()
+                .withZone(ZoneId.systemDefault());
+        Instant instant = formatter.parse(stations.get(0).getDetails().getLastUpdate(), Instant::from);
+        return ZonedDateTime.ofInstant(instant, ZoneId.systemDefault());
     }
 }
index b9eaa2756571d43e3b7a5ce565f4dac30300c589..6cd3ae8090ba937fa8d901dcaff10c8d5f667f31 100644 (file)
@@ -21,6 +21,8 @@ import java.time.ZonedDateTime;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
 import org.openhab.binding.semsportal.internal.dto.BaseResponse;
 import org.openhab.binding.semsportal.internal.dto.LoginResponse;
 import org.openhab.binding.semsportal.internal.dto.StationListResponse;
@@ -34,9 +36,11 @@ import com.google.gson.GsonBuilder;
  */
 @NonNullByDefault
 public class SEMSJsonParserTest {
-    @Test
-    public void testParseSuccessStatusResult() throws Exception {
-        String json = Files.readString(Paths.get("src/test/resources/success_status.json"));
+
+    @ParameterizedTest
+    @ValueSource(strings = { "success_status.json", "success_status_br.json" })
+    public void testParseSuccessStatusResult(String resourceName) throws Exception {
+        String json = Files.readString(Paths.get("src/test/resources/" + resourceName));
         StatusResponse response = getGson().fromJson(json, StatusResponse.class);
         assertNotNull(response, "Expected deserialized StatusResponse");
         if (response != null) {// response cannot be null, was asserted before, but code check produces a warning
@@ -99,6 +103,6 @@ public class SEMSJsonParserTest {
     }
 
     private Gson getGson() {
-        return new GsonBuilder().setDateFormat(SEMSPortalBindingConstants.DATE_FORMAT).create();
+        return new GsonBuilder().create();
     }
 }
diff --git a/bundles/org.openhab.binding.semsportal/src/test/resources/success_status_br.json b/bundles/org.openhab.binding.semsportal/src/test/resources/success_status_br.json
new file mode 100644 (file)
index 0000000..bd51e22
--- /dev/null
@@ -0,0 +1,941 @@
+{
+  "language": "en",
+  "function": [
+    "ADD",
+    "VIEW",
+    "EDIT",
+    "DELETE",
+    "INVERTER_A",
+    "INVERTER_E",
+    "INVERTER_D"
+  ],
+  "hasError": false,
+  "msg": "success",
+  "code": "0",
+  "data": {
+    "info": {
+      "powerstation_id": "RANDOM_UUID",
+      "time": "02/06/2021 11:24:41",
+      "date_format": "dd/MM/yyyy",
+      "date_format_ym": "MM/yyyy",
+      "stationname": "Home",
+      "address": "Somewhere",
+      "owner_name": null,
+      "owner_phone": null,
+      "owner_email": "some@mailaddress.com",
+      "battery_capacity": 0.0,
+      "turnon_time": "04/06/2020 18:19:40",
+      "create_time": "04/06/2020 18:18:32",
+      "capacity": 7.8,
+      "longitude": 16,
+      "latitude": 23,
+      "powerstation_type": "Residential",
+      "status": 1,
+      "is_stored": false,
+      "is_powerflow": false,
+      "charts_type": 4,
+      "has_pv": true,
+      "has_statistics_charts": false,
+      "only_bps": false,
+      "only_bpu": false,
+      "time_span": -1.0,
+      "pr_value": ""
+    },
+    "kpi": {
+      "month_generation": 17.7,
+      "pac": 381.0,
+      "power": 0.5,
+      "total_power": 7379.0,
+      "day_income": 0.11,
+      "total_income": 823.38,
+      "yield_rate": 0.12,
+      "currency": "EUR"
+    },
+    "images": [],
+    "weather": {
+      "HeWeather6": [
+        {
+          "daily_forecast": [
+            {
+              "cond_code_d": "407",
+              "cond_code_n": "499",
+              "cond_txt_d": "Snow Flurry",
+              "cond_txt_n": "Snow",
+              "date": "2021-02-06",
+              "time": "2021-02-06 00:00:00",
+              "hum": "79",
+              "pcpn": "0.2",
+              "pop": "49",
+              "pres": "1011",
+              "tmp_max": "0",
+              "tmp_min": "-5",
+              "uv_index": "0",
+              "vis": "6",
+              "wind_deg": "84",
+              "wind_dir": "E",
+              "wind_sc": "4-5",
+              "wind_spd": "34"
+            },
+            {
+              "cond_code_d": "499",
+              "cond_code_n": "499",
+              "cond_txt_d": "Snow",
+              "cond_txt_n": "Snow",
+              "date": "2021-02-07",
+              "time": "2021-02-07 00:00:00",
+              "hum": "93",
+              "pcpn": "7.2",
+              "pop": "82",
+              "pres": "1006",
+              "tmp_max": "-3",
+              "tmp_min": "-6",
+              "uv_index": "0",
+              "vis": "1",
+              "wind_deg": "70",
+              "wind_dir": "NE",
+              "wind_sc": "6-7",
+              "wind_spd": "46"
+            },
+            {
+              "cond_code_d": "499",
+              "cond_code_n": "101",
+              "cond_txt_d": "Snow",
+              "cond_txt_n": "Cloudy",
+              "date": "2021-02-08",
+              "time": "2021-02-08 00:00:00",
+              "hum": "94",
+              "pcpn": "1.1",
+              "pop": "55",
+              "pres": "1005",
+              "tmp_max": "-3",
+              "tmp_min": "-7",
+              "uv_index": "0",
+              "vis": "1",
+              "wind_deg": "84",
+              "wind_dir": "E",
+              "wind_sc": "3-4",
+              "wind_spd": "20"
+            },
+            {
+              "cond_code_d": "901",
+              "cond_code_n": "901",
+              "cond_txt_d": "Cold",
+              "cond_txt_n": "Cold",
+              "date": "2021-02-09",
+              "time": "2021-02-09 00:00:00",
+              "hum": "92",
+              "pcpn": "0.0",
+              "pop": "25",
+              "pres": "1009",
+              "tmp_max": "-4",
+              "tmp_min": "-9",
+              "uv_index": "1",
+              "vis": "24",
+              "wind_deg": "85",
+              "wind_dir": "E",
+              "wind_sc": "3-4",
+              "wind_spd": "18"
+            },
+            {
+              "cond_code_d": "901",
+              "cond_code_n": "103",
+              "cond_txt_d": "Cold",
+              "cond_txt_n": "Partly Cloudy",
+              "date": "2021-02-10",
+              "time": "2021-02-10 00:00:00",
+              "hum": "90",
+              "pcpn": "0.0",
+              "pop": "12",
+              "pres": "1019",
+              "tmp_max": "-3",
+              "tmp_min": "-7",
+              "uv_index": "1",
+              "vis": "25",
+              "wind_deg": "67",
+              "wind_dir": "NE",
+              "wind_sc": "3-4",
+              "wind_spd": "14"
+            },
+            {
+              "cond_code_d": "103",
+              "cond_code_n": "101",
+              "cond_txt_d": "Partly Cloudy",
+              "cond_txt_n": "Cloudy",
+              "date": "2021-02-11",
+              "time": "2021-02-11 00:00:00",
+              "hum": "93",
+              "pcpn": "0.0",
+              "pop": "8",
+              "pres": "1018",
+              "tmp_max": "-1",
+              "tmp_min": "-7",
+              "uv_index": "2",
+              "vis": "6",
+              "wind_deg": "187",
+              "wind_dir": "S",
+              "wind_sc": "1-2",
+              "wind_spd": "11"
+            },
+            {
+              "cond_code_d": "999",
+              "cond_code_n": "999",
+              "cond_txt_d": "-",
+              "cond_txt_n": "-",
+              "date": "2021-02-12",
+              "time": "2021-02-12 00:00:00",
+              "hum": "-",
+              "pcpn": "-",
+              "pop": "-",
+              "pres": "-",
+              "tmp_max": "-",
+              "tmp_min": "-",
+              "uv_index": "-",
+              "vis": "-",
+              "wind_deg": "-",
+              "wind_dir": "--",
+              "wind_sc": "--",
+              "wind_spd": "-"
+            }
+          ],
+          "basic": {
+            "cid": "NL2755251",
+            "location": "SomeCity",
+            "cnty": "SomeCountry",
+            "lat": "13",
+            "lon": "26",
+            "tz": "+5.00"
+          },
+          "update": {
+            "loc": "2021-02-05 23:56:00",
+            "utc": "2021-02-05 22:56:00"
+          },
+          "status": "ok"
+        }
+      ]
+    },
+    "inverter": [
+      {
+        "sn": "56000222200W0000",
+        "dict": {
+          "left": [
+            {
+              "isHT": false,
+              "key": "dmDeviceType",
+              "value": "GW6000-DT",
+              "unit": "",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "serialNum",
+              "value": "5600000000000000",
+              "unit": "",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "laCheckcode",
+              "value": "026848",
+              "unit": "",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "capacity",
+              "value": "6",
+              "unit": "kW",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "laConnected",
+              "value": "04.06.2020 18:19:40",
+              "unit": "",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "InverterPowerOfPlantMonitor",
+              "value": "0.381",
+              "unit": "kW",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "outputV",
+              "value": "233.1/233.5/228.7",
+              "unit": "V",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "acCurrent",
+              "value": "0.5/0.4/0.5",
+              "unit": "A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "acFrequency",
+              "value": "50.00/50.00/50.00",
+              "unit": "Hz",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            }
+          ],
+          "right": [
+            {
+              "isHT": false,
+              "key": "innerTemp",
+              "value": "32.6",
+              "unit": "℃",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "dcVandC1",
+              "value": "720.4/0.4",
+              "unit": "V/A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "dcVandC2",
+              "value": "0.0/0.0",
+              "unit": "V/A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "dcVandC3",
+              "value": "--",
+              "unit": "V/A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "dcVandC4",
+              "value": "--",
+              "unit": "V/A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "strCurrent1",
+              "value": "--",
+              "unit": "A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "strCurrent2",
+              "value": "--",
+              "unit": "A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "strCurrent3",
+              "value": "--",
+              "unit": "A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            },
+            {
+              "isHT": false,
+              "key": "strCurrent4",
+              "value": "--",
+              "unit": "A",
+              "isFaultMsg": 0,
+              "faultMsgCode": 0
+            }
+          ]
+        },
+        "is_stored": false,
+        "name": "home",
+        "in_pac": 6554.3,
+        "out_pac": 381.0,
+        "eday": 0.5,
+        "emonth": 17.2,
+        "etotal": 7379.0,
+        "status": 1,
+        "turnon_time": "04/06/2020 18:19:40",
+        "releation_id": "5600000000000000",
+        "type": "GW6000-DT",
+        "capacity": 6.0,
+        "d": {
+          "pw_id": "5600000000000000",
+          "capacity": "6kW",
+          "model": "GW6000-DT",
+          "output_power": "381W",
+          "output_current": "0.5A",
+          "grid_voltage": "233.1V",
+          "backup_output": "4294967.295V/0W",
+          "soc": "400%",
+          "soh": "0%",
+          "last_refresh_time": "06/02/2021 11:22:48",
+          "work_mode": "Wait Mode",
+          "dc_input1": "720.4V/0.4A",
+          "dc_input2": "0V/0A",
+          "battery": "65535V/6553.5A/429483622W",
+          "bms_status": "DischargingOfBattery",
+          "warning": "Over Temperature/Under Temperature/Cell Voltage Differences/Over Total Voltage/Discharge Over Current/Charge Over Current/Under SOC/Under Total Voltage/Communication Fail/Output Short/SOC Too High/BMS Module Fault/BMS System Fault/BMS Internal Fault/TBD/TBD",
+          "charge_current_limit": "1A",
+          "discharge_current_limit": "0A",
+          "firmware_version": 181809.0,
+          "creationDate": "02/06/2021 18:22:48",
+          "eDay": 0.5,
+          "eTotal": 7379.0,
+          "pac": 381.0,
+          "hTotal": 5132.0,
+          "vpv1": 720.4,
+          "vpv2": 0.0,
+          "vpv3": 6553.5,
+          "vpv4": 6553.5,
+          "ipv1": 0.4,
+          "ipv2": 0.0,
+          "ipv3": 6553.5,
+          "ipv4": 6553.5,
+          "vac1": 233.1,
+          "vac2": 233.5,
+          "vac3": 228.7,
+          "iac1": 0.5,
+          "iac2": 0.4,
+          "iac3": 0.5,
+          "fac1": 50.0,
+          "fac2": 50.0,
+          "fac3": 50.0,
+          "istr1": 0.0,
+          "istr2": 0.0,
+          "istr3": 0.0,
+          "istr4": 0.0,
+          "istr5": 0.0,
+          "istr6": 0.0,
+          "istr7": 0.0,
+          "istr8": 0.0,
+          "istr9": 0.0,
+          "istr10": 0.0,
+          "istr11": 0.0,
+          "istr12": 0.0,
+          "istr13": 0.0,
+          "istr14": 0.0,
+          "istr15": 0.0,
+          "istr16": 0.0
+        },
+        "it_change_flag": false,
+        "tempperature": 32.6,
+        "check_code": "026848",
+        "next": null,
+        "prev": null,
+        "next_device": {
+          "sn": null,
+          "isStored": false
+        },
+        "prev_device": {
+          "sn": null,
+          "isStored": false
+        },
+        "invert_full": {
+          "sn": "5600000000000000",
+          "powerstation_id": "5600000000000000",
+          "name": "home",
+          "model_type": "GW6000-DT",
+          "change_type": 0,
+          "change_time": 0,
+          "capacity": 6.0,
+          "eday": 0.5,
+          "iday": 0.11,
+          "etotal": 7379.0,
+          "itotal": 1623.38,
+          "hour_total": 5132.0,
+          "status": 1,
+          "turnon_time": 1586168380200,
+          "pac": 381.0,
+          "tempperature": 32.6,
+          "vpv1": 720.4,
+          "vpv2": 0.0,
+          "vpv3": 6553.5,
+          "vpv4": 6553.5,
+          "ipv1": 0.4,
+          "ipv2": 0.0,
+          "ipv3": 6553.5,
+          "ipv4": 6553.5,
+          "vac1": 233.1,
+          "vac2": 233.5,
+          "vac3": 228.7,
+          "iac1": 0.5,
+          "iac2": 0.4,
+          "iac3": 0.5,
+          "fac1": 50.0,
+          "fac2": 50.0,
+          "fac3": 50.0,
+          "istr1": 0.0,
+          "istr2": 0.0,
+          "istr3": 0.0,
+          "istr4": 0.0,
+          "istr5": 0.0,
+          "istr6": 0.0,
+          "istr7": 0.0,
+          "istr8": 0.0,
+          "istr9": 0.0,
+          "istr10": 0.0,
+          "istr11": 0.0,
+          "istr12": 0.0,
+          "istr13": 0.0,
+          "istr14": 0.0,
+          "istr15": 0.0,
+          "istr16": 0.0,
+          "last_time": 1612606968847,
+          "vbattery1": 65535.0,
+          "ibattery1": 6553.5,
+          "pmeter": 381.0,
+          "soc": 400.0,
+          "soh": -0.100000000000364,
+          "bms_discharge_i_max": null,
+          "bms_charge_i_max": 1.0,
+          "bms_warning": 0,
+          "bms_alarm": 65535,
+          "battary_work_mode": 2,
+          "workmode": 1,
+          "vload": 4294967.295,
+          "iload": 4294901.76,
+          "firmwareversion": 1818.0,
+          "pbackup": 0.0,
+          "seller": 0.0,
+          "buy": 0.0,
+          "yesterdaybuytotal": null,
+          "yesterdaysellertotal": null,
+          "yesterdayct2sellertotal": null,
+          "yesterdayetotal": null,
+          "yesterdayetotalload": null,
+          "thismonthetotle": 17.2,
+          "lastmonthetotle": 7361.3,
+          "ram": 9.0,
+          "outputpower": 381.0,
+          "fault_messge": 0,
+          "isbuettey": false,
+          "isbuetteybps": false,
+          "isbuetteybpu": false,
+          "isESUOREMU": false,
+          "backUpPload_S": 0.0,
+          "backUpVload_S": 0.0,
+          "backUpIload_S": 0.0,
+          "backUpPload_T": 0.0,
+          "backUpVload_T": 0.0,
+          "backUpIload_T": 0.0,
+          "eTotalBuy": null,
+          "eDayBuy": null,
+          "eBatteryCharge": null,
+          "eChargeDay": null,
+          "eBatteryDischarge": null,
+          "eDischargeDay": null,
+          "battStrings": 6553.5,
+          "meterConnectStatus": null,
+          "mtActivepowerR": 0.0,
+          "mtActivepowerS": 0.0,
+          "mtActivepowerT": 0.0,
+          "ezPro_connect_status": null,
+          "dataloggersn": "",
+          "equipment_name": null,
+          "hasmeter": false,
+          "meter_type": null,
+          "pre_hour_lasttotal": null,
+          "pre_hour_time": null,
+          "current_hour_pv": 0.0,
+          "extend_properties": null,
+          "eP_connect_status_happen": null,
+          "eP_connect_status_recover": null
+        },
+        "time": "02/06/2021 11:24:41",
+        "battery": "65535V/6553.5A/429483622W",
+        "firmware_version": 181809.0,
+        "warning_bms": "Over Temperature/Under Temperature/Cell Voltage Differences/Over Total Voltage/Discharge Over Current/Charge Over Current/Under SOC/Under Total Voltage/Communication Fail/Output Short/SOC Too High/BMS Module Fault/BMS System Fault/BMS Internal Fault/TBD/TBD",
+        "soh": "0%",
+        "discharge_current_limit_bms": "0A",
+        "charge_current_limit_bms": "1A",
+        "soc": "400%",
+        "pv_input_2": "0V/0A",
+        "pv_input_1": "720.4V/0.4A",
+        "back_up_output": "4294967.295V/0W",
+        "output_voltage": "233.1V",
+        "backup_voltage": "4294967.295V",
+        "output_current": "0.5A",
+        "output_power": "381W",
+        "total_generation": "7379kWh",
+        "daily_generation": "0.5kWh",
+        "battery_charging": "65535V/6553.5A/429483622W",
+        "last_refresh_time": "02/06/2021 11:22:48",
+        "bms_status": "DischargingOfBattery",
+        "pw_id": "0000000-0000-0000-00000000",
+        "fault_message": "",
+        "battery_power": 429483622.5,
+        "point_index": "3",
+        "points": [
+          {
+            "target_index": 1,
+            "target_name": "Vpv1",
+            "display": "Vpv1(V)",
+            "unit": "V",
+            "target_key": "Vpv1",
+            "text_cn": "直流电压1",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 2,
+            "target_name": "Vpv2",
+            "display": "Vpv2(V)",
+            "unit": "V",
+            "target_key": "Vpv2",
+            "text_cn": "直流电压2",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 5,
+            "target_name": "Ipv1",
+            "display": "Ipv1(A)",
+            "unit": "A",
+            "target_key": "Ipv1",
+            "text_cn": "直流电流1",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 6,
+            "target_name": "Ipv2",
+            "display": "Ipv2(A)",
+            "unit": "A",
+            "target_key": "Ipv2",
+            "text_cn": "直流电流2",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 9,
+            "target_name": "Vac1",
+            "display": "Vac1(V)",
+            "unit": "V",
+            "target_key": "Vac1",
+            "text_cn": "交流电压1",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 10,
+            "target_name": "Vac2",
+            "display": "Vac2(V)",
+            "unit": "V",
+            "target_key": "Vac2",
+            "text_cn": "交流电压2",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 11,
+            "target_name": "Vac3",
+            "display": "Vac3(V)",
+            "unit": "V",
+            "target_key": "Vac3",
+            "text_cn": "交流电压3",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 12,
+            "target_name": "Iac1",
+            "display": "Iac1(A)",
+            "unit": "A",
+            "target_key": "Iac1",
+            "text_cn": "交流电流1",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 13,
+            "target_name": "Iac2",
+            "display": "Iac2(A)",
+            "unit": "A",
+            "target_key": "Iac2",
+            "text_cn": "交流电流2",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 14,
+            "target_name": "Iac3",
+            "display": "Iac3(A)",
+            "unit": "A",
+            "target_key": "Iac3",
+            "text_cn": "交流电流3",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 15,
+            "target_name": "Fac1",
+            "display": "Fac1(Hz)",
+            "unit": "Hz",
+            "target_key": "Fac1",
+            "text_cn": "频率1",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 16,
+            "target_name": "Fac2",
+            "display": "Fac2(Hz)",
+            "unit": "Hz",
+            "target_key": "Fac2",
+            "text_cn": "频率2",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 17,
+            "target_name": "Fac3",
+            "display": "Fac3(Hz)",
+            "unit": "Hz",
+            "target_key": "Fac3",
+            "text_cn": "频率3",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 18,
+            "target_name": "Pac",
+            "display": "Pac(W)",
+            "unit": "W",
+            "target_key": "Pac",
+            "text_cn": "功率",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 19,
+            "target_name": "WorkMode",
+            "display": "WorkMode()",
+            "unit": "",
+            "target_key": "WorkMode",
+            "text_cn": "工作模式",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 20,
+            "target_name": "Temperature",
+            "display": "Temperature(℃)",
+            "unit": "℃",
+            "target_key": "Tempperature",
+            "text_cn": "温度",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 21,
+            "target_name": "Daily Generation",
+            "display": "Daily Generation(kWh)",
+            "unit": "kWh",
+            "target_key": "EDay",
+            "text_cn": "日发电量",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 22,
+            "target_name": "Total Generation",
+            "display": "Total Generation(kWh)",
+            "unit": "kWh",
+            "target_key": "ETotal",
+            "text_cn": "总发电量",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 23,
+            "target_name": "HTotal",
+            "display": "HTotal(h)",
+            "unit": "h",
+            "target_key": "HTotal",
+            "text_cn": "工作时长",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          },
+          {
+            "target_index": 36,
+            "target_name": "RSSI",
+            "display": "RSSI(%)",
+            "unit": "%",
+            "target_key": "Reserved5",
+            "text_cn": "GPRS信号强度",
+            "target_sn_six": null,
+            "target_sn_seven": null,
+            "target_type": null,
+            "storage_name": null
+          }
+        ],
+        "backup_pload_s": 0.0,
+        "backup_vload_s": 0.0,
+        "backup_iload_s": 0.0,
+        "backup_pload_t": 0.0,
+        "backup_vload_t": 0.0,
+        "backup_iload_t": 0.0,
+        "etotal_buy": null,
+        "eday_buy": null,
+        "ebattery_charge": null,
+        "echarge_day": null,
+        "ebattery_discharge": null,
+        "edischarge_day": null,
+        "batt_strings": 6553.5,
+        "meter_connect_status": null,
+        "mtactivepower_r": 0.0,
+        "mtactivepower_s": 0.0,
+        "mtactivepower_t": 0.0,
+        "has_tigo": false,
+        "canStartIV": false
+      }
+    ],
+    "hjgx": {
+      "co2": 7.3568630000000006,
+      "tree": 403.26234999999997,
+      "coal": 2.981116
+    },
+    "pre_powerstation_id": null,
+    "nex_powerstation_id": null,
+    "homKit": {
+      "homeKitLimit": false,
+      "sn": null
+    },
+    "isTigo": false,
+    "smuggleInfo": {
+      "isAllSmuggle": false,
+      "isSmuggle": false,
+      "descriptionText": null,
+      "sns": null
+    },
+    "hasPowerflow": false,
+    "powerflow": null,
+    "hasEnergeStatisticsCharts": false,
+    "energeStatisticsCharts": {
+      "contributingRate": 1.0,
+      "selfUseRate": 1.0,
+      "sum": 0.5,
+      "buy": 0.0,
+      "buyPercent": 0.0,
+      "sell": 0.0,
+      "sellPercent": 0.0,
+      "selfUseOfPv": 0.5,
+      "consumptionOfLoad": 0.5,
+      "chartsType": 4,
+      "hasPv": true,
+      "hasCharge": false,
+      "charge": 0.0,
+      "disCharge": 0.0
+    },
+    "energeStatisticsTotals": {
+      "contributingRate": 1.0,
+      "selfUseRate": 1.0,
+      "sum": 157.2,
+      "buy": 0.0,
+      "buyPercent": 0.0,
+      "sell": 0.0,
+      "sellPercent": 0.0,
+      "selfUseOfPv": 157.2,
+      "consumptionOfLoad": 157.2,
+      "chartsType": 4,
+      "hasPv": true,
+      "hasCharge": false,
+      "charge": 0.0,
+      "disCharge": 0.0
+    },
+    "soc": {
+      "power": 0,
+      "status": -1
+    },
+    "environmental": [],
+    "equipment": [
+      {
+        "type": "5",
+        "title": "home",
+        "status": 1,
+        "statusText": null,
+        "capacity": null,
+        "actionThreshold": null,
+        "subordinateEquipment": "",
+        "powerGeneration": "Power:0.381(kW)",
+        "eday": "Today Generation: 0.5(kWh)",
+        "brand": "",
+        "isStored": false,
+        "soc": "SOC:400%",
+        "isChange": false,
+        "relationId": "0000000-0000-0000-00000000",
+        "sn": "5600000000000000",
+        "has_tigo": false,
+        "is_sec": false,
+        "is_secs": false,
+        "targetPF": null,
+        "exportPowerlimit": null
+      }
+    ]
+  },
+  "components": {
+    "para": "{\"model\":{\"PowerStationId\":\"0000000-0000-0000-00000000\"}}",
+    "langVer": 97,
+    "timeSpan": 177,
+    "api": "http://www.semsportal.com:82/api/v2/PowerStation/GetMonitorDetailByPowerstationId",
+    "msgSocketAdr": null
+  }
+}
\ No newline at end of file