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.nest.internal.sdm;
15 import static java.util.Map.entry;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.binding.nest.internal.sdm.dto.SDMDeviceType;
22 import org.openhab.core.thing.ThingTypeUID;
25 * The {@link SDMBindingConstants} class defines common constants, which are used for the SDM implementation in the
28 * @author Brian Higginbotham - Initial contribution
29 * @author Wouter Born - Initial contribution
32 public class SDMBindingConstants {
34 private static final String BINDING_ID = "nest";
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");
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);
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));
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";
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";
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";
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";