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;
15 import com.google.gson.annotations.SerializedName;
18 * This class represents the result object of the status response (/api/state).
19 * This DTO was written for evcc version 0.117.0
21 * @author Florian Hotze - Initial contribution
24 // Data types from https://github.com/evcc-io/evcc/blob/master/api/api.go
25 // and from https://docs.evcc.io/docs/reference/configuration/messaging/#msg
27 // "auth" is left out because it does not provide any useful information
29 @SerializedName("batteryCapacity")
30 private float batteryCapacity;
32 @SerializedName("batteryConfigured")
33 private boolean batteryConfigured;
35 @SerializedName("batteryPower")
36 private float batteryPower;
38 @SerializedName("batterySoc")
39 private float batterySoC;
41 @SerializedName("gridConfigured")
42 private boolean gridConfigured;
44 @SerializedName("gridPower")
45 private float gridPower;
47 @SerializedName("homePower")
48 private float homePower;
50 @SerializedName("loadpoints")
51 private Loadpoint[] loadpoints;
53 @SerializedName("prioritySoc")
54 private float batteryPrioritySoC;
56 @SerializedName("pvConfigured")
57 private boolean pvConfigured;
59 @SerializedName("pvPower")
60 private float pvPower;
62 @SerializedName("siteTitle")
63 private String siteTitle;
66 * @return battery's capacity
68 public float getBatteryCapacity() {
69 return batteryCapacity;
73 * @return whether battery is configured
75 public boolean getBatteryConfigured() {
76 return batteryConfigured;
80 * @return battery's power
82 public float getBatteryPower() {
87 * @return battery's priority state of charge
89 public float getBatteryPrioritySoC() {
90 return batteryPrioritySoC;
94 * @return battery's state of charge
96 public float getBatterySoC() {
101 * @return whether grid is configured
103 public boolean getGridConfigured() {
104 return gridConfigured;
108 * @return grid's power
110 public float getGridPower() {
115 * @return home's power
117 public float getHomePower() {
122 * @return all configured loadpoints
124 public Loadpoint[] getLoadpoints() {
129 * @return whether pv is configured
131 public boolean getPvConfigured() {
138 public float getPvPower() {
143 * @return site's title/name
145 public String getSiteTitle() {