2 * Copyright (c) 2010-2022 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.shelly.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link ShellyBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Markus Michels - Initial contribution
30 public class ShellyBindingConstants {
32 public static final String VENDOR = "Shelly";
33 public static final String BINDING_ID = "shelly";
34 public static final String SYSTEM_ID = "system";
37 public static final String THING_TYPE_SHELLY1_STR = "shelly1";
38 public static final String THING_TYPE_SHELLY1L_STR = "shelly1l";
39 public static final String THING_TYPE_SHELLY1PM_STR = "shelly1pm";
40 public static final String THING_TYPE_SHELLYEM_STR = "shellyem";
41 public static final String THING_TYPE_SHELLY3EM_STR = "shellyem3"; // bad: misspelled product name, it's 3EM
42 public static final String THING_TYPE_SHELLY2_PREFIX = "shellyswitch";
43 public static final String THING_TYPE_SHELLY2_RELAY_STR = "shelly2-relay";
44 public static final String THING_TYPE_SHELLY2_ROLLER_STR = "shelly2-roller";
45 public static final String THING_TYPE_SHELLY25_PREFIX = "shellyswitch25";
46 public static final String THING_TYPE_SHELLY25_RELAY_STR = "shelly25-relay";
47 public static final String THING_TYPE_SHELLY25_ROLLER_STR = "shelly25-roller";
48 public static final String THING_TYPE_SHELLY4PRO_STR = "shelly4pro";
49 public static final String THING_TYPE_SHELLYPLUG_STR = "shellyplug";
50 public static final String THING_TYPE_SHELLYPLUGS_STR = "shellyplugs";
51 public static final String THING_TYPE_SHELLYPLUGU1_STR = "shellyplugu1"; // Shely Plug US
52 public static final String THING_TYPE_SHELLYDIMMER_STR = "shellydimmer";
53 public static final String THING_TYPE_SHELLYDIMMER2_STR = "shellydimmer2";
54 public static final String THING_TYPE_SHELLYIX3_STR = "shellyix3";
55 public static final String THING_TYPE_SHELLYBULB_STR = "shellybulb";
56 public static final String THING_TYPE_SHELLYDUO_STR = "shellybulbduo";
57 public static final String THING_TYPE_SHELLYVINTAGE_STR = "shellyvintage";
58 public static final String THING_TYPE_SHELLYRGBW2_PREFIX = "shellyrgbw2";
59 public static final String THING_TYPE_SHELLYRGBW2_COLOR_STR = THING_TYPE_SHELLYRGBW2_PREFIX + "-color";
60 public static final String THING_TYPE_SHELLYRGBW2_WHITE_STR = THING_TYPE_SHELLYRGBW2_PREFIX + "-white";
61 public static final String THING_TYPE_SHELLYDUORGBW_STR = "shellycolorbulb";
62 public static final String THING_TYPE_SHELLYHT_STR = "shellyht";
63 public static final String THING_TYPE_SHELLYSMOKE_STR = "shellysmoke";
64 public static final String THING_TYPE_SHELLYGAS_STR = "shellygas";
65 public static final String THING_TYPE_SHELLYFLOOD_STR = "shellyflood";
66 public static final String THING_TYPE_SHELLYDOORWIN_STR = "shellydw";
67 public static final String THING_TYPE_SHELLYDOORWIN2_STR = "shellydw2";
68 public static final String THING_TYPE_SHELLYEYE_STR = "shellyseye";
69 public static final String THING_TYPE_SHELLYSENSE_STR = "shellysense";
70 public static final String THING_TYPE_SHELLYTRV_STR = "shellytrv";
71 public static final String THING_TYPE_SHELLYMOTION_STR = "shellymotion";
72 public static final String THING_TYPE_SHELLYBUTTON1_STR = "shellybutton1";
73 public static final String THING_TYPE_SHELLYBUTTON2_STR = "shellybutton2";
74 public static final String THING_TYPE_SHELLYUNI_STR = "shellyuni";
75 public static final String THING_TYPE_SHELLYPROTECTED_STR = "shellydevice";
76 public static final String THING_TYPE_SHELLYUNKNOWN_STR = "shellyunknown";
79 public static final String SHELLYDT_1 = "SHSW-1";
80 public static final String SHELLYDT_1PM = "SHSW-PM";
81 public static final String SHELLYDT_1L = "SHSW-L";
82 public static final String SHELLYDT_SHPLG = "SHPLG-1";
83 public static final String SHELLYDT_SHPLG_S = "SHPLG-S";
84 public static final String SHELLYDT_SHPLG_U1 = "SHPLG-U1";
85 public static final String SHELLYDT_SHELLY2 = "SHSW-21";
86 public static final String SHELLYDT_SHELLY25 = "SHSW-25";
87 public static final String SHELLYDT_SHPRO = "SHSW-44";
88 public static final String SHELLYDT_EM = "SHEM";
89 public static final String SHELLYDT_3EM = "SHEM-3";
90 public static final String SHELLYDT_HT = "SHHT-1";
91 public static final String SHELLYDT_DW = "SHDW-1";
92 public static final String SHELLYDT_DW2 = "SHDW-2";
93 public static final String SHELLYDT_SENSE = "SHSEN-1";
94 public static final String SHELLYDT_MOTION = "SHMOS-01";
95 public static final String SHELLYDT_MOTION2 = "SHMOS-02";
96 public static final String SHELLYDT_GAS = "SHGS-1";
97 public static final String SHELLYDT_DIMMER = "SHDM-1";
98 public static final String SHELLYDT_DIMMER2 = "SHDM-2";
99 public static final String SHELLYDT_IX3 = "SHIX3-1";
100 public static final String SHELLYDT_BULB = "SHBLB-1";
101 public static final String SHELLYDT_DUO = "SHBDUO-1";
102 public static final String SHELLYDT_DUORGBW = "SHCB-1";
103 public static final String SHELLYDT_VINTAGE = "SHVIN-1";
104 public static final String SHELLYDT_RGBW2 = "SHRGBW2";
105 public static final String SHELLYDT_BUTTON1 = "SHBTN-1";
106 public static final String SHELLYDT_BUTTON2 = "SHBTN-2";
107 public static final String SHELLYDT_UNI = "SHUNI-1";
108 public static final String SHELLYDT_TRV = "SHTRV-01";
110 // List of all Thing Type UIDs
111 public static final ThingTypeUID THING_TYPE_SHELLY1 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1_STR);
112 public static final ThingTypeUID THING_TYPE_SHELLY1L = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1L_STR);
113 public static final ThingTypeUID THING_TYPE_SHELLY1PM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1PM_STR);
114 public static final ThingTypeUID THING_TYPE_SHELLYEM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEM_STR);
115 public static final ThingTypeUID THING_TYPE_SHELLY3EM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY3EM_STR);
116 public static final ThingTypeUID THING_TYPE_SHELLY2_RELAY = new ThingTypeUID(BINDING_ID,
117 THING_TYPE_SHELLY2_RELAY_STR);
118 public static final ThingTypeUID THING_TYPE_SHELLY2_ROLLER = new ThingTypeUID(BINDING_ID,
119 THING_TYPE_SHELLY2_ROLLER_STR);
120 public static final ThingTypeUID THING_TYPE_SHELLY25_RELAY = new ThingTypeUID(BINDING_ID,
121 THING_TYPE_SHELLY25_RELAY_STR);
122 public static final ThingTypeUID THING_TYPE_SHELLY25_ROLLER = new ThingTypeUID(BINDING_ID,
123 THING_TYPE_SHELLY25_ROLLER_STR);
124 public static final ThingTypeUID THING_TYPE_SHELLY4PRO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY4PRO_STR);
125 public static final ThingTypeUID THING_TYPE_SHELLYPLUG = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUG_STR);
126 public static final ThingTypeUID THING_TYPE_SHELLYPLUGS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUGS_STR);
127 public static final ThingTypeUID THING_TYPE_SHELLYPLUGU1 = new ThingTypeUID(BINDING_ID,
128 THING_TYPE_SHELLYPLUGU1_STR);
129 public static final ThingTypeUID THING_TYPE_SHELLYUNI = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYUNI_STR);
130 public static final ThingTypeUID THING_TYPE_SHELLYDIMMER = new ThingTypeUID(BINDING_ID,
131 THING_TYPE_SHELLYDIMMER_STR);
132 public static final ThingTypeUID THING_TYPE_SHELLYDIMMER2 = new ThingTypeUID(BINDING_ID,
133 THING_TYPE_SHELLYDIMMER2_STR);
134 public static final ThingTypeUID THING_TYPE_SHELLYIX3 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYIX3_STR);
135 public static final ThingTypeUID THING_TYPE_SHELLYBULB = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYBULB_STR);
136 public static final ThingTypeUID THING_TYPE_SHELLYDUO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYDUO_STR);
137 public static final ThingTypeUID THING_TYPE_SHELLYVINTAGE = new ThingTypeUID(BINDING_ID,
138 THING_TYPE_SHELLYVINTAGE_STR);
139 public static final ThingTypeUID THING_TYPE_SHELLYDUORGBW = new ThingTypeUID(BINDING_ID,
140 THING_TYPE_SHELLYDUORGBW_STR);
141 public static final ThingTypeUID THING_TYPE_SHELLYHT = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYHT_STR);
142 public static final ThingTypeUID THING_TYPE_SHELLYSENSE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSENSE_STR);
143 public static final ThingTypeUID THING_TYPE_SHELLYSMOKE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSMOKE_STR);
144 public static final ThingTypeUID THING_TYPE_SHELLYGAS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYGAS_STR);
145 public static final ThingTypeUID THING_TYPE_SHELLYFLOOD = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYFLOOD_STR);
146 public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN = new ThingTypeUID(BINDING_ID,
147 THING_TYPE_SHELLYDOORWIN_STR);
148 public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN2 = new ThingTypeUID(BINDING_ID,
149 THING_TYPE_SHELLYDOORWIN2_STR);
150 public static final ThingTypeUID THING_TYPE_SHELLYTRV = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYTRV_STR);
151 public static final ThingTypeUID THING_TYPE_SHELLYBUTTON1 = new ThingTypeUID(BINDING_ID,
152 THING_TYPE_SHELLYBUTTON1_STR);
153 public static final ThingTypeUID THING_TYPE_SHELLYBUTTON2 = new ThingTypeUID(BINDING_ID,
154 THING_TYPE_SHELLYBUTTON2_STR);
155 public static final ThingTypeUID THING_TYPE_SHELLYEYE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEYE_STR);
156 public static final ThingTypeUID THING_TYPE_SHELLMOTION = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYMOTION_STR);
157 public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_COLOR = new ThingTypeUID(BINDING_ID,
158 THING_TYPE_SHELLYRGBW2_COLOR_STR);
159 public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_WHITE = new ThingTypeUID(BINDING_ID,
160 THING_TYPE_SHELLYRGBW2_WHITE_STR);
161 public static final ThingTypeUID THING_TYPE_SHELLYPROTECTED = new ThingTypeUID(BINDING_ID,
162 THING_TYPE_SHELLYPROTECTED_STR);
163 public static final ThingTypeUID THING_TYPE_SHELLYUNKNOWN = new ThingTypeUID(BINDING_ID,
164 THING_TYPE_SHELLYUNKNOWN_STR);
166 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
167 .unmodifiableSet(Stream.of(THING_TYPE_SHELLY1, THING_TYPE_SHELLY1L, THING_TYPE_SHELLY1PM,
168 THING_TYPE_SHELLYEM, THING_TYPE_SHELLY3EM, THING_TYPE_SHELLY2_RELAY, THING_TYPE_SHELLY2_ROLLER,
169 THING_TYPE_SHELLY25_RELAY, THING_TYPE_SHELLY25_ROLLER, THING_TYPE_SHELLY4PRO, THING_TYPE_SHELLYPLUG,
170 THING_TYPE_SHELLYPLUGS, THING_TYPE_SHELLYPLUGU1, THING_TYPE_SHELLYUNI, THING_TYPE_SHELLYDIMMER,
171 THING_TYPE_SHELLYDIMMER2, THING_TYPE_SHELLYIX3, THING_TYPE_SHELLYBULB, THING_TYPE_SHELLYDUO,
172 THING_TYPE_SHELLYVINTAGE, THING_TYPE_SHELLYDUORGBW, THING_TYPE_SHELLYRGBW2_COLOR,
173 THING_TYPE_SHELLYRGBW2_WHITE, THING_TYPE_SHELLYHT, THING_TYPE_SHELLYTRV, THING_TYPE_SHELLYSENSE,
174 THING_TYPE_SHELLYEYE, THING_TYPE_SHELLYSMOKE, THING_TYPE_SHELLYGAS, THING_TYPE_SHELLYFLOOD,
175 THING_TYPE_SHELLYDOORWIN, THING_TYPE_SHELLYDOORWIN2, THING_TYPE_SHELLYBUTTON1,
176 THING_TYPE_SHELLYBUTTON2, THING_TYPE_SHELLMOTION, THING_TYPE_SHELLMOTION,
177 THING_TYPE_SHELLYPROTECTED, THING_TYPE_SHELLYUNKNOWN).collect(Collectors.toSet()));
179 // Thing Configuration Properties
180 public static final String CONFIG_DEVICEIP = "deviceIp";
181 public static final String CONFIG_HTTP_USERID = "userId";
182 public static final String CONFIG_HTTP_PASSWORD = "password";
183 public static final String CONFIG_UPDATE_INTERVAL = "updateInterval";
185 public static final String PROPERTY_SERVICE_NAME = "serviceName";
186 public static final String PROPERTY_DEV_NAME = "deviceName";
187 public static final String PROPERTY_DEV_TYPE = "deviceType";
188 public static final String PROPERTY_DEV_MODE = "deviceMode";
189 public static final String PROPERTY_HWREV = "deviceHwRev";
190 public static final String PROPERTY_HWBATCH = "deviceHwBatch";
191 public static final String PROPERTY_UPDATE_PERIOD = "devUpdatePeriod";
192 public static final String PROPERTY_NUM_RELAYS = "numberRelays";
193 public static final String PROPERTY_NUM_ROLLERS = "numberRollers";
194 public static final String PROPERTY_NUM_METER = "numberMeters";
195 public static final String PROPERTY_LAST_ACTIVE = "lastActive";
196 public static final String PROPERTY_WIFI_NETW = "wifiNetwork";
197 public static final String PROPERTY_UPDATE_STATUS = "updateStatus";
198 public static final String PROPERTY_UPDATE_AVAILABLE = "updateAvailable";
199 public static final String PROPERTY_UPDATE_CURR_VERS = "updateCurrentVersion";
200 public static final String PROPERTY_UPDATE_NEW_VERS = "updateNewVersion";
201 public static final String PROPERTY_COAP_DESCR = "coapDeviceDescr";
202 public static final String PROPERTY_COAP_VERSION = "coapVersion";
203 public static final String PROPERTY_COIOTAUTO = "coiotAutoEnable";
206 public static final String CHANNEL_GROUP_RELAY_CONTROL = "relay";
207 public static final String CHANNEL_OUTPUT_NAME = "outputName";
208 public static final String CHANNEL_OUTPUT = "output";
209 public static final String CHANNEL_INPUT = "input";
210 public static final String CHANNEL_INPUT1 = "input1";
211 public static final String CHANNEL_INPUT2 = "input2";
212 public static final String CHANNEL_BRIGHTNESS = "brightness";
214 public static final String CHANNEL_TIMER_AUTOON = "autoOn";
215 public static final String CHANNEL_TIMER_AUTOOFF = "autoOff";
216 public static final String CHANNEL_TIMER_ACTIVE = "timerActive";
219 public static final String CHANNEL_GROUP_ROL_CONTROL = "roller";
220 public static final String CHANNEL_ROL_CONTROL_CONTROL = "control";
221 public static final String CHANNEL_ROL_CONTROL_POS = "rollerpos";
222 public static final String CHANNEL_ROL_CONTROL_FAV = "rollerFav";
223 public static final String CHANNEL_ROL_CONTROL_TIMER = "timer";
224 public static final String CHANNEL_ROL_CONTROL_STATE = "state";
225 public static final String CHANNEL_ROL_CONTROL_STOPR = "stopReason";
226 public static final String CHANNEL_ROL_CONTROL_SAFETY = "safety";
229 public static final String CHANNEL_GROUP_DIMMER_CONTROL = CHANNEL_GROUP_RELAY_CONTROL;
232 public static final String CHANNEL_GROUP_METER = "meter";
233 public static final String CHANNEL_METER_CURRENTWATTS = "currentWatts";
234 public static final String CHANNEL_METER_LASTMIN = "lastPower";
235 public static final String CHANNEL_METER_LASTMIN1 = CHANNEL_METER_LASTMIN + "1";
236 public static final String CHANNEL_METER_TOTALKWH = "totalKWH";
237 public static final String CHANNEL_EMETER_TOTALRET = "returnedKWH";
238 public static final String CHANNEL_EMETER_REACTWATTS = "reactiveWatts";
239 public static final String CHANNEL_EMETER_VOLTAGE = "voltage";
240 public static final String CHANNEL_EMETER_CURRENT = "current";
241 public static final String CHANNEL_EMETER_PFACTOR = "powerFactor";
243 public static final String CHANNEL_GROUP_SENSOR = "sensors";
244 public static final String CHANNEL_SENSOR_TEMP = "temperature";
245 public static final String CHANNEL_SENSOR_HUM = "humidity";
246 public static final String CHANNEL_SENSOR_LUX = "lux";
247 public static final String CHANNEL_SENSOR_PPM = "ppm";
248 public static final String CHANNEL_SENSOR_VOLTAGE = "voltage";
249 public static final String CHANNEL_SENSOR_ILLUM = "illumination";
250 public static final String CHANNEL_SENSOR_VIBRATION = "vibration";
251 public static final String CHANNEL_SENSOR_TILT = "tilt";
252 public static final String CHANNEL_SENSOR_FLOOD = "flood";
253 public static final String CHANNEL_SENSOR_SMOKE = "smoke";
254 public static final String CHANNEL_SENSOR_STATE = "state";
255 public static final String CHANNEL_SENSOR_VALVE = "valve";
256 public static final String CHANNEL_SENSOR_SSTATE = "status"; // Shelly Gas
257 public static final String CHANNEL_SENSOR_MOTION_ACT = "motionActive";
258 public static final String CHANNEL_SENSOR_MOTION = "motion";
259 public static final String CHANNEL_SENSOR_MOTION_TS = "motionTimestamp";
260 public static final String CHANNEL_SENSOR_SLEEPTIME = "sensorSleepTime";
261 public static final String CHANNEL_SENSOR_ALARM_STATE = "alarmState";
262 public static final String CHANNEL_SENSOR_ERROR = "lastError";
264 public static final String CHANNEL_CONTROL_SETTEMP = "targetTemp"; // Shelly TRV: target temp
265 public static final String CHANNEL_CONTROL_POSITION = "position"; // Shelly TRV: Valve position
266 public static final String CHANNEL_CONTROL_MODE = "mode"; // Shelly TRV
267 public static final String CHANNEL_CONTROL_PROFILE = "profile"; // Shelly TRV
268 public static final String CHANNEL_CONTROL_BCONTROL = "boost"; // Shelly TRV
269 public static final String CHANNEL_CONTROL_BTIMER = "boostTimer"; // Shelly TRV
271 // External sensors for Shelly1/1PM
272 public static final String CHANNEL_ESENDOR_TEMP1 = CHANNEL_SENSOR_TEMP + "1";
273 public static final String CHANNEL_ESENDOR_TEMP2 = CHANNEL_SENSOR_TEMP + "2";
274 public static final String CHANNEL_ESENDOR_TEMP3 = CHANNEL_SENSOR_TEMP + "3";
275 public static final String CHANNEL_ESENDOR_HUMIDITY = CHANNEL_SENSOR_HUM;
277 public static final String CHANNEL_GROUP_CONTROL = "control";
278 public static final String CHANNEL_SENSE_KEY = "key";
280 public static final String CHANNEL_GROUP_BATTERY = "battery";
281 public static final String CHANNEL_SENSOR_BAT_LEVEL = "batteryLevel";
282 public static final String CHANNEL_SENSOR_BAT_LOW = "lowBattery";
284 public static final String CHANNEL_GROUP_LIGHT_CONTROL = "control";
285 public static final String CHANNEL_LIGHT_COLOR_MODE = "mode";
286 public static final String CHANNEL_LIGHT_POWER = "power";
287 public static final String CHANNEL_LIGHT_DEFSTATE = "defaultState";
288 public static final String CHANNEL_GROUP_LIGHT_CHANNEL = "channel";
290 // Bulb/RGBW2 in color mode
291 public static final String CHANNEL_GROUP_COLOR_CONTROL = "color";
292 public static final String CHANNEL_COLOR_PICKER = "hsb";
293 public static final String CHANNEL_COLOR_FULL = "full";
294 public static final String CHANNEL_COLOR_RED = "red";
295 public static final String CHANNEL_COLOR_GREEN = "green";
296 public static final String CHANNEL_COLOR_BLUE = "blue";
297 public static final String CHANNEL_COLOR_WHITE = "white";
298 public static final String CHANNEL_COLOR_GAIN = "gain";
299 public static final String CHANNEL_COLOR_EFFECT = "effect";
301 // Bulb/RGBW2/Dup in White Mode
302 public static final String CHANNEL_GROUP_WHITE_CONTROL = "white";
303 public static final String CHANNEL_COLOR_TEMP = "temperature";
306 public static final String CHANNEL_GROUP_DEV_STATUS = "device";
307 public static final String CHANNEL_DEVST_NAME = "deviceName";
308 public static final String CHANNEL_DEVST_UPTIME = "uptime";
309 public static final String CHANNEL_DEVST_HEARTBEAT = "heartBeat";
310 public static final String CHANNEL_DEVST_RSSI = "wifiSignal";
311 public static final String CHANNEL_DEVST_ITEMP = "internalTemp";
312 public static final String CHANNEL_DEVST_WAKEUP = "wakeupReason";
313 public static final String CHANNEL_DEVST_ALARM = "alarm";
314 public static final String CHANNEL_DEVST_ACCUWATTS = "accumulatedWatts";
315 public static final String CHANNEL_DEVST_ACCUTOTAL = "accumulatedWTotal";
316 public static final String CHANNEL_DEVST_ACCURETURNED = "accumulatedReturned";
317 public static final String CHANNEL_DEVST_CHARGER = "charger";
318 public static final String CHANNEL_DEVST_UPDATE = "updateAvailable";
319 public static final String CHANNEL_DEVST_SELFTTEST = "selfTest";
320 public static final String CHANNEL_DEVST_VOLTAGE = "supplyVoltage";
321 public static final String CHANNEL_DEVST_CALIBRATED = "calibrated";
322 public static final String CHANNEL_DEVST_SCHEDULE = "schedule";
324 public static final String CHANNEL_LED_STATUS_DISABLE = "statusLed";
325 public static final String CHANNEL_LED_POWER_DISABLE = "powerLed";
327 public static final String CHANNEL_GROUP_STATUS = "status";
328 public static final String CHANNEL_STATUS_EVENTTYPE = "lastEvent";
329 public static final String CHANNEL_STATUS_EVENTTYPE1 = CHANNEL_STATUS_EVENTTYPE + "1";
330 public static final String CHANNEL_STATUS_EVENTTYPE2 = CHANNEL_STATUS_EVENTTYPE + "2";
331 public static final String CHANNEL_STATUS_EVENTCOUNT = "eventCount";
332 public static final String CHANNEL_STATUS_EVENTCOUNT1 = CHANNEL_STATUS_EVENTCOUNT + "1";
333 public static final String CHANNEL_STATUS_EVENTCOUNT2 = CHANNEL_STATUS_EVENTCOUNT + "2";
336 public static final String CHANNEL_LAST_UPDATE = "lastUpdate";
337 public static final String CHANNEL_EVENT_TRIGGER = "event";
338 public static final String CHANNEL_BUTTON_TRIGGER = "button";
339 public static final String CHANNEL_BUTTON_TRIGGER1 = CHANNEL_BUTTON_TRIGGER + "1";
340 public static final String CHANNEL_BUTTON_TRIGGER2 = CHANNEL_BUTTON_TRIGGER + "2";
342 public static final String SERVICE_TYPE = "_http._tcp.local.";
343 public static final String SHELLY_API_MIN_FWVERSION = "v1.5.7";// v1.5.7+
344 public static final String SHELLY_API_MIN_FWCOIOT = "v1.6";// v1.6.0+
345 public static final String SHELLY_API_FWCOIOT2 = "v1.8";// CoAP 2 with FW 1.8+
346 public static final String SHELLY_API_FW_110 = "v1.10"; // FW 1.10 or newer detected, activates some add feature
348 // Alarm types/messages
349 public static final String ALARM_TYPE_NONE = "NONE";
350 public static final String ALARM_TYPE_RESTARTED = "RESTARTED";
351 public static final String ALARM_TYPE_OVERTEMP = "OVERTEMP";
352 public static final String ALARM_TYPE_OVERPOWER = "OVERPOWER";
353 public static final String ALARM_TYPE_OVERLOAD = "OVERLOAD";
354 public static final String ALARM_TYPE_LOADERR = "LOAD_ERROR";
355 public static final String ALARM_TYPE_SENSOR_ERROR = "SENSOR_ERROR";
356 public static final String ALARM_TYPE_LOW_BATTERY = "LOW_BATTERY";
357 public static final String ALARM_TYPE_VALVE_ERROR = "VALVE_ERROR";
358 public static final String EVENT_TYPE_VIBRATION = "VIBRATION";
361 public static final String EVENT_TYPE_RELAY = "relay";
362 public static final String EVENT_TYPE_ROLLER = "roller";
363 public static final String EVENT_TYPE_LIGHT = "light";
364 public static final String EVENT_TYPE_SENSORDATA = "report";
366 // URI for the EventServlet
367 public static final String SHELLY_CALLBACK_URI = "/shelly/event";
369 public static final int DIM_STEPSIZE = 5;
371 // Formatting: Number of scaling digits
372 public static final int DIGITS_NONE = 0;
373 public static final int DIGITS_WATT = 2;
374 public static final int DIGITS_KWH = 3;
375 public static final int DIGITS_VOLT = 1;
376 public static final int DIGITS_TEMP = 1;
377 public static final int DIGITS_LUX = 0;
378 public static final int DIGITS_PERCENT = 1;
380 public static final int SHELLY_API_TIMEOUT_MS = 15000;
381 public static final int UPDATE_STATUS_INTERVAL_SECONDS = 3; // check for updates every x sec
382 public static final int UPDATE_SKIP_COUNT = 20; // update every x triggers or when a key was pressed
383 public static final int UPDATE_MIN_DELAY = 15;// update every x triggers or when a key was pressed
384 public static final int UPDATE_SETTINGS_INTERVAL_SECONDS = 60; // check for updates every x sec
385 public static final int HEALTH_CHECK_INTERVAL_SEC = 300; // Health check interval, 5min
386 public static final int VIBRATION_FILTER_SEC = 5; // Absore duplicate vibration events for xx sec