2 * Copyright (c) 2010-2021 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_SHELLYMOTION_STR = "shellymotion";
71 public static final String THING_TYPE_SHELLYBUTTON1_STR = "shellybutton1";
72 public static final String THING_TYPE_SHELLYUNI_STR = "shellyuni";
73 public static final String THING_TYPE_SHELLYPROTECTED_STR = "shellydevice";
74 public static final String THING_TYPE_SHELLYUNKNOWN_STR = "shellyunknown";
77 public static final String SHELLYDT_1 = "SHSW-1";
78 public static final String SHELLYDT_1PM = "SHSW-PM";
79 public static final String SHELLYDT_1L = "SHSW-L";
80 public static final String SHELLYDT_SHPLG = "SHPLG-1";
81 public static final String SHELLYDT_SHPLG_S = "SHPLG-S";
82 public static final String SHELLYDT_SHPLG_U1 = "SHPLG-U1";
83 public static final String SHELLYDT_SHELLY2 = "SHSW-21";
84 public static final String SHELLYDT_SHELLY25 = "SHSW-25";
85 public static final String SHELLYDT_SHPRO = "SHSW-44";
86 public static final String SHELLYDT_EM = "SHEM";
87 public static final String SHELLYDT_3EM = "SHEM-3";
88 public static final String SHELLYDT_HT = "SHHT-1";
89 public static final String SHELLYDT_DW = "SHDW-1";
90 public static final String SHELLYDT_DW2 = "SHDW-2";
91 public static final String SHELLYDT_SENSE = "SHSEN-1";
92 public static final String SHELLYDT_MOTION = "SHMOS-01";
93 public static final String SHELLYDT_GAS = "SHGS-1";
94 public static final String SHELLYDT_DIMMER = "SHDM-1";
95 public static final String SHELLYDT_DIMMER2 = "SHDM-2";
96 public static final String SHELLYDT_IX3 = "SHIX3-1";
97 public static final String SHELLYDT_BULB = "SHBLB-1";
98 public static final String SHELLYDT_DUO = "SHBDUO-1";
99 public static final String SHELLYDT_DUORGBW = "SHCB-1";
100 public static final String SHELLYDT_VINTAGE = "SHVIN-1";
101 public static final String SHELLYDT_RGBW2 = "SHRGBW2";
102 public static final String SHELLYDT_BUTTON1 = "SHBTN-1";
103 public static final String SHELLYDT_UNI = "SHUNI-1";
105 // List of all Thing Type UIDs
106 public static final ThingTypeUID THING_TYPE_SHELLY1 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1_STR);
107 public static final ThingTypeUID THING_TYPE_SHELLY1L = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1L_STR);
108 public static final ThingTypeUID THING_TYPE_SHELLY1PM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1PM_STR);
109 public static final ThingTypeUID THING_TYPE_SHELLYEM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEM_STR);
110 public static final ThingTypeUID THING_TYPE_SHELLY3EM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY3EM_STR);
111 public static final ThingTypeUID THING_TYPE_SHELLY2_RELAY = new ThingTypeUID(BINDING_ID,
112 THING_TYPE_SHELLY2_RELAY_STR);
113 public static final ThingTypeUID THING_TYPE_SHELLY2_ROLLER = new ThingTypeUID(BINDING_ID,
114 THING_TYPE_SHELLY2_ROLLER_STR);
115 public static final ThingTypeUID THING_TYPE_SHELLY25_RELAY = new ThingTypeUID(BINDING_ID,
116 THING_TYPE_SHELLY25_RELAY_STR);
117 public static final ThingTypeUID THING_TYPE_SHELLY25_ROLLER = new ThingTypeUID(BINDING_ID,
118 THING_TYPE_SHELLY25_ROLLER_STR);
119 public static final ThingTypeUID THING_TYPE_SHELLY4PRO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY4PRO_STR);
120 public static final ThingTypeUID THING_TYPE_SHELLYPLUG = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUG_STR);
121 public static final ThingTypeUID THING_TYPE_SHELLYPLUGS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUGS_STR);
122 public static final ThingTypeUID THING_TYPE_SHELLYPLUGU1 = new ThingTypeUID(BINDING_ID,
123 THING_TYPE_SHELLYPLUGU1_STR);
124 public static final ThingTypeUID THING_TYPE_SHELLYUNI = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYUNI_STR);
125 public static final ThingTypeUID THING_TYPE_SHELLYDIMMER = new ThingTypeUID(BINDING_ID,
126 THING_TYPE_SHELLYDIMMER_STR);
127 public static final ThingTypeUID THING_TYPE_SHELLYDIMMER2 = new ThingTypeUID(BINDING_ID,
128 THING_TYPE_SHELLYDIMMER2_STR);
129 public static final ThingTypeUID THING_TYPE_SHELLYIX3 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYIX3_STR);
130 public static final ThingTypeUID THING_TYPE_SHELLYBULB = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYBULB_STR);
131 public static final ThingTypeUID THING_TYPE_SHELLYDUO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYDUO_STR);
132 public static final ThingTypeUID THING_TYPE_SHELLYVINTAGE = new ThingTypeUID(BINDING_ID,
133 THING_TYPE_SHELLYVINTAGE_STR);
134 public static final ThingTypeUID THING_TYPE_SHELLYDUORGBW = new ThingTypeUID(BINDING_ID,
135 THING_TYPE_SHELLYDUORGBW_STR);
136 public static final ThingTypeUID THING_TYPE_SHELLYHT = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYHT_STR);
137 public static final ThingTypeUID THING_TYPE_SHELLYSENSE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSENSE_STR);
138 public static final ThingTypeUID THING_TYPE_SHELLYSMOKE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSMOKE_STR);
139 public static final ThingTypeUID THING_TYPE_SHELLYGAS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYGAS_STR);
140 public static final ThingTypeUID THING_TYPE_SHELLYFLOOD = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYFLOOD_STR);
141 public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN = new ThingTypeUID(BINDING_ID,
142 THING_TYPE_SHELLYDOORWIN_STR);
143 public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN2 = new ThingTypeUID(BINDING_ID,
144 THING_TYPE_SHELLYDOORWIN2_STR);
145 public static final ThingTypeUID THING_TYPE_SHELLYBUTTON1 = new ThingTypeUID(BINDING_ID,
146 THING_TYPE_SHELLYBUTTON1_STR);
147 public static final ThingTypeUID THING_TYPE_SHELLYEYE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEYE_STR);
148 public static final ThingTypeUID THING_TYPE_SHELLMOTION = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYMOTION_STR);
149 public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_COLOR = new ThingTypeUID(BINDING_ID,
150 THING_TYPE_SHELLYRGBW2_COLOR_STR);
151 public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_WHITE = new ThingTypeUID(BINDING_ID,
152 THING_TYPE_SHELLYRGBW2_WHITE_STR);
153 public static final ThingTypeUID THING_TYPE_SHELLYPROTECTED = new ThingTypeUID(BINDING_ID,
154 THING_TYPE_SHELLYPROTECTED_STR);
155 public static final ThingTypeUID THING_TYPE_SHELLYUNKNOWN = new ThingTypeUID(BINDING_ID,
156 THING_TYPE_SHELLYUNKNOWN_STR);
158 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
159 .unmodifiableSet(Stream.of(THING_TYPE_SHELLY1, THING_TYPE_SHELLY1L, THING_TYPE_SHELLY1PM,
160 THING_TYPE_SHELLYEM, THING_TYPE_SHELLY3EM, THING_TYPE_SHELLY2_RELAY, THING_TYPE_SHELLY2_ROLLER,
161 THING_TYPE_SHELLY25_RELAY, THING_TYPE_SHELLY25_ROLLER, THING_TYPE_SHELLY4PRO, THING_TYPE_SHELLYPLUG,
162 THING_TYPE_SHELLYPLUGS, THING_TYPE_SHELLYPLUGU1, THING_TYPE_SHELLYUNI, THING_TYPE_SHELLYDIMMER,
163 THING_TYPE_SHELLYDIMMER2, THING_TYPE_SHELLYIX3, THING_TYPE_SHELLYBULB, THING_TYPE_SHELLYDUO,
164 THING_TYPE_SHELLYVINTAGE, THING_TYPE_SHELLYDUORGBW, THING_TYPE_SHELLYRGBW2_COLOR,
165 THING_TYPE_SHELLYRGBW2_WHITE, THING_TYPE_SHELLYHT, THING_TYPE_SHELLYSENSE, THING_TYPE_SHELLYEYE,
166 THING_TYPE_SHELLYSMOKE, THING_TYPE_SHELLYGAS, THING_TYPE_SHELLYFLOOD, THING_TYPE_SHELLYDOORWIN,
167 THING_TYPE_SHELLYDOORWIN2, THING_TYPE_SHELLYBUTTON1, THING_TYPE_SHELLMOTION,
168 THING_TYPE_SHELLYPROTECTED, THING_TYPE_SHELLYUNKNOWN).collect(Collectors.toSet()));
170 // Thing Configuration Properties
171 public static final String CONFIG_DEVICEIP = "deviceIp";
172 public static final String CONFIG_HTTP_USERID = "userId";
173 public static final String CONFIG_HTTP_PASSWORD = "password";
174 public static final String CONFIG_UPDATE_INTERVAL = "updateInterval";
176 public static final String PROPERTY_SERVICE_NAME = "serviceName";
177 public static final String PROPERTY_DEV_NAME = "deviceName";
178 public static final String PROPERTY_DEV_TYPE = "deviceType";
179 public static final String PROPERTY_DEV_MODE = "deviceMode";
180 public static final String PROPERTY_HWREV = "deviceHwRev";
181 public static final String PROPERTY_HWBATCH = "deviceHwBatch";
182 public static final String PROPERTY_UPDATE_PERIOD = "devUpdatePeriod";
183 public static final String PROPERTY_NUM_RELAYS = "numberRelays";
184 public static final String PROPERTY_NUM_ROLLERS = "numberRollers";
185 public static final String PROPERTY_NUM_METER = "numberMeters";
186 public static final String PROPERTY_LAST_ACTIVE = "lastActive";
187 public static final String PROPERTY_WIFI_NETW = "wifiNetwork";
188 public static final String PROPERTY_UPDATE_STATUS = "updateStatus";
189 public static final String PROPERTY_UPDATE_AVAILABLE = "updateAvailable";
190 public static final String PROPERTY_UPDATE_CURR_VERS = "updateCurrentVersion";
191 public static final String PROPERTY_UPDATE_NEW_VERS = "updateNewVersion";
192 public static final String PROPERTY_COAP_DESCR = "coapDeviceDescr";
193 public static final String PROPERTY_COAP_VERSION = "coapVersion";
194 public static final String PROPERTY_COIOTAUTO = "coiotAutoEnable";
197 public static final String CHANNEL_GROUP_RELAY_CONTROL = "relay";
198 public static final String CHANNEL_OUTPUT_NAME = "outputName";
199 public static final String CHANNEL_OUTPUT = "output";
200 public static final String CHANNEL_INPUT = "input";
201 public static final String CHANNEL_INPUT1 = "input1";
202 public static final String CHANNEL_INPUT2 = "input2";
203 public static final String CHANNEL_BRIGHTNESS = "brightness";
205 public static final String CHANNEL_TIMER_AUTOON = "autoOn";
206 public static final String CHANNEL_TIMER_AUTOOFF = "autoOff";
207 public static final String CHANNEL_TIMER_ACTIVE = "timerActive";
210 public static final String CHANNEL_GROUP_ROL_CONTROL = "roller";
211 public static final String CHANNEL_ROL_CONTROL_CONTROL = "control";
212 public static final String CHANNEL_ROL_CONTROL_POS = "rollerpos";
213 public static final String CHANNEL_ROL_CONTROL_FAV = "rollerFav";
214 public static final String CHANNEL_ROL_CONTROL_TIMER = "timer";
215 public static final String CHANNEL_ROL_CONTROL_STATE = "state";
216 public static final String CHANNEL_ROL_CONTROL_STOPR = "stopReason";
217 public static final String CHANNEL_ROL_CONTROL_SAFETY = "safety";
220 public static final String CHANNEL_GROUP_DIMMER_CONTROL = CHANNEL_GROUP_RELAY_CONTROL;
223 public static final String CHANNEL_GROUP_METER = "meter";
224 public static final String CHANNEL_METER_CURRENTWATTS = "currentWatts";
225 public static final String CHANNEL_METER_LASTMIN = "lastPower";
226 public static final String CHANNEL_METER_LASTMIN1 = CHANNEL_METER_LASTMIN + "1";
227 public static final String CHANNEL_METER_TOTALKWH = "totalKWH";
228 public static final String CHANNEL_EMETER_TOTALRET = "returnedKWH";
229 public static final String CHANNEL_EMETER_REACTWATTS = "reactiveWatts";
230 public static final String CHANNEL_EMETER_VOLTAGE = "voltage";
231 public static final String CHANNEL_EMETER_CURRENT = "current";
232 public static final String CHANNEL_EMETER_PFACTOR = "powerFactor";
234 public static final String CHANNEL_GROUP_SENSOR = "sensors";
235 public static final String CHANNEL_SENSOR_TEMP = "temperature";
236 public static final String CHANNEL_SENSOR_HUM = "humidity";
237 public static final String CHANNEL_SENSOR_LUX = "lux";
238 public static final String CHANNEL_SENSOR_PPM = "ppm";
239 public static final String CHANNEL_SENSOR_VOLTAGE = "voltage";
240 public static final String CHANNEL_SENSOR_ILLUM = "illumination";
241 public static final String CHANNEL_SENSOR_VIBRATION = "vibration";
242 public static final String CHANNEL_SENSOR_TILT = "tilt";
243 public static final String CHANNEL_SENSOR_FLOOD = "flood";
244 public static final String CHANNEL_SENSOR_SMOKE = "smoke";
245 public static final String CHANNEL_SENSOR_CONTACT = "state";
246 public static final String CHANNEL_SENSOR_VALVE = "valve";
247 public static final String CHANNEL_SENSOR_SSTATE = "status"; // Shelly Gas
248 public static final String CHANNEL_SENSOR_ALARM_STATE = "alarmState";
249 public static final String CHANNEL_SENSOR_MOTION_ACT = "motionActive";
250 public static final String CHANNEL_SENSOR_MOTION = "motion";
251 public static final String CHANNEL_SENSOR_MOTION_TS = "motionTimestamp";
252 public static final String CHANNEL_SENSOR_SLEEPTIME = "sensorSleepTime";
253 public static final String CHANNEL_SENSOR_ERROR = "lastError";
255 // External sensors for Shelly1/1PM
256 public static final String CHANNEL_ESENDOR_TEMP1 = CHANNEL_SENSOR_TEMP + "1";
257 public static final String CHANNEL_ESENDOR_TEMP2 = CHANNEL_SENSOR_TEMP + "2";
258 public static final String CHANNEL_ESENDOR_TEMP3 = CHANNEL_SENSOR_TEMP + "3";
259 public static final String CHANNEL_ESENDOR_HUMIDITY = CHANNEL_SENSOR_HUM;
261 public static final String CHANNEL_GROUP_SENSE_CONTROL = "control";
262 public static final String CHANNEL_SENSE_KEY = "key";
264 public static final String CHANNEL_GROUP_BATTERY = "battery";
265 public static final String CHANNEL_SENSOR_BAT_LEVEL = "batteryLevel";
266 public static final String CHANNEL_SENSOR_BAT_LOW = "lowBattery";
268 public static final String CHANNEL_GROUP_LIGHT_CONTROL = "control";
269 public static final String CHANNEL_LIGHT_COLOR_MODE = "mode";
270 public static final String CHANNEL_LIGHT_POWER = "power";
271 public static final String CHANNEL_LIGHT_DEFSTATE = "defaultState";
272 public static final String CHANNEL_GROUP_LIGHT_CHANNEL = "channel";
274 // Bulb/RGBW2 in color mode
275 public static final String CHANNEL_GROUP_COLOR_CONTROL = "color";
276 public static final String CHANNEL_COLOR_PICKER = "hsb";
277 public static final String CHANNEL_COLOR_FULL = "full";
278 public static final String CHANNEL_COLOR_RED = "red";
279 public static final String CHANNEL_COLOR_GREEN = "green";
280 public static final String CHANNEL_COLOR_BLUE = "blue";
281 public static final String CHANNEL_COLOR_WHITE = "white";
282 public static final String CHANNEL_COLOR_GAIN = "gain";
283 public static final String CHANNEL_COLOR_EFFECT = "effect";
285 // Bulb/RGBW2/Dup in White Mode
286 public static final String CHANNEL_GROUP_WHITE_CONTROL = "white";
287 public static final String CHANNEL_COLOR_TEMP = "temperature";
290 public static final String CHANNEL_GROUP_DEV_STATUS = "device";
291 public static final String CHANNEL_DEVST_NAME = "deviceName";
292 public static final String CHANNEL_DEVST_UPTIME = "uptime";
293 public static final String CHANNEL_DEVST_HEARTBEAT = "heartBeat";
294 public static final String CHANNEL_DEVST_RSSI = "wifiSignal";
295 public static final String CHANNEL_DEVST_ITEMP = "internalTemp";
296 public static final String CHANNEL_DEVST_WAKEUP = "wakeupReason";
297 public static final String CHANNEL_DEVST_ALARM = "alarm";
298 public static final String CHANNEL_DEVST_ACCUWATTS = "accumulatedWatts";
299 public static final String CHANNEL_DEVST_ACCUTOTAL = "accumulatedWTotal";
300 public static final String CHANNEL_DEVST_ACCURETURNED = "accumulatedReturned";
301 public static final String CHANNEL_DEVST_CHARGER = "charger";
302 public static final String CHANNEL_DEVST_UPDATE = "updateAvailable";
303 public static final String CHANNEL_DEVST_SELFTTEST = "selfTest";
304 public static final String CHANNEL_DEVST_VOLTAGE = "supplyVoltage";
306 public static final String CHANNEL_LED_STATUS_DISABLE = "statusLed";
307 public static final String CHANNEL_LED_POWER_DISABLE = "powerLed";
309 public static final String CHANNEL_GROUP_STATUS = "status";
310 public static final String CHANNEL_STATUS_EVENTTYPE = "lastEvent";
311 public static final String CHANNEL_STATUS_EVENTTYPE1 = CHANNEL_STATUS_EVENTTYPE + "1";
312 public static final String CHANNEL_STATUS_EVENTTYPE2 = CHANNEL_STATUS_EVENTTYPE + "2";
313 public static final String CHANNEL_STATUS_EVENTCOUNT = "eventCount";
314 public static final String CHANNEL_STATUS_EVENTCOUNT1 = CHANNEL_STATUS_EVENTCOUNT + "1";
315 public static final String CHANNEL_STATUS_EVENTCOUNT2 = CHANNEL_STATUS_EVENTCOUNT + "2";
318 public static final String CHANNEL_LAST_UPDATE = "lastUpdate";
319 public static final String CHANNEL_EVENT_TRIGGER = "event";
320 public static final String CHANNEL_BUTTON_TRIGGER = "button";
321 public static final String CHANNEL_BUTTON_TRIGGER1 = CHANNEL_BUTTON_TRIGGER + "1";
322 public static final String CHANNEL_BUTTON_TRIGGER2 = CHANNEL_BUTTON_TRIGGER + "2";
324 public static final String SERVICE_TYPE = "_http._tcp.local.";
325 public static final String SHELLY_API_MIN_FWVERSION = "v1.5.7";// v1.5.7+
326 public static final String SHELLY_API_MIN_FWCOIOT = "v1.6";// v1.6.0+
327 public static final String SHELLY_API_FWCOIOT2 = "v1.8";// CoAP 2 with FW 1.8+
328 public static final String SHELLY_API_FW_110 = "v1.10"; // FW 1.10 or newer detected, activates some add feature
330 // Alarm types/messages
331 public static final String ALARM_TYPE_NONE = "NONE";
332 public static final String ALARM_TYPE_RESTARTED = "RESTARTED";
333 public static final String ALARM_TYPE_OVERTEMP = "OVERTEMP";
334 public static final String ALARM_TYPE_OVERPOWER = "OVERPOWER";
335 public static final String ALARM_TYPE_OVERLOAD = "OVERLOAD";
336 public static final String ALARM_TYPE_LOADERR = "LOAD_ERROR";
337 public static final String ALARM_TYPE_SENSOR_ERROR = "SENSOR_ERROR";
338 public static final String ALARM_TYPE_LOW_BATTERY = "LOW_BATTERY";
339 public static final String EVENT_TYPE_VIBRATION = "VIBRATION";
342 public static final String EVENT_TYPE_RELAY = "relay";
343 public static final String EVENT_TYPE_ROLLER = "roller";
344 public static final String EVENT_TYPE_LIGHT = "light";
345 public static final String EVENT_TYPE_SENSORDATA = "report";
347 // URI for the EventServlet
348 public static final String SHELLY_CALLBACK_URI = "/shelly/event";
350 public static final int DIM_STEPSIZE = 5;
352 // Formatting: Number of scaling digits
353 public static final int DIGITS_NONE = 0;
354 public static final int DIGITS_WATT = 2;
355 public static final int DIGITS_KWH = 3;
356 public static final int DIGITS_VOLT = 1;
357 public static final int DIGITS_TEMP = 1;
358 public static final int DIGITS_LUX = 0;
359 public static final int DIGITS_PERCENT = 1;
361 public static final int SHELLY_API_TIMEOUT_MS = 5000;
362 public static final int UPDATE_STATUS_INTERVAL_SECONDS = 3; // check for updates every x sec
363 public static final int UPDATE_SKIP_COUNT = 20; // update every x triggers or when a key was pressed
364 public static final int UPDATE_MIN_DELAY = 15;// update every x triggers or when a key was pressed
365 public static final int UPDATE_SETTINGS_INTERVAL_SECONDS = 60; // check for updates every x sec
366 public static final int HEALTH_CHECK_INTERVAL_SEC = 300; // Health check interval, 5min
367 public static final int VIBRATION_FILTER_SEC = 5; // Absore duplicate vibration events for xx sec