]> git.basschouten.com Git - openhab-addons.git/blob
c2b85a130f29ccab517561c1726be6e525df53e2
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.bondhome.internal;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
19
20 /**
21  * The {@link BondHomeBindingConstants} class defines common constants, which are
22  * used across the whole binding.
23  *
24  * @author Sara Geleskie Damiano - Initial contribution
25  */
26 @NonNullByDefault
27 public class BondHomeBindingConstants {
28
29     public static final String BINDING_ID = "bondhome";
30
31     /**
32      * List of all Thing Type UIDs.
33      */
34     public static final ThingTypeUID THING_TYPE_BOND_BRIDGE = new ThingTypeUID(BINDING_ID, "bondBridge");
35     public static final ThingTypeUID THING_TYPE_BOND_FAN = new ThingTypeUID(BINDING_ID, "bondFan");
36     public static final ThingTypeUID THING_TYPE_BOND_SHADES = new ThingTypeUID(BINDING_ID, "bondShades");
37     public static final ThingTypeUID THING_TYPE_BOND_FIREPLACE = new ThingTypeUID(BINDING_ID, "bondFireplace");
38     public static final ThingTypeUID THING_TYPE_BOND_GENERIC = new ThingTypeUID(BINDING_ID, "bondGenericThing");
39
40     /**
41      * The supported thing types.
42      */
43     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Set.of(THING_TYPE_BOND_FAN, THING_TYPE_BOND_SHADES,
44             THING_TYPE_BOND_FIREPLACE, THING_TYPE_BOND_GENERIC);
45
46     public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_TYPES = Set.of(THING_TYPE_BOND_BRIDGE);
47
48     /**
49      * List of all Channel ids - these match the id fields in the OH-INF xml files
50      */
51
52     // Universal channels
53     public static final String CHANNEL_GROUP_COMMON = "common";
54     public static final String CHANNEL_POWER = CHANNEL_GROUP_COMMON + "#power";
55     public static final String CHANNEL_COMMAND = CHANNEL_GROUP_COMMON + "command";
56
57     // Ceiling fan channels
58     public static final String CHANNEL_GROUP_FAN = "fan";
59     public static final String CHANNEL_FAN_POWER = CHANNEL_GROUP_FAN + "#power";
60     public static final String CHANNEL_FAN_SPEED = CHANNEL_GROUP_FAN + "#speed";
61     public static final String CHANNEL_FAN_BREEZE_STATE = CHANNEL_GROUP_FAN + "#breezeState";
62     public static final String CHANNEL_FAN_BREEZE_MEAN = CHANNEL_GROUP_FAN + "#breezeMean";
63     public static final String CHANNEL_FAN_BREEZE_VAR = CHANNEL_GROUP_FAN + "#breezeVariability";
64     public static final String CHANNEL_FAN_DIRECTION = CHANNEL_GROUP_FAN + "#direction";
65     public static final String CHANNEL_FAN_TIMER = CHANNEL_GROUP_FAN + "#timer";
66
67     // Fan light channels
68     public static final String CHANNEL_GROUP_LIGHT = "light";
69     public static final String CHANNEL_LIGHT_POWER = CHANNEL_GROUP_LIGHT + "#power";
70     public static final String CHANNEL_LIGHT_BRIGHTNESS = CHANNEL_GROUP_LIGHT + "#brightness";
71
72     public static final String CHANNEL_GROUP_UP_LIGHT = "upLight";
73     public static final String CHANNEL_UP_LIGHT_POWER = CHANNEL_GROUP_UP_LIGHT + "#power";
74     public static final String CHANNEL_UP_LIGHT_ENABLE = CHANNEL_GROUP_UP_LIGHT + "#enable";
75     public static final String CHANNEL_UP_LIGHT_BRIGHTNESS = CHANNEL_GROUP_UP_LIGHT + "#brightness";
76
77     public static final String CHANNEL_GROUP_DOWN_LIGHT = "downLight";
78     public static final String CHANNEL_DOWN_LIGHT_POWER = CHANNEL_GROUP_DOWN_LIGHT + "#power";
79     public static final String CHANNEL_DOWN_LIGHT_ENABLE = CHANNEL_GROUP_DOWN_LIGHT + "#enable";
80     public static final String CHANNEL_DOWN_LIGHT_BRIGHTNESS = CHANNEL_GROUP_DOWN_LIGHT + "#brightness";
81
82     // Fireplace channels
83     public static final String CHANNEL_GROUP_FIREPLACE = "fireplace";
84     public static final String CHANNEL_FLAME = CHANNEL_GROUP_FIREPLACE + "#flame";
85
86     // Motorize shade channels
87     public static final String CHANNEL_GROUP_SHADES = "shade";
88     public static final String CHANNEL_ROLLERSHUTTER = CHANNEL_GROUP_SHADES + "#rollershutter";
89
90     /**
91      * Configuration arguments
92      */
93     public static final String CONFIG_SERIAL_NUMBER = "serialNumber";
94     public static final String CONFIG_IP_ADDRESS = "ipAddress";
95     public static final String CONFIG_LOCAL_TOKEN = "localToken";
96     public static final String CONFIG_DEVICE_ID = "deviceId";
97     public static final String CONFIG_LATEST_HASH = "lastDeviceConfigurationHash";
98
99     /**
100      * Device Properties
101      */
102     public static final String PROPERTIES_DEVICE_NAME = "deviceName";
103     public static final String PROPERTIES_TEMPLATE_NAME = "template";
104     public static final String PROPERTIES_MAX_SPEED = "maxSpeed";
105     public static final String PROPERTIES_TRUST_STATE = "trustState";
106     public static final String PROPERTIES_ADDRESS = "addr";
107     public static final String PROPERTIES_RF_FREQUENCY = "freq";
108
109     /**
110      * Constants
111      */
112     public static final int BOND_BPUP_PORT = 30007;
113     public static final int BOND_API_TIMEOUT_MS = 3000;
114 }