]> git.basschouten.com Git - openhab-addons.git/blob
43f7dc45d5e476ae5842497e439058b88620eab3
[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.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     public static final ThingTypeUID THING_TYPE_BOND_LIGHT = new ThingTypeUID(BINDING_ID, "bondLight");
40
41     /**
42      * The supported thing types.
43      */
44     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Set.of(THING_TYPE_BOND_FAN, THING_TYPE_BOND_SHADES,
45             THING_TYPE_BOND_FIREPLACE, THING_TYPE_BOND_GENERIC, THING_TYPE_BOND_LIGHT);
46
47     public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_TYPES = Set.of(THING_TYPE_BOND_BRIDGE);
48
49     /**
50      * List of all Channel ids - these match the id fields in the OH-INF xml files
51      */
52
53     // Universal channels
54     public static final String CHANNEL_GROUP_COMMON = "common";
55     public static final String CHANNEL_POWER = CHANNEL_GROUP_COMMON + "#power";
56     public static final String CHANNEL_COMMAND = CHANNEL_GROUP_COMMON + "command";
57
58     // Ceiling fan channels
59     public static final String CHANNEL_GROUP_FAN = "fan";
60     public static final String CHANNEL_FAN_POWER = CHANNEL_GROUP_FAN + "#power";
61     public static final String CHANNEL_FAN_SPEED = CHANNEL_GROUP_FAN + "#speed";
62     public static final String CHANNEL_RAW_FAN_SPEED = CHANNEL_GROUP_FAN + "#rawSpeed";
63     public static final String CHANNEL_FAN_BREEZE_STATE = CHANNEL_GROUP_FAN + "#breezeState";
64     public static final String CHANNEL_FAN_BREEZE_MEAN = CHANNEL_GROUP_FAN + "#breezeMean";
65     public static final String CHANNEL_FAN_BREEZE_VAR = CHANNEL_GROUP_FAN + "#breezeVariability";
66     public static final String CHANNEL_FAN_DIRECTION = CHANNEL_GROUP_FAN + "#direction";
67     public static final String CHANNEL_FAN_TIMER = CHANNEL_GROUP_FAN + "#timer";
68
69     // Fan light channels
70     public static final String CHANNEL_GROUP_LIGHT = "light";
71     public static final String CHANNEL_LIGHT_POWER = CHANNEL_GROUP_LIGHT + "#power";
72     public static final String CHANNEL_LIGHT_BRIGHTNESS = CHANNEL_GROUP_LIGHT + "#brightness";
73
74     public static final String CHANNEL_GROUP_UP_LIGHT = "upLight";
75     public static final String CHANNEL_UP_LIGHT_POWER = CHANNEL_GROUP_UP_LIGHT + "#power";
76     public static final String CHANNEL_UP_LIGHT_ENABLE = CHANNEL_GROUP_UP_LIGHT + "#enable";
77     public static final String CHANNEL_UP_LIGHT_BRIGHTNESS = CHANNEL_GROUP_UP_LIGHT + "#brightness";
78
79     public static final String CHANNEL_GROUP_DOWN_LIGHT = "downLight";
80     public static final String CHANNEL_DOWN_LIGHT_POWER = CHANNEL_GROUP_DOWN_LIGHT + "#power";
81     public static final String CHANNEL_DOWN_LIGHT_ENABLE = CHANNEL_GROUP_DOWN_LIGHT + "#enable";
82     public static final String CHANNEL_DOWN_LIGHT_BRIGHTNESS = CHANNEL_GROUP_DOWN_LIGHT + "#brightness";
83
84     // Fireplace channels
85     public static final String CHANNEL_GROUP_FIREPLACE = "fireplace";
86     public static final String CHANNEL_FLAME = CHANNEL_GROUP_FIREPLACE + "#flame";
87
88     // Motorize shade channels
89     public static final String CHANNEL_GROUP_SHADES = "shade";
90     public static final String CHANNEL_ROLLERSHUTTER = CHANNEL_GROUP_SHADES + "#rollershutter";
91
92     /**
93      * Configuration arguments
94      */
95     public static final String CONFIG_SERIAL_NUMBER = "serialNumber";
96     public static final String CONFIG_IP_ADDRESS = "ipAddress";
97     public static final String CONFIG_LOCAL_TOKEN = "localToken";
98     public static final String CONFIG_DEVICE_ID = "deviceId";
99     public static final String CONFIG_LATEST_HASH = "lastDeviceConfigurationHash";
100
101     /**
102      * Device Properties
103      */
104     public static final String PROPERTIES_DEVICE_NAME = "deviceName";
105     public static final String PROPERTIES_TEMPLATE_NAME = "template";
106     public static final String PROPERTIES_MAX_SPEED = "maxSpeed";
107     public static final String PROPERTIES_TRUST_STATE = "trustState";
108     public static final String PROPERTIES_ADDRESS = "addr";
109     public static final String PROPERTIES_RF_FREQUENCY = "freq";
110
111     /**
112      * Constants
113      */
114     public static final int BOND_BPUP_PORT = 30007;
115     public static final int BOND_API_TIMEOUT_MS = 3000;
116 }