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.wemo.internal;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
21 * The {@link WemoBinding} class defines common constants, which are
22 * used across the whole binding.
24 * @author Hans-Jörg Merk - Initial contribution
25 * @author Mihir Patil - Added standby switch
28 public class WemoBindingConstants {
30 public static final String BINDING_ID = "wemo";
32 // List of all Thing Type UIDs
33 public static final ThingTypeUID THING_TYPE_SOCKET = new ThingTypeUID(BINDING_ID, "socket");
34 public static final ThingTypeUID THING_TYPE_INSIGHT = new ThingTypeUID(BINDING_ID, "insight");
35 public static final ThingTypeUID THING_TYPE_LIGHTSWITCH = new ThingTypeUID(BINDING_ID, "lightswitch");
36 public static final ThingTypeUID THING_TYPE_MOTION = new ThingTypeUID(BINDING_ID, "motion");
37 public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
38 public static final ThingTypeUID THING_TYPE_MZ100 = new ThingTypeUID(BINDING_ID, "MZ100");
39 public static final ThingTypeUID THING_TYPE_MAKER = new ThingTypeUID(BINDING_ID, "Maker");
40 public static final ThingTypeUID THING_TYPE_COFFEE = new ThingTypeUID(BINDING_ID, "CoffeeMaker");
41 public static final ThingTypeUID THING_TYPE_DIMMER = new ThingTypeUID(BINDING_ID, "dimmer");
42 public static final ThingTypeUID THING_TYPE_CROCKPOT = new ThingTypeUID(BINDING_ID, "Crockpot");
43 public static final ThingTypeUID THING_TYPE_PURIFIER = new ThingTypeUID(BINDING_ID, "Purifier");
44 public static final ThingTypeUID THING_TYPE_HUMIDIFIER = new ThingTypeUID(BINDING_ID, "Humidifier");
45 public static final ThingTypeUID THING_TYPE_HEATER = new ThingTypeUID(BINDING_ID, "Heater");
47 // List of all Channel ids
48 public static final String CHANNEL_STATE = "state";
49 public static final String CHANNEL_MOTION_DETECTION = "motionDetection";
50 public static final String CHANNEL_LAST_MOTION_DETECTED = "lastMotionDetected";
51 public static final String CHANNEL_LAST_CHANGED_AT = "lastChangedAt";
52 public static final String CHANNEL_LAST_ON_FOR = "lastOnFor";
53 public static final String CHANNEL_ON_TODAY = "onToday";
54 public static final String CHANNEL_ON_TOTAL = "onTotal";
55 public static final String CHANNEL_TIMESPAN = "timespan";
56 public static final String CHANNEL_AVERAGE_POWER = "averagePower";
57 public static final String CHANNEL_CURRENT_POWER = "currentPower";
58 public static final String CHANNEL_CURRENT_POWER_RAW = "currentPowerRaw";
59 public static final String CHANNEL_ENERGY_TODAY = "energyToday";
60 public static final String CHANNEL_ENERGY_TOTAL = "energyTotal";
61 public static final String CHANNEL_STAND_BY_LIMIT = "standByLimit";
62 public static final String CHANNEL_BRIGHTNESS = "brightness";
63 public static final String CHANNEL_RELAY = "relay";
64 public static final String CHANNEL_SENSOR = "sensor";
65 public static final String CHANNEL_ON_STAND_BY = "onStandBy";
67 public static final String CHANNEL_COFFEE_MODE = "coffeeMode";
68 public static final String CHANNEL_MODE_TIME = "modeTime";
69 public static final String CHANNEL_TIME_REMAINING = "timeRemaining";
70 public static final String CHANNEL_WATER_LEVEL_REACHED = "waterLevelReached";
71 public static final String CHANNEL_CLEAN_ADVISE = "cleanAdvise";
72 public static final String CHANNEL_FILTER_ADVISE = "filterAdvise";
73 public static final String CHANNEL_BREWED = "brewed";
74 public static final String CHANNEL_LAST_CLEANED = "lastCleaned";
76 public static final String CHANNEL_FADER_ENABLED = "faderEnabled";
77 public static final String CHANNEL_TIMER_START = "timerStart";
78 public static final String CHANNEL_FADER_COUNT_DOWN_TIME = "faderCountDownTime";
79 public static final String CHANNEL_NIGHT_MODE = "nightMode";
80 public static final String CHANNEL_START_TIME = "startTime";
81 public static final String CHANNEL_END_TIME = "endTime";
82 public static final String CHANNEL_NIGHT_MODE_BRIGHTNESS = "nightModeBrightness";
84 public static final String CHANNEL_COOK_MODE = "cookMode";
85 public static final String CHANNEL_LOW_COOK_TIME = "lowCookTime";
86 public static final String CHANNEL_WARM_COOK_TIME = "warmCooktime";
87 public static final String CHANNEL_HIGHCOOKTIME = "highCooktime";
88 public static final String CHANNEL_COOKED_TIME = "cookedtime";
90 public static final String CHANNEL_PURIFIER_MODE = "purifierMode";
91 public static final String CHANNEL_AIR_QUALITY = "airQuality";
92 public static final String CHANNEL_IONIZER = "ionizer";
93 public static final String CHANNEL_FILTER_LIFE = "filterLife";
94 public static final String CHANNEL_EXPIRED_FILTER_TIME = "expiredFilterTime";
95 public static final String CHANNEL_FILTER_PRESENT = "filterPresent";
97 public static final String CHANNEL_HUMIDIFIER_MODE = "humidifierMode";
98 public static final String CHANNEL_CURRENT_HUMIDITY = "currentHumidity";
99 public static final String CHANNEL_DESIRED_HUMIDITY = "desiredHumidity";
100 public static final String CHANNEL_WATER_LEVEL = "waterLEvel";
102 public static final String CHANNEL_HEATER_MODE = "heaterMode";
103 public static final String CHANNEL_CURRENT_TEMPERATURE = "currentTemperature";
104 public static final String CHANNEL_TARGET_TEMPERATURE = "targetTemperature";
105 public static final String CHANNEL_AUTO_OFF_TIME = "autoOffTime";
106 public static final String CHANNEL_HEATING_REMAINING = "heatingRemaining";
108 // List of thing configuration properties
109 public static final String UDN = "udn";
110 public static final String DEVICE_ID = "deviceID";
111 public static final String POLLING_INTERVAL = "pollingInterval";
112 public static final int DEFAULT_REFRESH_INTERVAL_SECONDS = 60;
113 public static final int SUBSCRIPTION_DURATION_SECONDS = 1800;
114 public static final int LINK_DISCOVERY_SERVICE_INITIAL_DELAY = 5;
115 public static final String HTTP_CALL_CONTENT_HEADER = "text/xml; charset=utf-8";
117 public static final String BASICACTION = "basicevent";
118 public static final String BASICEVENT = "basicevent1";
119 public static final String BRIDGEACTION = "bridge";
120 public static final String BRIDGEEVENT = "bridge1";
121 public static final String DEVICEACTION = "deviceevent";
122 public static final String DEVICEEVENT = "deviceevent1";
123 public static final String INSIGHTACTION = "insight";
124 public static final String INSIGHTEVENT = "insight1";
126 public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES = Set.of(THING_TYPE_BRIDGE);
128 public static final Set<ThingTypeUID> SUPPORTED_LIGHT_THING_TYPES = Set.of(THING_TYPE_MZ100);
130 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Set.of(THING_TYPE_SOCKET, THING_TYPE_INSIGHT,
131 THING_TYPE_LIGHTSWITCH, THING_TYPE_MOTION, THING_TYPE_BRIDGE, THING_TYPE_MZ100, THING_TYPE_MAKER,
132 THING_TYPE_COFFEE, THING_TYPE_DIMMER, THING_TYPE_CROCKPOT, THING_TYPE_PURIFIER, THING_TYPE_HUMIDIFIER,