]> git.basschouten.com Git - openhab-addons.git/blob
eb2ddfe99b92e1e99e9ea12b8d94261fd9cef2de
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.shelly.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
22
23 /**
24  * The {@link ShellyBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Markus Michels - Initial contribution
28  */
29 @NonNullByDefault
30 public class ShellyBindingConstants {
31
32     public static final String VENDOR = "Shelly";
33     public static final String BINDING_ID = "shelly";
34     public static final String SYSTEM_ID = "system";
35
36     // Type names
37     public static final String THING_TYPE_SHELLY1_STR = "shelly1";
38     public static final String THING_TYPE_SHELLY1PM_STR = "shelly1pm";
39     public static final String THING_TYPE_SHELLYEM_STR = "shellyem";
40     public static final String THING_TYPE_SHELLY3EM_STR = "shellyem3"; // bad: misspelled product name, it's 3EM
41     public static final String THING_TYPE_SHELLY2_PREFIX = "shellyswitch";
42     public static final String THING_TYPE_SHELLY2_RELAY_STR = "shelly2-relay";
43     public static final String THING_TYPE_SHELLY2_ROLLER_STR = "shelly2-roller";
44     public static final String THING_TYPE_SHELLY25_PREFIX = "shellyswitch25";
45     public static final String THING_TYPE_SHELLY25_RELAY_STR = "shelly25-relay";
46     public static final String THING_TYPE_SHELLY25_ROLLER_STR = "shelly25-roller";
47     public static final String THING_TYPE_SHELLY4PRO_STR = "shelly4pro";
48     public static final String THING_TYPE_SHELLYPLUG_STR = "shellyplug";
49     public static final String THING_TYPE_SHELLYPLUGS_STR = "shellyplugs";
50     public static final String THING_TYPE_SHELLYDIMMER_STR = "shellydimmer";
51     public static final String THING_TYPE_SHELLYDIMMER2_STR = "shellydimmer2";
52     public static final String THING_TYPE_SHELLYIX3_STR = "shellyix3";
53     public static final String THING_TYPE_SHELLYBULB_STR = "shellybulb";
54     public static final String THING_TYPE_SHELLYDUO_STR = "shellybulbduo";
55     public static final String THING_TYPE_SHELLYVINTAGE_STR = "shellyvintage";
56     public static final String THING_TYPE_SHELLYRGBW2_PREFIX = "shellyrgbw2";
57     public static final String THING_TYPE_SHELLYRGBW2_COLOR_STR = "shellyrgbw2-color";
58     public static final String THING_TYPE_SHELLYRGBW2_WHITE_STR = "shellyrgbw2-white";
59     public static final String THING_TYPE_SHELLYHT_STR = "shellyht";
60     public static final String THING_TYPE_SHELLYSMOKE_STR = "shellysmoke";
61     public static final String THING_TYPE_SHELLYGAS_STR = "shellygas";
62     public static final String THING_TYPE_SHELLYFLOOD_STR = "shellyflood";
63     public static final String THING_TYPE_SHELLYDOORWIN_STR = "shellydw";
64     public static final String THING_TYPE_SHELLYDOORWIN2_STR = "shellydw2";
65     public static final String THING_TYPE_SHELLYEYE_STR = "shellyseye";
66     public static final String THING_TYPE_SHELLYSENSE_STR = "shellysense";
67     public static final String THING_TYPE_SHELLYBUTTON1_STR = "shellybutton1";
68     public static final String THING_TYPE_SHELLYPROTECTED_STR = "shellydevice";
69     public static final String THING_TYPE_SHELLYUNKNOWN_STR = "shellyunknown";
70
71     // Device Types
72     public static final String SHELLYDT_1 = "SHSW-1";
73     public static final String SHELLYDT_1PM = "SHSW-PM";
74     public static final String SHELLYDT_SHPLG = "SHPLG-1";
75     public static final String SHELLYDT_SHPLG_S = "SHPLG-S";
76     public static final String SHELLYDT_SHELLY2 = "SHSW-21";
77     public static final String SHELLYDT_SHELLY25 = "SHSW-25";
78     public static final String SHELLYDT_SHPRO = "SHSW-44";
79     public static final String SHELLYDT_EM = "SHEM";
80     public static final String SHELLYDT_3EM = "SHEM-3";
81     public static final String SHELLYDT_HT = "SHHT-1";
82     public static final String SHELLYDT_DW = "SHDW-1";
83     public static final String SHELLYDT_DW2 = "SHDW-2";
84     public static final String SHELLYDT_SENSE = "SHSEN-1";
85     public static final String SHELLYDT_GAS = "SHGS-1";
86     public static final String SHELLYDT_DIMMER = "SHDM-1";
87     public static final String SHELLYDT_DIMMER2 = "SHDM-2";
88     public static final String SHELLYDT_IX3 = "SHIX3-1";
89     public static final String SHELLYDT_BULB = "SHBLB-1";
90     public static final String SHELLYDT_DUO = "SHBDUO-1";
91     public static final String SHELLYDT_VINTAGE = "SHVIN-1";
92     public static final String SHELLYDT_RGBW2 = "SHRGBW2";
93     public static final String SHELLYDT_BUTTON1 = "SHBTN-1";
94
95     // List of all Thing Type UIDs
96     public static final ThingTypeUID THING_TYPE_SHELLY1 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1_STR);
97     public static final ThingTypeUID THING_TYPE_SHELLY1PM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY1PM_STR);
98     public static final ThingTypeUID THING_TYPE_SHELLYEM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEM_STR);
99     public static final ThingTypeUID THING_TYPE_SHELLY3EM = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY3EM_STR);
100     public static final ThingTypeUID THING_TYPE_SHELLY2_RELAY = new ThingTypeUID(BINDING_ID,
101             THING_TYPE_SHELLY2_RELAY_STR);
102     public static final ThingTypeUID THING_TYPE_SHELLY2_ROLLER = new ThingTypeUID(BINDING_ID,
103             THING_TYPE_SHELLY2_ROLLER_STR);
104     public static final ThingTypeUID THING_TYPE_SHELLY25_RELAY = new ThingTypeUID(BINDING_ID,
105             THING_TYPE_SHELLY25_RELAY_STR);
106     public static final ThingTypeUID THING_TYPE_SHELLY25_ROLLER = new ThingTypeUID(BINDING_ID,
107             THING_TYPE_SHELLY25_ROLLER_STR);
108     public static final ThingTypeUID THING_TYPE_SHELLY4PRO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLY4PRO_STR);
109     public static final ThingTypeUID THING_TYPE_SHELLYPLUG = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUG_STR);
110     public static final ThingTypeUID THING_TYPE_SHELLYPLUGS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYPLUGS_STR);
111     public static final ThingTypeUID THING_TYPE_SHELLYDIMMER = new ThingTypeUID(BINDING_ID,
112             THING_TYPE_SHELLYDIMMER_STR);
113     public static final ThingTypeUID THING_TYPE_SHELLYDIMMER2 = new ThingTypeUID(BINDING_ID,
114             THING_TYPE_SHELLYDIMMER2_STR);
115     public static final ThingTypeUID THING_TYPE_SHELLYIX3 = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYIX3_STR);
116     public static final ThingTypeUID THING_TYPE_SHELLYBULB = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYBULB_STR);
117     public static final ThingTypeUID THING_TYPE_SHELLYDUO = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYDUO_STR);
118     public static final ThingTypeUID THING_TYPE_SHELLYVINTAGE = new ThingTypeUID(BINDING_ID,
119             THING_TYPE_SHELLYVINTAGE_STR);
120     public static final ThingTypeUID THING_TYPE_SHELLYHT = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYHT_STR);
121     public static final ThingTypeUID THING_TYPE_SHELLYSENSE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSENSE_STR);
122     public static final ThingTypeUID THING_TYPE_SHELLYSMOKE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYSMOKE_STR);
123     public static final ThingTypeUID THING_TYPE_SHELLYGAS = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYGAS_STR);
124     public static final ThingTypeUID THING_TYPE_SHELLYFLOOD = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYFLOOD_STR);
125     public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN = new ThingTypeUID(BINDING_ID,
126             THING_TYPE_SHELLYDOORWIN_STR);
127     public static final ThingTypeUID THING_TYPE_SHELLYDOORWIN2 = new ThingTypeUID(BINDING_ID,
128             THING_TYPE_SHELLYDOORWIN2_STR);
129     public static final ThingTypeUID THING_TYPE_SHELLYBUTTON1 = new ThingTypeUID(BINDING_ID,
130             THING_TYPE_SHELLYBUTTON1_STR);
131     public static final ThingTypeUID THING_TYPE_SHELLYEYE = new ThingTypeUID(BINDING_ID, THING_TYPE_SHELLYEYE_STR);
132     public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_COLOR = new ThingTypeUID(BINDING_ID,
133             THING_TYPE_SHELLYRGBW2_COLOR_STR);
134     public static final ThingTypeUID THING_TYPE_SHELLYRGBW2_WHITE = new ThingTypeUID(BINDING_ID,
135             THING_TYPE_SHELLYRGBW2_WHITE_STR);
136     public static final ThingTypeUID THING_TYPE_SHELLYPROTECTED = new ThingTypeUID(BINDING_ID,
137             THING_TYPE_SHELLYPROTECTED_STR);
138     public static final ThingTypeUID THING_TYPE_SHELLYUNKNOWN = new ThingTypeUID(BINDING_ID,
139             THING_TYPE_SHELLYUNKNOWN_STR);
140
141     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
142             .unmodifiableSet(Stream
143                     .of(THING_TYPE_SHELLY1, THING_TYPE_SHELLY1PM, THING_TYPE_SHELLYEM, THING_TYPE_SHELLY3EM,
144                             THING_TYPE_SHELLY2_RELAY, THING_TYPE_SHELLY2_ROLLER, THING_TYPE_SHELLY25_RELAY,
145                             THING_TYPE_SHELLY25_ROLLER, THING_TYPE_SHELLY4PRO, THING_TYPE_SHELLYPLUG,
146                             THING_TYPE_SHELLYPLUGS, THING_TYPE_SHELLYDIMMER, THING_TYPE_SHELLYDIMMER2,
147                             THING_TYPE_SHELLYIX3, THING_TYPE_SHELLYBULB, THING_TYPE_SHELLYDUO, THING_TYPE_SHELLYVINTAGE,
148                             THING_TYPE_SHELLYRGBW2_COLOR, THING_TYPE_SHELLYRGBW2_WHITE, THING_TYPE_SHELLYHT,
149                             THING_TYPE_SHELLYSENSE, THING_TYPE_SHELLYEYE, THING_TYPE_SHELLYSMOKE, THING_TYPE_SHELLYGAS,
150                             THING_TYPE_SHELLYFLOOD, THING_TYPE_SHELLYDOORWIN, THING_TYPE_SHELLYDOORWIN2,
151                             THING_TYPE_SHELLYBUTTON1, THING_TYPE_SHELLYPROTECTED, THING_TYPE_SHELLYUNKNOWN)
152                     .collect(Collectors.toSet()));
153
154     // Thing Configuration Properties
155     public static final String CONFIG_DEVICEIP = "deviceIp";
156     public static final String CONFIG_HTTP_USERID = "userId";
157     public static final String CONFIG_HTTP_PASSWORD = "password";
158     public static final String CONFIG_UPDATE_INTERVAL = "updateInterval";
159
160     public static final String PROPERTY_SERVICE_NAME = "serviceName";
161     public static final String PROPERTY_DEV_NAME = "deviceName";
162     public static final String PROPERTY_DEV_TYPE = "deviceType";
163     public static final String PROPERTY_DEV_MODE = "deviceMode";
164     public static final String PROPERTY_HWREV = "deviceHwRev";
165     public static final String PROPERTY_HWBATCH = "deviceHwBatch";
166     public static final String PROPERTY_UPDATE_PERIOD = "devUpdatePeriod";
167     public static final String PROPERTY_NUM_RELAYS = "numberRelays";
168     public static final String PROPERTY_NUM_ROLLERS = "numberRollers";
169     public static final String PROPERTY_NUM_METER = "numberMeters";
170     public static final String PROPERTY_LAST_ACTIVE = "lastActive";
171     public static final String PROPERTY_WIFI_NETW = "wifiNetwork";
172     public static final String PROPERTY_UPDATE_STATUS = "updateStatus";
173     public static final String PROPERTY_UPDATE_AVAILABLE = "updateAvailable";
174     public static final String PROPERTY_UPDATE_CURR_VERS = "updateCurrentVersion";
175     public static final String PROPERTY_UPDATE_NEW_VERS = "updateNewVersion";
176     public static final String PROPERTY_COAP_DESCR = "coapDeviceDescr";
177     public static final String PROPERTY_COAP_VERSION = "coapVersion";
178     public static final String PROPERTY_STATS_TIMEOUTS = "statsTimeoutErrors";
179     public static final String PROPERTY_STATS_TRECOVERED = "statsTimeoutsRecovered";
180     public static final String PROPERTY_COIOTAUTO = "coiotAutoEnable";
181     public static final String PROPERTY_COIOTREFRESH = "coiotAutoRefresh";
182
183     // Relay
184     public static final String CHANNEL_GROUP_RELAY_CONTROL = "relay";
185     public static final String CHANNEL_OUTPUT_NAME = "outputName";
186     public static final String CHANNEL_OUTPUT = "output";
187     public static final String CHANNEL_INPUT = "input";
188     public static final String CHANNEL_INPUT1 = "input1";
189     public static final String CHANNEL_INPUT2 = "input2";
190     public static final String CHANNEL_BRIGHTNESS = "brightness";
191
192     public static final String CHANNEL_TIMER_AUTOON = "autoOn";
193     public static final String CHANNEL_TIMER_AUTOOFF = "autoOff";
194     public static final String CHANNEL_TIMER_ACTIVE = "timerActive";
195
196     // Roller
197     public static final String CHANNEL_GROUP_ROL_CONTROL = "roller";
198     public static final String CHANNEL_ROL_CONTROL_CONTROL = "control";
199     public static final String CHANNEL_ROL_CONTROL_POS = "rollerpos";
200     public static final String CHANNEL_ROL_CONTROL_TIMER = "timer";
201     public static final String CHANNEL_ROL_CONTROL_STATE = "state";
202     public static final String CHANNEL_ROL_CONTROL_STOPR = "stopReason";
203
204     // Dimmer
205     public static final String CHANNEL_GROUP_DIMMER_CONTROL = CHANNEL_GROUP_RELAY_CONTROL;
206
207     // Power meter
208     public static final String CHANNEL_GROUP_METER = "meter";
209     public static final String CHANNEL_METER_CURRENTWATTS = "currentWatts";
210     public static final String CHANNEL_METER_LASTMIN = "lastPower";
211     public static final String CHANNEL_METER_LASTMIN1 = CHANNEL_METER_LASTMIN + "1";
212     public static final String CHANNEL_METER_TOTALKWH = "totalKWH";
213     public static final String CHANNEL_EMETER_TOTALRET = "returnedKWH";
214     public static final String CHANNEL_EMETER_REACTWATTS = "reactiveWatts";
215     public static final String CHANNEL_EMETER_VOLTAGE = "voltage";
216     public static final String CHANNEL_EMETER_CURRENT = "current";
217     public static final String CHANNEL_EMETER_PFACTOR = "powerFactor";
218
219     public static final String CHANNEL_GROUP_SENSOR = "sensors";
220     public static final String CHANNEL_SENSOR_TEMP = "temperature";
221     public static final String CHANNEL_SENSOR_HUM = "humidity";
222     public static final String CHANNEL_SENSOR_LUX = "lux";
223     public static final String CHANNEL_SENSOR_PPM = "ppm";
224     public static final String CHANNEL_SENSOR_ILLUM = "illumination";
225     public static final String CHANNEL_SENSOR_VIBRATION = "vibration";
226     public static final String CHANNEL_SENSOR_TILT = "tilt";
227     public static final String CHANNEL_SENSOR_FLOOD = "flood";
228     public static final String CHANNEL_SENSOR_SMOKE = "smoke";
229     public static final String CHANNEL_SENSOR_CONTACT = "state";
230     public static final String CHANNEL_SENSOR_VALVE = "valve";
231     public static final String CHANNEL_SENSOR_SSTATE = "status"; // Shelly Gas
232     public static final String CHANNEL_SENSOR_ALARM_STATE = "alarmState";
233     public static final String CHANNEL_SENSOR_MOTION = "motion";
234     public static final String CHANNEL_SENSOR_ERROR = "lastError";
235
236     // External sensors for Shelly1/1PM
237     public static final String CHANNEL_ESENDOR_TEMP1 = CHANNEL_SENSOR_TEMP + "1";
238     public static final String CHANNEL_ESENDOR_TEMP2 = CHANNEL_SENSOR_TEMP + "2";
239     public static final String CHANNEL_ESENDOR_TEMP3 = CHANNEL_SENSOR_TEMP + "3";
240     public static final String CHANNEL_ESENDOR_HUMIDITY = CHANNEL_SENSOR_HUM;
241
242     public static final String CHANNEL_GROUP_SENSE_CONTROL = "control";
243     public static final String CHANNEL_SENSE_KEY = "key";
244
245     public static final String CHANNEL_GROUP_BATTERY = "battery";
246     public static final String CHANNEL_SENSOR_BAT_LEVEL = "batteryLevel";
247     public static final String CHANNEL_SENSOR_BAT_LOW = "lowBattery";
248
249     public static final String CHANNEL_GROUP_LIGHT_CONTROL = "control";
250     public static final String CHANNEL_LIGHT_COLOR_MODE = "mode";
251     public static final String CHANNEL_LIGHT_POWER = "power";
252     public static final String CHANNEL_LIGHT_DEFSTATE = "defaultState";
253     public static final String CHANNEL_GROUP_LIGHT_CHANNEL = "channel";
254
255     // Bulb/RGBW2 in color mode
256     public static final String CHANNEL_GROUP_COLOR_CONTROL = "color";
257     public static final String CHANNEL_COLOR_PICKER = "hsb";
258     public static final String CHANNEL_COLOR_FULL = "full";
259     public static final String CHANNEL_COLOR_RED = "red";
260     public static final String CHANNEL_COLOR_GREEN = "green";
261     public static final String CHANNEL_COLOR_BLUE = "blue";
262     public static final String CHANNEL_COLOR_WHITE = "white";
263     public static final String CHANNEL_COLOR_GAIN = "gain";
264     public static final String CHANNEL_COLOR_EFFECT = "effect";
265
266     // Bulb/RGBW2/Dup in White Mode
267     public static final String CHANNEL_GROUP_WHITE_CONTROL = "white";
268     public static final String CHANNEL_COLOR_TEMP = "temperature";
269
270     // Device Status
271     public static final String CHANNEL_GROUP_DEV_STATUS = "device";
272     public static final String CHANNEL_DEVST_NAME = "deviceName";
273     public static final String CHANNEL_DEVST_UPTIME = "uptime";
274     public static final String CHANNEL_DEVST_HEARTBEAT = "heartBeat";
275     public static final String CHANNEL_DEVST_RSSI = "wifiSignal";
276     public static final String CHANNEL_DEVST_ITEMP = "internalTemp";
277     public static final String CHANNEL_DEVST_WAKEUP = "wakeupReason";
278     public static final String CHANNEL_DEVST_ALARM = "alarm";
279     public static final String CHANNEL_DEVST_ACCUWATTS = "accumulatedWatts";
280     public static final String CHANNEL_DEVST_ACCUTOTAL = "accumulatedWTotal";
281     public static final String CHANNEL_DEVST_ACCURETURNED = "accumulatedReturned";
282     public static final String CHANNEL_DEVST_CHARGER = "charger";
283     public static final String CHANNEL_DEVST_UPDATE = "updateAvailable";
284     public static final String CHANNEL_DEVST_SELFTTEST = "selfTest";
285
286     public static final String CHANNEL_LED_STATUS_DISABLE = "statusLed";
287     public static final String CHANNEL_LED_POWER_DISABLE = "powerLed";
288     // Button/xi3
289     public static final String CHANNEL_GROUP_STATUS = "status";
290     public static final String CHANNEL_STATUS_EVENTTYPE = "lastEvent";
291     public static final String CHANNEL_STATUS_EVENTCOUNT = "eventCount";
292
293     // General
294     public static final String CHANNEL_LAST_UPDATE = "lastUpdate";
295     public static final String CHANNEL_EVENT_TRIGGER = "event";
296     public static final String CHANNEL_BUTTON_TRIGGER = "button";
297
298     public static final String SERVICE_TYPE = "_http._tcp.local.";
299     public static final String SHELLY_API_MIN_FWVERSION = "v1.5.7";// v1.5.7+
300     public static final String SHELLY_API_MIN_FWCOIOT = "v1.6";// v1.6.0+
301     public static final String SHELLY_API_FWCOIOT2 = "v1.8";// CoAP 2 with FW 1.8+
302
303     // Alarm types/messages
304     public static final String ALARM_TYPE_NONE = "NONE";
305     public static final String ALARM_TYPE_RESTARTED = "RESTARTED";
306     public static final String ALARM_TYPE_OVERTEMP = "OVERTEMP";
307     public static final String ALARM_TYPE_OVERPOWER = "OVERPOWER";
308     public static final String ALARM_TYPE_OVERLOAD = "OVERLOAD";
309     public static final String ALARM_TYPE_LOADERR = "LOAD_ERROR";
310     public static final String ALARM_TYPE_LOW_BATTERY = "LOW_BATTERY";
311
312     // Event types
313     public static final String EVENT_TYPE_RELAY = "relay";
314     public static final String EVENT_TYPE_ROLLER = "roller";
315     public static final String EVENT_TYPE_LIGHT = "light";
316     public static final String EVENT_TYPE_SENSORDATA = "report";
317
318     // URI for the EventServlet
319     public static final String SHELLY_CALLBACK_URI = "/shelly/event";
320
321     public static final int DIM_STEPSIZE = 5;
322
323     // Formatting: Number of scaling digits
324     public static final int DIGITS_NONE = 0;
325     public static final int DIGITS_WATT = 1;
326     public static final int DIGITS_KWH = 3;
327     public static final int DIGITS_VOLT = 1;
328     public static final int DIGITS_TEMP = 1;
329     public static final int DIGITS_LUX = 1;
330     public static final int DIGITS_PERCENT = 1;
331
332     public static final int SHELLY_API_TIMEOUT_MS = 5000;
333     public static final int UPDATE_STATUS_INTERVAL_SECONDS = 3; // check for updates every x sec
334     public static final int UPDATE_SKIP_COUNT = 20; // update every x triggers or when a key was pressed
335     public static final int UPDATE_MIN_DELAY = 15;// update every x triggers or when a key was pressed
336     public static final int UPDATE_SETTINGS_INTERVAL_SECONDS = 60; // check for updates every x sec
337     public static final int HEALTH_CHECK_INTERVAL_SEC = 300; // Health check interval, 5min
338 }