]> git.basschouten.com Git - openhab-addons.git/blob
c75346564aa714d7a3e2f7807059f9bd5f93df48
[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.qbus.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link QbusBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Koen Schockaert - Initial contribution
26  */
27 @NonNullByDefault
28 public class QbusBindingConstants {
29
30     private static final String BINDING_ID = "qbus";
31
32     // bridge
33     public static final ThingTypeUID BRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge");
34     public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Collections.singleton(BRIDGE_THING_TYPE);
35     // Bridge config properties
36     public static final String CONFIG_HOST_NAME = "addr";
37     public static final String CONFIG_PORT = "port";
38     public static final String CONFIG_SN = "sn";
39     public static final String CONFIG_SERVERCHECK = "serverCheck";
40
41     // generic thing types
42     public static final ThingTypeUID THING_TYPE_CO2 = new ThingTypeUID(BINDING_ID, "co2");
43     public static final ThingTypeUID THING_TYPE_SCENE = new ThingTypeUID(BINDING_ID, "scene");
44     public static final ThingTypeUID THING_TYPE_ON_OFF_LIGHT = new ThingTypeUID(BINDING_ID, "onOff");
45     public static final ThingTypeUID THING_TYPE_DIMMABLE_LIGHT = new ThingTypeUID(BINDING_ID, "dimmer");
46     public static final ThingTypeUID THING_TYPE_ROLLERSHUTTER = new ThingTypeUID(BINDING_ID, "rollershutter");
47     public static final ThingTypeUID THING_TYPE_ROLLERSHUTTER_SLATS = new ThingTypeUID(BINDING_ID,
48             "rollershutter_slats");
49     public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
50
51     // List of all Thing Type UIDs
52     public static final Set<ThingTypeUID> SCENE_THING_TYPES_UIDS = Set.of(THING_TYPE_SCENE);
53     public static final Set<ThingTypeUID> CO2_THING_TYPES_UIDS = Set.of(THING_TYPE_CO2);
54     public static final Set<ThingTypeUID> ROLLERSHUTTER_THING_TYPES_UIDS = Set.of(THING_TYPE_ROLLERSHUTTER);
55     public static final Set<ThingTypeUID> ROLLERSHUTTER_SLATS_THING_TYPES_UIDS = Set.of(THING_TYPE_ROLLERSHUTTER_SLATS);
56     public static final Set<ThingTypeUID> BISTABIEL_THING_TYPES_UIDS = Set.of(THING_TYPE_ON_OFF_LIGHT);
57     public static final Set<ThingTypeUID> THERMOSTAT_THING_TYPES_UIDS = Set.of(THING_TYPE_THERMOSTAT);
58     public static final Set<ThingTypeUID> DIMMER_THING_TYPES_UIDS = Set.of(THING_TYPE_ON_OFF_LIGHT,
59             THING_TYPE_DIMMABLE_LIGHT);
60
61     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_ON_OFF_LIGHT,
62             THING_TYPE_DIMMABLE_LIGHT, THING_TYPE_THERMOSTAT, THING_TYPE_SCENE, THING_TYPE_CO2,
63             THING_TYPE_ROLLERSHUTTER, THING_TYPE_ROLLERSHUTTER_SLATS);
64
65     // List of all Channel ids
66     public static final String CHANNEL_SWITCH = "switch";
67     public static final String CHANNEL_SCENE = "scene";
68     public static final String CHANNEL_BRIGHTNESS = "brightness";
69     public static final String CHANNEL_MEASURED = "measured";
70     public static final String CHANNEL_SETPOINT = "setpoint";
71     public static final String CHANNEL_MODE = "mode";
72     public static final String CHANNEL_CO2 = "co2";
73     public static final String CHANNEL_ROLLERSHUTTER = "rollershutter";
74     public static final String CHANNEL_SLATS = "slats";
75
76     // Thing config properties
77     public static final String CONFIG_BISTABIEL_ID = "bistabielId";
78     public static final String CONFIG_DIMMER_ID = "dimmerId";
79     public static final String CONFIG_THERMOSTAT_ID = "thermostatId";
80     public static final String CONFIG_SCENE_ID = "sceneId";
81     public static final String CONFIG_CO2_ID = "co2Id";
82     public static final String CONFIG_ROLLERSHUTTER_ID = "rolId";
83     public static final String CONFIG_STEP_VALUE = "step";
84 }