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.innogysmarthome.internal.client.entity.device;
15 import java.time.ZonedDateTime;
17 import org.openhab.binding.innogysmarthome.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 DeviceConfig {
30 private String protocolId;
32 private String timeOfAcceptance;
34 private String timeOfDiscovery;
36 private String hardwareVersion;
38 private String softwareVersion;
40 private String firmwareVersion;
42 private String hostName;
44 private boolean activityLogEnabled;
46 private String configurationState;
48 @SerializedName("IPAddress")
49 private String ipAddress;
51 @SerializedName("MACAddress")
52 private String macAddress;
54 private String registrationTime;
56 private String timeZone;
58 private String shcType;
60 private String geoLocation;
62 private Double currentUTCOffset;
64 private Boolean backendConnectionMonitored;
66 @SerializedName("RFCommFailureNotification")
67 private Boolean rfCommFailureNotification;
69 private String displayCurrentTemperature;
71 private String underlyingDeviceIds;
73 private String meterId;
75 private String meterFirmwareVersion;
80 public String getName() {
85 * @param name the name to set
87 public void setName(String name) {
92 * @return the protocolId
94 public String getProtocolId() {
99 * @param protocolId the protocolId to set
101 public void setProtocolId(String protocolId) {
102 this.protocolId = protocolId;
106 * Returns the time, when the {@link Device} was added to the SHC configuration.
110 public ZonedDateTime getTimeOfAcceptance() {
111 if (timeOfAcceptance == null) {
114 return Util.convertZuluTimeStringToDate(timeOfAcceptance);
118 * @param timeOfAcceptance the timeOfAcceptance to set
120 public void setTimeOfAcceptance(String timeOfAcceptance) {
121 this.timeOfAcceptance = timeOfAcceptance;
125 * Returns the time, when the {@link Device} was discovered by the SHC.
129 public ZonedDateTime getTimeOfDiscovery() {
130 if (timeOfDiscovery == null) {
133 return Util.convertZuluTimeStringToDate(timeOfDiscovery);
137 * @param timeOfDiscovery the timeOfDiscovery to set
139 public void setTimeOfDiscovery(String timeOfDiscovery) {
140 this.timeOfDiscovery = timeOfDiscovery;
144 * @return the hardwareVersion
146 public String getHardwareVersion() {
147 return hardwareVersion;
151 * @param hardwareVersion the hardwareVersion to set
153 public void setHardwareVersion(String hardwareVersion) {
154 this.hardwareVersion = hardwareVersion;
158 * @return the softwareVersion
160 public String getSoftwareVersion() {
161 return softwareVersion;
165 * @param softwareVersion the softwareVersion to set
167 public void setSoftwareVersion(String softwareVersion) {
168 this.softwareVersion = softwareVersion;
172 * @return the firmwareVersion
174 public String getFirmwareVersion() {
175 return firmwareVersion;
179 * @param firmwareVersion the firmwareVersion to set
181 public void setFirmwareVersion(String firmwareVersion) {
182 this.firmwareVersion = firmwareVersion;
186 * @return the hostName
188 public String getHostName() {
193 * @param hostName the hostName to set
195 public void setHostName(String hostName) {
196 this.hostName = hostName;
200 * @return the activityLogEnabled
202 public boolean isActivityLogEnabled() {
203 return activityLogEnabled;
207 * @param activityLogEnabled the activityLogEnabled to set
209 public void setActivityLogEnabled(boolean activityLogEnabled) {
210 this.activityLogEnabled = activityLogEnabled;
214 * @return the configurationState
216 public String getConfigurationState() {
217 return configurationState;
221 * @param configurationState the configurationState to set
223 public void setConfigurationState(String configurationState) {
224 this.configurationState = configurationState;
228 * @return the iPAddress
230 public String getIPAddress() {
235 * @param ipAddress the ipAddress to set
237 public void setIPAddress(String ipAddress) {
238 this.ipAddress = ipAddress;
242 * @return the mACAddress
244 public String getMACAddress() {
249 * @param mACAddress the mACAddress to set
251 public void setMACAddress(String mACAddress) {
252 this.macAddress = mACAddress;
256 * @return the registrationTime
258 public ZonedDateTime getRegistrationTime() {
259 if (registrationTime == null) {
262 return Util.convertZuluTimeStringToDate(registrationTime);
266 * @param registrationTime the registrationTime to set
268 public void setRegistrationTime(String registrationTime) {
269 this.registrationTime = registrationTime;
273 * @return the timeZone
275 public String getTimeZone() {
280 * @param timeZone the timeZone to set
282 public void setTimeZone(String timeZone) {
283 this.timeZone = timeZone;
287 * @return the shcType
289 public String getShcType() {
294 * @param shcType the shcType to set
296 public void setShcType(String shcType) {
297 this.shcType = shcType;
301 * @return the geoLocation
303 public String getGeoLocation() {
308 * @param geoLocation the geoLocation to set
310 public void setGeoLocation(String geoLocation) {
311 this.geoLocation = geoLocation;
315 * @return the currentUTCOffset
317 public Double getCurrentUTCOffset() {
318 return currentUTCOffset;
322 * @param currentUTCOffset the currentUTCOffset to set
324 public void setCurrentUTCOffset(Double currentUTCOffset) {
325 this.currentUTCOffset = currentUTCOffset;
329 * @return the backendConnectionMonitored
331 public Boolean getBackendConnectionMonitored() {
332 return backendConnectionMonitored;
336 * @param backendConnectionMonitored the backendConnectionMonitored to set
338 public void setBackendConnectionMonitored(Boolean backendConnectionMonitored) {
339 this.backendConnectionMonitored = backendConnectionMonitored;
343 * @return the rFCommFailureNotification
345 public Boolean getRFCommFailureNotification() {
346 return rfCommFailureNotification;
350 * @param rFCommFailureNotification the rFCommFailureNotification to set
352 public void setRFCommFailureNotification(Boolean rFCommFailureNotification) {
353 rfCommFailureNotification = rFCommFailureNotification;
357 * @return the displayCurrentTemperature
359 public String getDisplayCurrentTemperature() {
360 return displayCurrentTemperature;
364 * @param displayCurrentTemperature the displayCurrentTemperature to set
366 public void setDisplayCurrentTemperature(String displayCurrentTemperature) {
367 this.displayCurrentTemperature = displayCurrentTemperature;
371 * @return the underlyingDeviceIds
373 public String getUnderlyingDeviceIds() {
374 return underlyingDeviceIds;
378 * @param underlyingDeviceIds the underlyingDeviceIds to set
380 public void setUnderlyingDeviceIds(String underlyingDeviceIds) {
381 this.underlyingDeviceIds = underlyingDeviceIds;
385 * @return the meterId
387 public String getMeterId() {
392 * @param meterId the meterId to set
394 public void setMeterId(String meterId) {
395 this.meterId = meterId;
399 * @return the meterFirmwareVersion
401 public String getMeterFirmwareVersion() {
402 return meterFirmwareVersion;
406 * @param meterFirmwareVersion the meterFirmwareVersion to set
408 public void setMeterFirmwareVersion(String meterFirmwareVersion) {
409 this.meterFirmwareVersion = meterFirmwareVersion;