]> git.basschouten.com Git - openhab-addons.git/blob
cbb3f8810699e93e815499d43be8a097e9165ee2
[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.mielecloud.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link MieleCloudBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Roland Edelhoff - Initial contribution
23  * @author Björn Lange - Added locale config parameter, added i18n key collection
24  * @author Benjamin Bolte - Add pre-heat finished and plate step channels, door state and door alarm channels, info
25  *         state channel and map signal flags from API
26  * @author Björn Lange - Add elapsed time channel, dish warmer thing, removed e-mail validation
27  */
28 @NonNullByDefault
29 public final class MieleCloudBindingConstants {
30
31     private MieleCloudBindingConstants() {
32     }
33
34     /**
35      * ID of the binding.
36      */
37     public static final String BINDING_ID = "mielecloud";
38
39     /**
40      * Thing type ID of Miele cloud bridges / accounts.
41      */
42     public static final String BRIDGE_TYPE_ID = "account";
43
44     /**
45      * The {@link ThingTypeUID} of Miele cloud bridges / accounts.
46      */
47     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, BRIDGE_TYPE_ID);
48
49     /**
50      * The {@link ThingTypeUID} of Miele washing machines.
51      */
52     public static final ThingTypeUID THING_TYPE_WASHING_MACHINE = new ThingTypeUID(BINDING_ID, "washing_machine");
53
54     /**
55      * The {@link ThingTypeUID} of Miele washer-dryers.
56      */
57     public static final ThingTypeUID THING_TYPE_WASHER_DRYER = new ThingTypeUID(BINDING_ID, "washer_dryer");
58
59     /**
60      * The {@link ThingTypeUID} of Miele coffee machines.
61      */
62     public static final ThingTypeUID THING_TYPE_COFFEE_SYSTEM = new ThingTypeUID(BINDING_ID, "coffee_system");
63
64     /**
65      * The {@link ThingTypeUID} of Miele fridge-freezers.
66      */
67     public static final ThingTypeUID THING_TYPE_FRIDGE_FREEZER = new ThingTypeUID(BINDING_ID, "fridge_freezer");
68
69     /**
70      * The {@link ThingTypeUID} of Miele fridges.
71      */
72     public static final ThingTypeUID THING_TYPE_FRIDGE = new ThingTypeUID(BINDING_ID, "fridge");
73
74     /**
75      * The {@link ThingTypeUID} of Miele freezers.
76      */
77     public static final ThingTypeUID THING_TYPE_FREEZER = new ThingTypeUID(BINDING_ID, "freezer");
78
79     /**
80      * The {@link ThingTypeUID} of Miele ovens.
81      */
82     public static final ThingTypeUID THING_TYPE_OVEN = new ThingTypeUID(BINDING_ID, "oven");
83
84     /**
85      * The {@link ThingTypeUID} of Miele hobs.
86      */
87     public static final ThingTypeUID THING_TYPE_HOB = new ThingTypeUID(BINDING_ID, "hob");
88
89     /**
90      * The {@link ThingTypeUID} of Miele wine storages.
91      */
92     public static final ThingTypeUID THING_TYPE_WINE_STORAGE = new ThingTypeUID(BINDING_ID, "wine_storage");
93
94     /**
95      * The {@link ThingTypeUID} of Miele dishwashers.
96      */
97     public static final ThingTypeUID THING_TYPE_DISHWASHER = new ThingTypeUID(BINDING_ID, "dishwasher");
98
99     /**
100      * The {@link ThingTypeUID} of Miele dryers.
101      */
102     public static final ThingTypeUID THING_TYPE_DRYER = new ThingTypeUID(BINDING_ID, "dryer");
103
104     /**
105      * The {@link ThingTypeUID} of Miele hoods.
106      */
107     public static final ThingTypeUID THING_TYPE_HOOD = new ThingTypeUID(BINDING_ID, "hood");
108
109     /**
110      * The {@link ThingTypeUID} of Miele dish warmers.
111      */
112     public static final ThingTypeUID THING_TYPE_DISH_WARMER = new ThingTypeUID(BINDING_ID, "dish_warmer");
113
114     /**
115      * The {@link ThingTypeUID} of Miele robotic vacuum cleaners.
116      */
117     public static final ThingTypeUID THING_TYPE_ROBOTIC_VACUUM_CLEANER = new ThingTypeUID(BINDING_ID,
118             "robotic_vacuum_cleaner");
119
120     /**
121      * Name of the property storing the OAuth2 access token.
122      */
123     public static final String PROPERTY_ACCESS_TOKEN = "accessToken";
124
125     /**
126      * Name of the configuration parameter for the e-mail address.
127      */
128     public static final String CONFIG_PARAM_EMAIL = "email";
129
130     /**
131      * Name of the configuration parameter for the device identifier uniquely identifying a Miele device.
132      */
133     public static final String CONFIG_PARAM_DEVICE_IDENTIFIER = "deviceIdentifier";
134
135     /**
136      * Name of the configuration parameter for the locale. The locale is stored as a 2-letter language code.
137      */
138     public static final String CONFIG_PARAM_LOCALE = "locale";
139
140     /**
141      * Name of the property storing the number of plates for hobs.
142      */
143     public static final String PROPERTY_PLATE_COUNT = "plateCount";
144
145     /**
146      * Constants for all channels.
147      */
148     public static final class Channels {
149         private Channels() {
150         }
151
152         public static final String REMOTE_CONTROL_CAN_BE_STARTED = "remote_control_can_be_started";
153         public static final String REMOTE_CONTROL_CAN_BE_STOPPED = "remote_control_can_be_stopped";
154         public static final String REMOTE_CONTROL_CAN_BE_PAUSED = "remote_control_can_be_paused";
155         public static final String REMOTE_CONTROL_CAN_BE_SWITCHED_ON = "remote_control_can_be_switched_on";
156         public static final String REMOTE_CONTROL_CAN_BE_SWITCHED_OFF = "remote_control_can_be_switched_off";
157         public static final String REMOTE_CONTROL_CAN_SET_PROGRAM_ACTIVE = "remote_control_can_set_program_active";
158         public static final String SPINNING_SPEED = "spinning_speed";
159         public static final String SPINNING_SPEED_RAW = "spinning_speed_raw";
160         public static final String PROGRAM_ACTIVE = "program_active";
161         public static final String PROGRAM_ACTIVE_RAW = "program_active_raw";
162         public static final String DISH_WARMER_PROGRAM_ACTIVE = "dish_warmer_program_active";
163         public static final String VACUUM_CLEANER_PROGRAM_ACTIVE = "vacuum_cleaner_program_active";
164         public static final String PROGRAM_PHASE = "program_phase";
165         public static final String PROGRAM_PHASE_RAW = "program_phase_raw";
166         public static final String OPERATION_STATE = "operation_state";
167         public static final String OPERATION_STATE_RAW = "operation_state_raw";
168         public static final String PROGRAM_START_STOP = "program_start_stop";
169         public static final String PROGRAM_START_STOP_PAUSE = "program_start_stop_pause";
170         public static final String POWER_ON_OFF = "power_state_on_off";
171         public static final String FINISH_STATE = "finish_state";
172         public static final String DELAYED_START_TIME = "delayed_start_time";
173         public static final String PROGRAM_REMAINING_TIME = "program_remaining_time";
174         public static final String PROGRAM_ELAPSED_TIME = "program_elapsed_time";
175         public static final String PROGRAM_PROGRESS = "program_progress";
176         public static final String DRYING_TARGET = "drying_target";
177         public static final String DRYING_TARGET_RAW = "drying_target_raw";
178         public static final String PRE_HEAT_FINISHED = "pre_heat_finished";
179         public static final String TEMPERATURE_TARGET = "temperature_target";
180         public static final String TEMPERATURE_CURRENT = "temperature_current";
181         public static final String TEMPERATURE_CORE_TARGET = "temperature_core_target";
182         public static final String TEMPERATURE_CORE_CURRENT = "temperature_core_current";
183         public static final String VENTILATION_POWER = "ventilation_power";
184         public static final String VENTILATION_POWER_RAW = "ventilation_power_raw";
185         public static final String ERROR_STATE = "error_state";
186         public static final String INFO_STATE = "info_state";
187         public static final String FRIDGE_SUPER_COOL = "fridge_super_cool";
188         public static final String FREEZER_SUPER_FREEZE = "freezer_super_freeze";
189         public static final String SUPER_COOL_CAN_BE_CONTROLLED = "super_cool_can_be_controlled";
190         public static final String SUPER_FREEZE_CAN_BE_CONTROLLED = "super_freeze_can_be_controlled";
191         public static final String FRIDGE_TEMPERATURE_TARGET = "fridge_temperature_target";
192         public static final String FRIDGE_TEMPERATURE_CURRENT = "fridge_temperature_current";
193         public static final String FREEZER_TEMPERATURE_TARGET = "freezer_temperature_target";
194         public static final String FREEZER_TEMPERATURE_CURRENT = "freezer_temperature_current";
195         public static final String TOP_TEMPERATURE_TARGET = "top_temperature_target";
196         public static final String TOP_TEMPERATURE_CURRENT = "top_temperature_current";
197         public static final String MIDDLE_TEMPERATURE_TARGET = "middle_temperature_target";
198         public static final String MIDDLE_TEMPERATURE_CURRENT = "middle_temperature_current";
199         public static final String BOTTOM_TEMPERATURE_TARGET = "bottom_temperature_target";
200         public static final String BOTTOM_TEMPERATURE_CURRENT = "bottom_temperature_current";
201         public static final String LIGHT_SWITCH = "light_switch";
202         public static final String LIGHT_CAN_BE_CONTROLLED = "light_can_be_controlled";
203         public static final String PLATE_1_POWER_STEP = "plate_1_power_step";
204         public static final String PLATE_1_POWER_STEP_RAW = "plate_1_power_step_raw";
205         public static final String PLATE_2_POWER_STEP = "plate_2_power_step";
206         public static final String PLATE_2_POWER_STEP_RAW = "plate_2_power_step_raw";
207         public static final String PLATE_3_POWER_STEP = "plate_3_power_step";
208         public static final String PLATE_3_POWER_STEP_RAW = "plate_3_power_step_raw";
209         public static final String PLATE_4_POWER_STEP = "plate_4_power_step";
210         public static final String PLATE_4_POWER_STEP_RAW = "plate_4_power_step_raw";
211         public static final String PLATE_5_POWER_STEP = "plate_5_power_step";
212         public static final String PLATE_5_POWER_STEP_RAW = "plate_5_power_step_raw";
213         public static final String PLATE_6_POWER_STEP = "plate_6_power_step";
214         public static final String PLATE_6_POWER_STEP_RAW = "plate_6_power_step_raw";
215         public static final String DOOR_STATE = "door_state";
216         public static final String DOOR_ALARM = "door_alarm";
217         public static final String BATTERY_LEVEL = "battery_level";
218     }
219
220     /**
221      * Constants for i18n keys.
222      */
223     public static final class I18NKeys {
224         private I18NKeys() {
225         }
226
227         public static final String BRIDGE_STATUS_DESCRIPTION_ACCESS_TOKEN_NOT_CONFIGURED = "@text/mielecloud.bridge.status.access.token.not.configured";
228         public static final String BRIDGE_STATUS_DESCRIPTION_ACCOUNT_NOT_AUTHORIZED = "@text/mielecloud.bridge.status.account.not.authorized";
229         public static final String BRIDGE_STATUS_DESCRIPTION_ACCESS_TOKEN_REFRESH_FAILED = "@text/mielecloud.bridge.status.access.token.refresh.failed";
230         public static final String BRIDGE_STATUS_DESCRIPTION_TRANSIENT_HTTP_ERROR = "@text/mielecloud.bridge.status.transient.http.error";
231
232         public static final String THING_STATUS_DESCRIPTION_WEBSERVICE_MISSING = "@text/mielecloud.thing.status.webservice.missing";
233         public static final String THING_STATUS_DESCRIPTION_REMOVED = "@text/mielecloud.thing.status.removed";
234         public static final String THING_STATUS_DESCRIPTION_RATELIMIT = "@text/mielecloud.thing.status.ratelimit";
235         public static final String THING_STATUS_DESCRIPTION_DISCONNECTED = "@text/mielecloud.thing.status.disconnected";
236     }
237 }