2 * Copyright (c) 2010-2020 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.touchwand.internal;
15 import java.util.HashSet;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link TouchWandBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Roie Geron - Initial contribution
28 public class TouchWandBindingConstants {
30 public static final String BINDING_ID = "touchwand";
31 public static final String DISCOVERY_THREAD_ID = "OH-binding-touchwand-discovery";
33 // List of all Thing Type UIDs
34 public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
35 public static final ThingTypeUID THING_TYPE_SWITCH = new ThingTypeUID(BINDING_ID, "switch");
36 public static final ThingTypeUID THING_TYPE_SHUTTER = new ThingTypeUID(BINDING_ID, "shutter");
37 public static final ThingTypeUID THING_TYPE_WALLCONTROLLER = new ThingTypeUID(BINDING_ID, "wallcontroller");
38 public static final ThingTypeUID THING_TYPE_DIMMER = new ThingTypeUID(BINDING_ID, "dimmer");
39 public static final ThingTypeUID THING_TYPE_ALARMSENSOR = new ThingTypeUID(BINDING_ID, "AlarmSensor"); // TBD
41 // List of all Channel ids
42 public static final String CHANNEL_SWITCH = "switch";
43 public static final String CHANNEL_SHUTTER = "shutter";
44 public static final String CHANNEL_DIMMER = "brightness";
45 public static final String CHANNEL_ALARM = "alarm";
46 public static final String CHANNEL_WALLCONTROLLER_ACTION = "wallaction";
47 public static final String CHANNEL_BATTERY_LEVEL = "battery_level";
48 public static final String CHANNEL_BATTERY_LOW = "battery_low";
50 // List of configuration parameters
52 public static final String HOST = "ipAddress";
53 public static final String PORT = "port";
54 public static final String USER = "username";
55 public static final String PASS = "password";
56 public static final String STATUS_REFRESH_TIME = "statusrefresh";
57 public static final String ADD_SECONDARY_UNITS = "addSecondaryUnits";
59 // Unit handler properties
61 public static final String HANDLER_PROPERTIES_ID = "id";
62 public static final String HANDLER_PROPERTIES_NAME = "name";
64 // Connectivity options
66 public static final String CONNECTIVITY_KNX = "knx";
67 public static final String CONNECTIVITY_ZWAVE = "zwave";
70 public static final String SWITCH_STATUS_ON = "255";
71 public static final String SWITCH_STATUS_OFF = "0";
73 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>();
76 SUPPORTED_THING_TYPES_UIDS.add(THING_TYPE_SWITCH);
77 SUPPORTED_THING_TYPES_UIDS.add(THING_TYPE_SHUTTER);
78 SUPPORTED_THING_TYPES_UIDS.add(THING_TYPE_WALLCONTROLLER);
79 SUPPORTED_THING_TYPES_UIDS.add(THING_TYPE_DIMMER);
80 // SUPPORTED_THING_TYPES_UIDS.add(THING_TYPE_ALARMSENSOR); // not implemented yet
83 public static final String TYPE_WALLCONTROLLER = "WallController";
84 public static final String TYPE_SWITCH = "Switch";
85 public static final String TYPE_SHUTTER = "shutter";
86 public static final String TYPE_DIMMER = "dimmer";
87 public static final String TYPE_ALARMSENSOR = "AlarmSensor";
89 public static final String[] SUPPORTED_TOUCHWAND_TYPES = { TYPE_WALLCONTROLLER, TYPE_SWITCH, TYPE_SHUTTER,
90 TYPE_DIMMER, TYPE_ALARMSENSOR };