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