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.kostalinverter.internal.thirdgeneration;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link ThirdGenerationBindingConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author René Stakemeier - Initial contribution
25 public class ThirdGenerationBindingConstants {
27 private static final String BINDING_ID = "kostalinverter";
29 // List of all constants used for the authentication
30 static final String USER_TYPE = "user";
31 static final String HMAC_SHA256_ALGORITHM = "HMACSHA256";
32 static final String SHA_256_HASH = "SHA-256";
33 static final int AES_GCM_TAG_LENGTH = 128; // bit count
35 // List of all Thing Type UIDs
36 public static final ThingTypeUID PIKOIQ42 = new ThingTypeUID(BINDING_ID, "PIKOIQ42");
37 public static final ThingTypeUID PIKOIQ55 = new ThingTypeUID(BINDING_ID, "PIKOIQ55");
38 public static final ThingTypeUID PIKOIQ70 = new ThingTypeUID(BINDING_ID, "PIKOIQ70");
39 public static final ThingTypeUID PIKOIQ85 = new ThingTypeUID(BINDING_ID, "PIKOIQ85");
40 public static final ThingTypeUID PIKOIQ100 = new ThingTypeUID(BINDING_ID, "PIKOIQ100");
41 public static final ThingTypeUID PLENTICOREPLUS42WITHOUTBATTERY = new ThingTypeUID(BINDING_ID,
42 "PLENTICOREPLUS42WITHOUTBATTERY");
43 public static final ThingTypeUID PLENTICOREPLUS55WITHOUTBATTERY = new ThingTypeUID(BINDING_ID,
44 "PLENTICOREPLUS55WITHOUTBATTERY");
45 public static final ThingTypeUID PLENTICOREPLUS70WITHOUTBATTERY = new ThingTypeUID(BINDING_ID,
46 "PLENTICOREPLUS70WITHOUTBATTERY");
47 public static final ThingTypeUID PLENTICOREPLUS85WITHOUTBATTERY = new ThingTypeUID(BINDING_ID,
48 "PLENTICOREPLUS85WITHOUTBATTERY");
49 public static final ThingTypeUID PLENTICOREPLUS100WITHOUTBATTERY = new ThingTypeUID(BINDING_ID,
50 "PLENTICOREPLUS100WITHOUTBATTERY");
51 public static final ThingTypeUID PLENTICOREPLUS42WITHBATTERY = new ThingTypeUID(BINDING_ID,
52 "PLENTICOREPLUS42WITHBATTERY");
53 public static final ThingTypeUID PLENTICOREPLUS55WITHBATTERY = new ThingTypeUID(BINDING_ID,
54 "PLENTICOREPLUS55WITHBATTERY");
55 public static final ThingTypeUID PLENTICOREPLUS70WITHBATTERY = new ThingTypeUID(BINDING_ID,
56 "PLENTICOREPLUS70WITHBATTERY");
57 public static final ThingTypeUID PLENTICOREPLUS85WITHBATTERY = new ThingTypeUID(BINDING_ID,
58 "PLENTICOREPLUS85WITHBATTERY");
59 public static final ThingTypeUID PLENTICOREPLUS100WITHBATTERY = new ThingTypeUID(BINDING_ID,
60 "PLENTICOREPLUS100WITHBATTERY");
62 // List of error messages
63 public static final String COMMUNICATION_ERROR_AUTHENTICATION = "Error during the initialisation of the authentication";
64 public static final String COMMUNICATION_ERROR_UNSUPPORTED_ENCODING = "The text encoding is not supported by this openHAB installation";
65 public static final String COMMUNICATION_ERROR_AES_ERROR = "The java installation does not support AES encryption in GCM mode";
66 public static final String COMMUNICATION_ERROR_HTTP = "HTTP communication error: No response from device";
67 public static final String COMMUNICATION_ERROR_JSON = "HTTP communication error: answer did not match the expected format";
68 public static final String COMMUNICATION_ERROR_API_CHANGED = "The API seems to have changed :-( Maybe this implementation has become incompatible with the device";
69 public static final String COMMUNICATION_ERROR_INCOMPATIBLE_DEVICE = "The device could not provide the required information. Please check, if you selected the right thing for your device!";
70 public static final String COMMUNICATION_ERROR_USER_ACCOUNT_LOCKED = "Your user account on the device is locked. Please reset the password by following the instructions on the device´s web frontend";
71 public static final String CONFIGURATION_ERROR_PASSWORD = "Wrong password";
73 // List of all Channel uids
74 public static final String CHANNEL_DEVICE_LOCAL_DC_POWER = "deviceLocalDCPower";
75 public static final String CHANNEL_DEVICE_LOCAL_HOMECONSUMPTION_FROM_BATTERY = "deviceLocalHomeconsumptionFromBattery";
76 public static final String CHANNEL_DEVICE_LOCAL_HOMECONSUMPTION_FROM_GRID = "deviceLocalHomeconsumptionFromGrid";
77 public static final String CHANNEL_DEVICE_LOCAL_OWNCONSUMPTION = "deviceLocalOwnconsumption";
78 public static final String CHANNEL_DEVICE_LOCAL_HOMECONSUMPTION_FROM_PV = "deviceLocalHomeconsumptionFromPV";
79 public static final String CHANNEL_DEVICE_LOCAL_HOMECONSUMPTION_TOTAL = "deviceLocalHomeconsumptionTotal";
80 public static final String CHANNEL_DEVICE_LOCAL_LIMIT_EVU_ABSOLUTE = "deviceLocalLimitEVUAbsolute";
81 public static final String CHANNEL_DEVICE_LOCAL_LIMIT_EVU_RELATIV = "deviceLocalLimitEVURelativ";
82 public static final String CHANNEL_DEVICE_LOCAL_WORKTIME = "deviceLocalWorktime";
83 public static final String CHANNEL_DEVICE_LOCAL_AC_COS_PHI = "deviceLocalACCosPhi";
84 public static final String CHANNEL_DEVICE_LOCAL_AC_FREQUENCY = "deviceLocalACFrequency";
85 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_AMPERAGE = "deviceLocalACPhase1CurrentAmperage";
86 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_POWER = "deviceLocalACPhase1CurrentPower";
87 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_1_CURRENT_VOLTAGE = "deviceLocalACPhase1CurrentVoltage";
88 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_2_CURRENT_AMPERAGE = "deviceLocalACPhase2CurrentAmperage";
89 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_2_CURRENT_POWER = "deviceLocalACPhase2CurrentPower";
90 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_2_CURRENT_VOLTAGE = "deviceLocalACPhase2CurrentVoltage";
91 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_3_CURRENT_AMPERAGE = "deviceLocalACPhase3CurrentAmperage";
92 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_3_CURRENT_POWER = "deviceLocalACPhase3CurrentPower";
93 public static final String CHANNEL_DEVICE_LOCAL_AC_PHASE_3_CURRENT_VOLTAGE = "deviceLocalACPhase3CurrentVoltage";
94 public static final String CHANNEL_DEVICE_LOCAL_AC_CURRENT_POWER = "deviceLocalACCurrentPower";
95 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_LOADING_CYCLES = "deviceLocalBatteryLoadingCycles";
96 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_FULL_CHARGE_CAPACITY = "deviceLocalBatteryFullChargeCapacity";
97 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_AMPERAGE = "deviceLocalBatteryAmperage";
98 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_POWER = "deviceLocalBatteryPower";
99 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_STATE_OF_CHARGE = "deviceLocalBatteryStageOfCharge";
100 public static final String CHANNEL_DEVICE_LOCAL_BATTERY_VOLTAGE = "deviceLocalBatteryVoltage";
101 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_1_AMPERAGE = "deviceLocalPVString1Amperage";
102 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_1_POWER = "deviceLocalPVString1Power";
103 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_1_VOLTAGE = "deviceLocalPVString1Voltage";
104 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_2_AMPERAGE = "deviceLocalPVString2Amperage";
105 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_2_POWER = "deviceLocalPVString2Power";
106 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_2_VOLTAGE = "deviceLocalPVString2Voltage";
107 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_3_AMPERAGE = "deviceLocalPVString3Amperage";
108 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_3_POWER = "deviceLocalPVString3Power";
109 public static final String CHANNEL_DEVICE_LOCAL_PVSTRING_3_VOLTAGE = "deviceLocalPVString3Voltage";
110 public static final String CHANNEL_SCB_EVENT_ERROR_COUNT_MC = "SCBEventErrorCountMc";
111 public static final String CHANNEL_SCB_EVENT_ERROR_COUNT_SFH = "SCBEventErrorCountSFH";
112 public static final String CHANNEL_SCB_EVENT_ERROR_COUNT_SCB = "SCBEventErrorCountSCB";
113 public static final String CHANNEL_SCB_EVENT_WARNING_COUNT_SCB = "SCBEventWarningCountSCB";
114 public static final String CHANNEL_STATISTIC_AUTARKY_DAY = "statisticAutarkyDay";
115 public static final String CHANNEL_STATISTIC_AUTARKY_MONTH = "statisticAutarkyMonth";
116 public static final String CHANNEL_STATISTIC_AUTARKY_TOTAL = "statisticAutarkyTotal";
117 public static final String CHANNEL_STATISTIC_AUTARKY_YEAR = "statisticAutarkyYear";
118 public static final String CHANNEL_STATISTIC_CO2SAVING_DAY = "statisticCo2SavingDay";
119 public static final String CHANNEL_STATISTIC_CO2SAVING_MONTH = "statisticCo2SavingMonth";
120 public static final String CHANNEL_STATISTIC_CO2SAVING_TOTAL = "statisticCo2SavingTotal";
121 public static final String CHANNEL_STATISTIC_CO2SAVING_YEAR = "statisticCo2SavingYear";
122 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_DAY = "statisticHomeconsumptionDay";
123 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_MONTH = "statisticHomeconsumptionMonth";
124 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_TOTAL = "statisticHomeconsumptionTotal";
125 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_YEAR = "statisticHomeconsumptionYear";
126 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_BATTERIE_DAY = "statisticHomeconsumptionFromBatteryDay";
127 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_BATTERIE_MONTH = "statisticHomeconsumptionFromBatteryMonth";
128 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_BATTERIE_TOTAL = "statisticHomeconsumptionFromBatteryTotal";
129 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_BATTERIE_YEAR = "statisticHomeconsumptionFromBatteryYear";
130 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_GRID_DAY = "statisticHomeconsumptionFromGridDay";
131 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_GRID_MONTH = "statisticHomeconsumptionFromGridMonth";
132 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_GRID_TOTAL = "statisticHomeconsumptionFromGridTotal";
133 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_GRID_YEAR = "statisticHomeconsumptionFromGridYear";
134 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_PV_DAY = "statisticHomeconsumptionFromPVDay";
135 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_PV_MONTH = "statisticHomeconsumptionFromPVMonth";
136 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_PV_TOTAL = "statisticHomeconsumptionFromPVTotal";
137 public static final String CHANNEL_STATISTIC_HOMECONSUMPTION_FROM_PV_YEAR = "statisticHomeconsumptionFromPVYear";
138 public static final String CHANNEL_STATISTIC_OWNCONSUMPTION_RATE_DAY = "statisticOwnconsumptionRateDay";
139 public static final String CHANNEL_STATISTIC_OWNCONSUMPTION_RATE_MONTH = "statisticOwnconsumptionRateMonth";
140 public static final String CHANNEL_STATISTIC_OWNCONSUMPTION_RATE_TOTAL = "statisticOwnconsumptionRateTotal";
141 public static final String CHANNEL_STATISTIC_OWNCONSUMPTION_RATE_YEAR = "statisticOwnconsumptionRateYear";
142 public static final String CHANNEL_STATISTIC_YIELD_DAY = "statisticYieldDay";
143 public static final String CHANNEL_STATISTIC_YIELD_MONTH = "statisticYieldMonth";
144 public static final String CHANNEL_STATISTIC_YIELD_TOTAL = "statisticYieldTotal";
145 public static final String CHANNEL_STATISTIC_YIELD_YEAR = "statisticYieldYear";