2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.sonnen.internal.communication;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link SonnenJsonDataDTO} is the Java class used to map the JSON
19 * response to an Object.
21 * @author Christian Feininger - Initial contribution
23 public class SonnenJsonDataDTO {
24 @SerializedName("BatteryCharging")
25 boolean batteryCharging;
26 @SerializedName("BatteryDischarging")
27 boolean batteryDischarging;
28 @SerializedName("Consumption_W")
30 @SerializedName("GridFeedIn_W")
32 @SerializedName("Production_W")
34 @SerializedName("USOC")
35 int batteryChargingLevel;
36 @SerializedName("FlowConsumptionBattery")
37 boolean flowConsumptionBattery;
38 @SerializedName("FlowConsumptionGrid")
39 boolean flowConsumptionGrid;
40 @SerializedName("FlowConsumptionProduction")
41 boolean flowConsumptionProduction;
42 @SerializedName("FlowGridBattery")
43 boolean flowGridBattery;
44 @SerializedName("FlowProductionBattery")
45 boolean flowProductionBattery;
46 @SerializedName("FlowProductionGrid")
47 boolean flowProductionGrid;
48 @SerializedName("Pac_total_W")
52 * @return the batteryCurrent
54 public int getbatteryCurrent() {
55 return batteryCurrent;
59 * @return the batteryCharging
61 public boolean isBatteryCharging() {
62 return batteryCharging;
66 * @return the batteryDischarging
68 public boolean isBatteryDischarging() {
69 return batteryDischarging;
73 * @return the consumptionHouse
75 public int getConsumptionHouse() {
76 return consumptionHouse;
80 * @return the gridValue. Negative value indicates receiving from Grid. Positive value indicates feeding to Grid.
82 public int getGridValue() {
87 * @return the solarProduction
89 public int getSolarProduction() {
90 return solarProduction;
94 * @return the batteryChargingLevel
96 public int getBatteryChargingLevel() {
97 return batteryChargingLevel;
101 * @return the flowConsumptionBattery
103 public boolean isFlowConsumptionBattery() {
104 return flowConsumptionBattery;
108 * @return the flowConsumptionGrid
110 public boolean isFlowConsumptionGrid() {
111 return flowConsumptionGrid;
115 * @return the flowConsumptionProduction
117 public boolean isFlowConsumptionProduction() {
118 return flowConsumptionProduction;
122 * @return the flowGridBattery
124 public boolean isFlowGridBattery() {
125 return flowGridBattery;
129 * @return the flowProductionBattery
131 public boolean isFlowProductionBattery() {
132 return flowProductionBattery;
136 * @return the flowProductionGrid
138 public boolean isFlowProductionGrid() {
139 return flowProductionGrid;