]> git.basschouten.com Git - openhab-addons.git/blob
25816f8b8c71fd77a810d87d3134195b7b3ff5d3
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.senechome.internal.json;
14
15 import java.io.Serializable;
16 import java.util.Arrays;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * Json model of senec home devices: This sub model provides the current statistics by the inverter.
22  *
23  * Section "STATISTIC" in Senec JSON.
24  *
25  * @author Korbinian Probst - Initial Contribution
26  */
27 public class SenecHomeStatistics implements Serializable {
28
29     private static final long serialVersionUID = -1102310892637495823L;
30
31     /**
32      * total Wh charged to the battery (kWh)
33      */
34     public @SerializedName("LIVE_BAT_CHARGE") String liveBatCharge;
35
36     /**
37      * total Wh discharged from the battery (kWh)
38      */
39     public @SerializedName("LIVE_BAT_DISCHARGE") String liveBatDischarge;
40
41     /**
42      * total Wh imported from grid (kWh)
43      */
44     public @SerializedName("LIVE_GRID_IMPORT") String liveGridImport;
45
46     /**
47      * total Wh supplied to the grid (kWh)
48      */
49     public @SerializedName("LIVE_GRID_EXPORT") String liveGridExport;
50
51     /**
52      * Total house consumption (kWh)
53      */
54     public @SerializedName("LIVE_HOUSE_CONS") String liveHouseConsumption;
55
56     /**
57      * Total Wh produced (kWh)
58      */
59     public @SerializedName("LIVE_PV_GEN") String livePowerGenerator;
60
61     /**
62      * Total Wh provided to Wallbox (Wh)
63      */
64     public @SerializedName("LIVE_WB_ENERGY") String[] liveWallboxEnergy;
65
66     @Override
67     public String toString() {
68         return "SenecHomeStatistics [liveBatCharge=" + liveBatCharge + ", liveBatDischarge=" + liveBatDischarge
69                 + ", liveGridImport=" + liveGridImport + ", liveGridExport=" + liveGridExport
70                 + ", liveHouseConsumption=" + liveHouseConsumption + ", livePowerGen=" + livePowerGenerator
71                 + ", liveWallboxEnergy=" + Arrays.toString(liveWallboxEnergy) + "]";
72     }
73 }