]> git.basschouten.com Git - openhab-addons.git/blob
5b461e9078f225c43efc237ca2d53b994396965f
[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.deconz.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link BindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author David Graeff - Initial contribution
23  */
24 @NonNullByDefault
25 public class BindingConstants {
26
27     public static final String BINDING_ID = "deconz";
28
29     // List of all Thing Type UIDs
30     public static final ThingTypeUID BRIDGE_TYPE = new ThingTypeUID(BINDING_ID, "deconz");
31
32     // sensors
33     public static final ThingTypeUID THING_TYPE_PRESENCE_SENSOR = new ThingTypeUID(BINDING_ID, "presencesensor");
34     public static final ThingTypeUID THING_TYPE_POWER_SENSOR = new ThingTypeUID(BINDING_ID, "powersensor");
35     public static final ThingTypeUID THING_TYPE_CONSUMPTION_SENSOR = new ThingTypeUID(BINDING_ID, "consumptionsensor");
36     public static final ThingTypeUID THING_TYPE_DAYLIGHT_SENSOR = new ThingTypeUID(BINDING_ID, "daylightsensor");
37     public static final ThingTypeUID THING_TYPE_COLOR_CONTROL = new ThingTypeUID(BINDING_ID, "colorcontrol");
38     public static final ThingTypeUID THING_TYPE_SWITCH = new ThingTypeUID(BINDING_ID, "switch");
39     public static final ThingTypeUID THING_TYPE_LIGHT_SENSOR = new ThingTypeUID(BINDING_ID, "lightsensor");
40     public static final ThingTypeUID THING_TYPE_TEMPERATURE_SENSOR = new ThingTypeUID(BINDING_ID, "temperaturesensor");
41     public static final ThingTypeUID THING_TYPE_HUMIDITY_SENSOR = new ThingTypeUID(BINDING_ID, "humiditysensor");
42     public static final ThingTypeUID THING_TYPE_PRESSURE_SENSOR = new ThingTypeUID(BINDING_ID, "pressuresensor");
43     public static final ThingTypeUID THING_TYPE_OPENCLOSE_SENSOR = new ThingTypeUID(BINDING_ID, "openclosesensor");
44     public static final ThingTypeUID THING_TYPE_WATERLEAKAGE_SENSOR = new ThingTypeUID(BINDING_ID,
45             "waterleakagesensor");
46     public static final ThingTypeUID THING_TYPE_FIRE_SENSOR = new ThingTypeUID(BINDING_ID, "firesensor");
47     public static final ThingTypeUID THING_TYPE_ALARM_SENSOR = new ThingTypeUID(BINDING_ID, "alarmsensor");
48     public static final ThingTypeUID THING_TYPE_VIBRATION_SENSOR = new ThingTypeUID(BINDING_ID, "vibrationsensor");
49     public static final ThingTypeUID THING_TYPE_BATTERY_SENSOR = new ThingTypeUID(BINDING_ID, "batterysensor");
50     public static final ThingTypeUID THING_TYPE_CARBONMONOXIDE_SENSOR = new ThingTypeUID(BINDING_ID,
51             "carbonmonoxidesensor");
52     // Special sensor - Thermostat
53     public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
54
55     // lights
56     public static final ThingTypeUID THING_TYPE_ONOFF_LIGHT = new ThingTypeUID(BINDING_ID, "onofflight");
57     public static final ThingTypeUID THING_TYPE_DIMMABLE_LIGHT = new ThingTypeUID(BINDING_ID, "dimmablelight");
58     public static final ThingTypeUID THING_TYPE_COLOR_TEMPERATURE_LIGHT = new ThingTypeUID(BINDING_ID,
59             "colortemperaturelight");
60     public static final ThingTypeUID THING_TYPE_COLOR_LIGHT = new ThingTypeUID(BINDING_ID, "colorlight");
61     public static final ThingTypeUID THING_TYPE_EXTENDED_COLOR_LIGHT = new ThingTypeUID(BINDING_ID,
62             "extendedcolorlight");
63     public static final ThingTypeUID THING_TYPE_WINDOW_COVERING = new ThingTypeUID(BINDING_ID, "windowcovering");
64     public static final ThingTypeUID THING_TYPE_WARNING_DEVICE = new ThingTypeUID(BINDING_ID, "warningdevice");
65
66     // List of all Channel ids
67     public static final String CHANNEL_PRESENCE = "presence";
68     public static final String CHANNEL_LAST_UPDATED = "last_updated";
69     public static final String CHANNEL_LAST_SEEN = "last_seen";
70     public static final String CHANNEL_POWER = "power";
71     public static final String CHANNEL_CONSUMPTION = "consumption";
72     public static final String CHANNEL_VOLTAGE = "voltage";
73     public static final String CHANNEL_CURRENT = "current";
74     public static final String CHANNEL_VALUE = "value";
75     public static final String CHANNEL_TEMPERATURE = "temperature";
76     public static final String CHANNEL_HUMIDITY = "humidity";
77     public static final String CHANNEL_PRESSURE = "pressure";
78     public static final String CHANNEL_LIGHT = "light";
79     public static final String CHANNEL_LIGHT_LUX = "lightlux";
80     public static final String CHANNEL_LIGHT_LEVEL = "light_level";
81     public static final String CHANNEL_DARK = "dark";
82     public static final String CHANNEL_DAYLIGHT = "daylight";
83     public static final String CHANNEL_BUTTON = "button";
84     public static final String CHANNEL_BUTTONEVENT = "buttonevent";
85     public static final String CHANNEL_GESTURE = "gesture";
86     public static final String CHANNEL_GESTUREEVENT = "gestureevent";
87     public static final String CHANNEL_OPENCLOSE = "open";
88     public static final String CHANNEL_WATERLEAKAGE = "waterleakage";
89     public static final String CHANNEL_FIRE = "fire";
90     public static final String CHANNEL_ALARM = "alarm";
91     public static final String CHANNEL_TAMPERED = "tampered";
92     public static final String CHANNEL_VIBRATION = "vibration";
93     public static final String CHANNEL_BATTERY_LEVEL = "battery_level";
94     public static final String CHANNEL_BATTERY_LOW = "battery_low";
95     public static final String CHANNEL_CARBONMONOXIDE = "carbonmonoxide";
96     public static final String CHANNEL_HEATSETPOINT = "heatsetpoint";
97     public static final String CHANNEL_THERMOSTAT_MODE = "mode";
98     public static final String CHANNEL_TEMPERATURE_OFFSET = "offset";
99     public static final String CHANNEL_VALVE_POSITION = "valve";
100
101     public static final String CHANNEL_SWITCH = "switch";
102     public static final String CHANNEL_BRIGHTNESS = "brightness";
103     public static final String CHANNEL_COLOR_TEMPERATURE = "color_temperature";
104     public static final String CHANNEL_COLOR = "color";
105     public static final String CHANNEL_POSITION = "position";
106     public static final String CHANNEL_ALERT = "alert";
107
108     // Thing configuration
109     public static final String CONFIG_HOST = "host";
110     public static final String CONFIG_HTTP_PORT = "httpPort";
111     public static final String CONFIG_APIKEY = "apikey";
112
113     public static final String UNIQUE_ID = "uid";
114
115     public static final String PROPERTY_CT_MIN = "ctmin";
116     public static final String PROPERTY_CT_MAX = "ctmax";
117
118     // CT value range according to ZCL Spec
119     public static final int ZCL_CT_UNDEFINED = 0; // 0x0000
120     public static final int ZCL_CT_MIN = 1;
121     public static final int ZCL_CT_MAX = 65279; // 0xFEFF
122     public static final int ZCL_CT_INVALID = 65535; // 0xFFFF
123 }