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.qbus.internal;
15 import java.util.Collections;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link QbusBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Koen Schockaert - Initial contribution
28 public class QbusBindingConstants {
30 private static final String BINDING_ID = "qbus";
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";
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");
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);
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);
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";
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";