]> git.basschouten.com Git - openhab-addons.git/blob
ecf7eb111a915d0fbab305d3557ef4fcb720e140
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.solarwatt.internal.domain.model;
14
15 import static org.openhab.binding.solarwatt.internal.SolarwattBindingConstants.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.solarwatt.internal.domain.dto.DeviceDTO;
19
20 /**
21  * Base class for a EGO Smart Heaters ... see
22  * https://www.solarwatt.de/betriebsanleitungen/solarwatt-manager/solarwatt-manager-flex/geraete-verbinden/ego-smartheater
23  *
24  * This fields have been identified to exist:
25  * com.kiwigrid.devices.smartheater.SmartHeater=[
26  * TemperatureSetMax,
27  * PowerACInLimit,
28  * Temperature,
29  * DateProduction,
30  * IdFingerPrint,
31  * StateVisibleIsSet,
32  * StateErrorList,
33  * PasswordLock,
34  * IdManufacturer,
35  * WorkACIn,
36  * PowerACInLimits,
37  * TemperatureBoiler,
38  * IdFirmware,
39  * IdModelCode,
40  * IdName,
41  * IdInterfaceList,
42  * TemperatureSetMin,
43  * IdDriver,
44  * StateDevice,
45  * TemperatureSet,
46  * PowerACIn,
47  * IdSerialNumber,
48  * PowerACInMax,
49  * IdFingerPrintVersion,
50  * IdLabelSet,
51  * StateLockedIsSet
52  * ]
53  *
54  * @author Thomas Schumm - Initial contribution
55  */
56 @NonNullByDefault
57 public class SmartHeater extends Device {
58     public static final String SOLAR_WATT_CLASSNAME = "com.kiwigrid.devices.smartheater.SmartHeater";
59
60     public SmartHeater(DeviceDTO deviceDTO) {
61         super(deviceDTO);
62     }
63
64     @Override
65     public void update(DeviceDTO deviceDTO) {
66         super.update(deviceDTO);
67
68         this.addWattHourQuantity(CHANNEL_WORK_AC_IN, deviceDTO);
69         this.addWattQuantity(CHANNEL_POWER_AC_IN, deviceDTO);
70         this.addCelsiusQuantity(CHANNEL_TEMPERATURE, deviceDTO);
71         this.addCelsiusQuantity(CHANNEL_TEMPERATURE_SET_MAX, deviceDTO);
72         this.addCelsiusQuantity(CHANNEL_TEMPERATURE_BOILER, deviceDTO);
73         this.addCelsiusQuantity(CHANNEL_TEMPERATURE_SET_MIN, deviceDTO);
74         this.addCelsiusQuantity(CHANNEL_TEMPERATURE_SET, deviceDTO);
75     }
76
77     @Override
78     protected String getSolarWattLabel() {
79         return "SmartHeater";
80     }
81 }