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.livisismarthome.internal.client.api.entity.device;
15 import java.time.ZonedDateTime;
17 import org.openhab.binding.livisismarthome.internal.client.Util;
19 import com.google.gson.annotations.SerializedName;
22 * Holds the configuration of the Device.
24 * @author Oliver Kuhl - Initial contribution
27 public class DeviceConfigDTO {
30 private String protocolId;
31 private String timeOfAcceptance;
32 private String timeOfDiscovery;
33 private String hardwareVersion;
34 private String softwareVersion;
35 private String firmwareVersion;
36 private String hostName;
37 private boolean activityLogEnabled;
38 private String configurationState;
39 @SerializedName("IPAddress")
40 private String ipAddress;
41 @SerializedName("MACAddress")
42 private String macAddress;
43 private String registrationTime;
44 private String timeZone;
45 private String shcType;
46 private String geoLocation;
47 private Double currentUTCOffset;
48 private Boolean backendConnectionMonitored;
49 @SerializedName("RFCommFailureNotification")
50 private Boolean rfCommFailureNotification;
51 private String displayCurrentTemperature;
52 private String underlyingDeviceIds;
53 private String meterId;
54 private String meterFirmwareVersion;
59 public String getName() {
64 * @param name the name to set
66 public void setName(String name) {
71 * @return the protocolId
73 public String getProtocolId() {
78 * @param protocolId the protocolId to set
80 public void setProtocolId(String protocolId) {
81 this.protocolId = protocolId;
85 * Returns the time, when the {@link DeviceDTO} was added to the SHC configuration.
87 * @return time of acceptance
89 public ZonedDateTime getTimeOfAcceptance() {
90 if (timeOfAcceptance == null) {
93 return Util.timeStringToDate(timeOfAcceptance);
97 * @param timeOfAcceptance the timeOfAcceptance to set
99 public void setTimeOfAcceptance(String timeOfAcceptance) {
100 this.timeOfAcceptance = timeOfAcceptance;
104 * Returns the time, when the {@link DeviceDTO} was discovered by the SHC.
106 * @return time of discovery
108 public ZonedDateTime getTimeOfDiscovery() {
109 if (timeOfDiscovery == null) {
112 return Util.timeStringToDate(timeOfDiscovery);
116 * @param timeOfDiscovery the timeOfDiscovery to set
118 public void setTimeOfDiscovery(String timeOfDiscovery) {
119 this.timeOfDiscovery = timeOfDiscovery;
123 * @return the hardwareVersion
125 public String getHardwareVersion() {
126 return hardwareVersion;
130 * @param hardwareVersion the hardwareVersion to set
132 public void setHardwareVersion(String hardwareVersion) {
133 this.hardwareVersion = hardwareVersion;
137 * @return the softwareVersion
139 public String getSoftwareVersion() {
140 return softwareVersion;
144 * @param softwareVersion the softwareVersion to set
146 public void setSoftwareVersion(String softwareVersion) {
147 this.softwareVersion = softwareVersion;
151 * @return the firmwareVersion
153 public String getFirmwareVersion() {
154 return firmwareVersion;
158 * @param firmwareVersion the firmwareVersion to set
160 public void setFirmwareVersion(String firmwareVersion) {
161 this.firmwareVersion = firmwareVersion;
165 * @return the hostName
167 public String getHostName() {
172 * @param hostName the hostName to set
174 public void setHostName(String hostName) {
175 this.hostName = hostName;
179 * @return the activityLogEnabled
181 public boolean isActivityLogEnabled() {
182 return activityLogEnabled;
186 * @param activityLogEnabled the activityLogEnabled to set
188 public void setActivityLogEnabled(boolean activityLogEnabled) {
189 this.activityLogEnabled = activityLogEnabled;
193 * @return the configurationState
195 public String getConfigurationState() {
196 return configurationState;
200 * @param configurationState the configurationState to set
202 public void setConfigurationState(String configurationState) {
203 this.configurationState = configurationState;
207 * @return the iPAddress
209 public String getIPAddress() {
214 * @param ipAddress the ipAddress to set
216 public void setIPAddress(String ipAddress) {
217 this.ipAddress = ipAddress;
221 * @return the mACAddress
223 public String getMACAddress() {
228 * @param mACAddress the mACAddress to set
230 public void setMACAddress(String mACAddress) {
231 this.macAddress = mACAddress;
235 * @return the registrationTime
237 public ZonedDateTime getRegistrationTime() {
238 if (registrationTime == null) {
241 return Util.timeStringToDate(registrationTime);
245 * @param registrationTime the registrationTime to set
247 public void setRegistrationTime(String registrationTime) {
248 this.registrationTime = registrationTime;
252 * @return the timeZone
254 public String getTimeZone() {
259 * @param timeZone the timeZone to set
261 public void setTimeZone(String timeZone) {
262 this.timeZone = timeZone;
266 * @return the shcType
268 public String getShcType() {
273 * @param shcType the shcType to set
275 public void setShcType(String shcType) {
276 this.shcType = shcType;
280 * @return the geoLocation
282 public String getGeoLocation() {
287 * @param geoLocation the geoLocation to set
289 public void setGeoLocation(String geoLocation) {
290 this.geoLocation = geoLocation;
294 * @return the currentUTCOffset
296 public Double getCurrentUTCOffset() {
297 return currentUTCOffset;
301 * @param currentUTCOffset the currentUTCOffset to set
303 public void setCurrentUTCOffset(Double currentUTCOffset) {
304 this.currentUTCOffset = currentUTCOffset;
308 * @return the backendConnectionMonitored
310 public Boolean getBackendConnectionMonitored() {
311 return backendConnectionMonitored;
315 * @param backendConnectionMonitored the backendConnectionMonitored to set
317 public void setBackendConnectionMonitored(Boolean backendConnectionMonitored) {
318 this.backendConnectionMonitored = backendConnectionMonitored;
322 * @return the rFCommFailureNotification
324 public Boolean getRFCommFailureNotification() {
325 return rfCommFailureNotification;
329 * @param rFCommFailureNotification the rFCommFailureNotification to set
331 public void setRFCommFailureNotification(Boolean rFCommFailureNotification) {
332 rfCommFailureNotification = rFCommFailureNotification;
336 * @return the displayCurrentTemperature
338 public String getDisplayCurrentTemperature() {
339 return displayCurrentTemperature;
343 * @param displayCurrentTemperature the displayCurrentTemperature to set
345 public void setDisplayCurrentTemperature(String displayCurrentTemperature) {
346 this.displayCurrentTemperature = displayCurrentTemperature;
350 * @return the underlyingDeviceIds
352 public String getUnderlyingDeviceIds() {
353 return underlyingDeviceIds;
357 * @param underlyingDeviceIds the underlyingDeviceIds to set
359 public void setUnderlyingDeviceIds(String underlyingDeviceIds) {
360 this.underlyingDeviceIds = underlyingDeviceIds;
364 * @return the meterId
366 public String getMeterId() {
371 * @param meterId the meterId to set
373 public void setMeterId(String meterId) {
374 this.meterId = meterId;
378 * @return the meterFirmwareVersion
380 public String getMeterFirmwareVersion() {
381 return meterFirmwareVersion;
385 * @param meterFirmwareVersion the meterFirmwareVersion to set
387 public void setMeterFirmwareVersion(String meterFirmwareVersion) {
388 this.meterFirmwareVersion = meterFirmwareVersion;