]> git.basschouten.com Git - openhab-addons.git/blob
1c503bbad1febcf896561eb306170d6319ba67bc
[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.nest.internal.sdm;
14
15 import static java.util.Map.entry;
16
17 import java.util.Map;
18 import java.util.Set;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.binding.nest.internal.sdm.dto.SDMDeviceType;
22 import org.openhab.core.thing.ThingTypeUID;
23
24 /**
25  * The {@link SDMBindingConstants} class defines common constants, which are used for the SDM implementation in the
26  * binding.
27  *
28  * @author Brian Higginbotham - Initial contribution
29  * @author Wouter Born - Initial contribution
30  */
31 @NonNullByDefault
32 public class SDMBindingConstants {
33
34     private static final String BINDING_ID = "nest";
35
36     // List of all Thing Type UIDs
37     public static final ThingTypeUID THING_TYPE_ACCOUNT = new ThingTypeUID(BINDING_ID, "sdm_account");
38     public static final ThingTypeUID THING_TYPE_CAMERA = new ThingTypeUID(BINDING_ID, "sdm_camera");
39     public static final ThingTypeUID THING_TYPE_DISPLAY = new ThingTypeUID(BINDING_ID, "sdm_display");
40     public static final ThingTypeUID THING_TYPE_DOORBELL = new ThingTypeUID(BINDING_ID, "sdm_doorbell");
41     public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "sdm_thermostat");
42
43     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_ACCOUNT, THING_TYPE_CAMERA,
44             THING_TYPE_DISPLAY, THING_TYPE_DOORBELL, THING_TYPE_THERMOSTAT);
45
46     // Maps SDM device types to Thing Types UIDs
47     public static final Map<SDMDeviceType, ThingTypeUID> SDM_THING_TYPE_MAPPING = Map.ofEntries(
48             entry(SDMDeviceType.CAMERA, THING_TYPE_CAMERA), //
49             entry(SDMDeviceType.DISPLAY, THING_TYPE_DISPLAY), //
50             entry(SDMDeviceType.DOORBELL, THING_TYPE_DOORBELL), //
51             entry(SDMDeviceType.THERMOSTAT, THING_TYPE_THERMOSTAT));
52
53     // List of all Channel ids
54     public static final String CHANNEL_CHIME_EVENT_IMAGE = "chime_event#image";
55     public static final String CHANNEL_CHIME_EVENT_TIMESTAMP = "chime_event#timestamp";
56     public static final String CHANNEL_LIVE_STREAM_URL = "live_stream#url";
57     public static final String CHANNEL_LIVE_STREAM_CURRENT_TOKEN = "live_stream#current_token";
58     public static final String CHANNEL_LIVE_STREAM_EXPIRATION_TIMESTAMP = "live_stream#expiration_timestamp";
59     public static final String CHANNEL_LIVE_STREAM_EXTENSION_TOKEN = "live_stream#extension_token";
60     public static final String CHANNEL_MOTION_EVENT_IMAGE = "motion_event#image";
61     public static final String CHANNEL_MOTION_EVENT_TIMESTAMP = "motion_event#timestamp";
62     public static final String CHANNEL_PERSON_EVENT_IMAGE = "person_event#image";
63     public static final String CHANNEL_PERSON_EVENT_TIMESTAMP = "person_event#timestamp";
64     public static final String CHANNEL_SOUND_EVENT_IMAGE = "sound_event#image";
65     public static final String CHANNEL_SOUND_EVENT_TIMESTAMP = "sound_event#timestamp";
66
67     public static final String CHANNEL_AMBIENT_HUMIDITY = "ambient_humidity";
68     public static final String CHANNEL_AMBIENT_TEMPERATURE = "ambient_temperature";
69     public static final String CHANNEL_CURRENT_ECO_MODE = "current_eco_mode";
70     public static final String CHANNEL_CURRENT_MODE = "current_mode";
71     public static final String CHANNEL_FAN_TIMER_MODE = "fan_timer_mode";
72     public static final String CHANNEL_FAN_TIMER_TIMEOUT = "fan_timer_timeout";
73     public static final String CHANNEL_HVAC_STATUS = "hvac_status";
74     public static final String CHANNEL_MAXIMUM_TEMPERATURE = "maximum_temperature";
75     public static final String CHANNEL_MINIMUM_TEMPERATURE = "minimum_temperature";
76     public static final String CHANNEL_TARGET_TEMPERATURE = "target_temperature";
77
78     // List of all configuration property IDs
79     public static final String CONFIG_PROPERTY_FAN_TIMER_DURATION = "fanTimerDuration";
80     public static final String CONFIG_PROPERTY_IMAGE_HEIGHT = "imageHeight";
81     public static final String CONFIG_PROPERTY_IMAGE_WIDTH = "imageWidth";
82
83     // List of all property IDs
84     public static final String PROPERTY_AUDIO_CODECS = "audioCodecs";
85     public static final String PROPERTY_CUSTOM_NAME = "customName";
86     public static final String PROPERTY_MAX_IMAGE_RESOLUTION = "maxImageResolution";
87     public static final String PROPERTY_MAX_VIDEO_RESOLUTION = "maxVideoResolution";
88     public static final String PROPERTY_SUPPORTED_PROTOCOLS = "supportedProtocols";
89     public static final String PROPERTY_ROOM = "room";
90     public static final String PROPERTY_TEMPERATURE_SCALE = "temperatureScale";
91     public static final String PROPERTY_VIDEO_CODECS = "videoCodecs";
92 }