2 * Copyright (c) 2010-2024 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.evcc.internal.api.dto;
17 import com.google.gson.annotations.SerializedName;
20 * This class represents the result object of the status response (/api/state).
21 * This DTO was written for evcc version 0.123.1
23 * @author Florian Hotze - Initial contribution
24 * @author Luca Arnecke - update to evcc version 0.123.1
27 // Data types from https://github.com/evcc-io/evcc/blob/master/api/api.go
28 // and from https://docs.evcc.io/docs/reference/configuration/messaging/#msg
30 // "auth" is left out because it does not provide any useful information
32 @SerializedName("batteryCapacity")
33 private float batteryCapacity;
35 @SerializedName("batteryConfigured")
36 private boolean batteryConfigured;
38 @SerializedName("batteryPower")
39 private float batteryPower;
41 @SerializedName("batterySoc")
42 private float batterySoC;
44 @SerializedName("batteryDischargeControl")
45 private boolean batteryDischargeControl;
47 @SerializedName("batteryMode")
48 private String batteryMode;
50 @SerializedName("gridConfigured")
51 private boolean gridConfigured;
53 @SerializedName("gridPower")
54 private float gridPower;
56 @SerializedName("homePower")
57 private float homePower;
59 @SerializedName("loadpoints")
60 private Loadpoint[] loadpoints;
62 @SerializedName("prioritySoc")
63 private float prioritySoC;
65 @SerializedName("bufferSoc")
66 private float bufferSoC;
68 @SerializedName("bufferStartSoc")
69 private float bufferStartSoC;
71 @SerializedName("residualPower")
72 private float residualPower;
74 @SerializedName("pvConfigured")
75 private boolean pvConfigured;
77 @SerializedName("pvPower")
78 private float pvPower;
80 @SerializedName("siteTitle")
81 private String siteTitle;
83 @SerializedName("vehicles")
84 private Map<String, Vehicle> vehicles;
87 * @return battery's capacity
89 public float getBatteryCapacity() {
90 return batteryCapacity;
94 * @return whether battery is configured
96 public boolean getBatteryConfigured() {
97 return batteryConfigured;
101 * @return battery's power
103 public float getBatteryPower() {
108 * @return battery's priority state of charge
110 public float getPrioritySoC() {
115 * @return Battery Buffer SoC
117 public float getBufferSoC() {
122 * @return Battery Buffer Start SoC
124 public float getBufferStartSoC() {
125 return bufferStartSoC;
129 * @return Grid Residual Power
131 public float getResidualPower() {
132 return residualPower;
136 * @return battery's state of charge
138 public float getBatterySoC() {
143 * @return battery discharge control
145 public boolean getBatteryDischargeControl() {
146 return batteryDischargeControl;
150 * @return battery mode
152 public String getBatteryMode() {
157 * @return whether grid is configured
159 public boolean getGridConfigured() {
160 return gridConfigured;
164 * @return grid's power
166 public float getGridPower() {
171 * @return home's power
173 public float getHomePower() {
178 * @return all configured loadpoints
180 public Loadpoint[] getLoadpoints() {
185 * @return whether pv is configured
187 public boolean getPvConfigured() {
194 public float getPvPower() {
199 * @return site's title/name
201 public String getSiteTitle() {
205 public Map<String, Vehicle> getVehicles() {