]> git.basschouten.com Git - openhab-addons.git/blob
189b6a57de3705f24cdd661cd9414e1283aa907c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.unifi.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 UniFiBindingConstants} class defines common constants, which are
22  * used across the UniFi binding.
23  *
24  * @author Matthew Bowman - Initial contribution
25  * @author Patrik Wimnell - Blocking / Unblocking client support
26  * @author Hilbrand Bouwkamp - Added poePort
27  * @author Mark Herwege - Added guest vouchers
28  */
29 @NonNullByDefault
30 public final class UniFiBindingConstants {
31
32     public static final String BINDING_ID = "unifi";
33
34     // List of all Thing Types
35     public static final ThingTypeUID THING_TYPE_CONTROLLER = new ThingTypeUID(BINDING_ID, "controller");
36     public static final ThingTypeUID THING_TYPE_SITE = new ThingTypeUID(BINDING_ID, "site");
37     public static final ThingTypeUID THING_TYPE_WLAN = new ThingTypeUID(BINDING_ID, "wlan");
38     public static final ThingTypeUID THING_TYPE_WIRED_CLIENT = new ThingTypeUID(BINDING_ID, "wiredClient");
39     public static final ThingTypeUID THING_TYPE_WIRELESS_CLIENT = new ThingTypeUID(BINDING_ID, "wirelessClient");
40     public static final ThingTypeUID THING_TYPE_POE_PORT = new ThingTypeUID(BINDING_ID, "poePort");
41     public static final ThingTypeUID THING_TYPE_ACCESS_POINT = new ThingTypeUID(BINDING_ID, "accessPoint");
42     public static final Set<ThingTypeUID> ALL_THING_TYPE_SUPPORTED = Set.of(THING_TYPE_CONTROLLER, THING_TYPE_SITE,
43             THING_TYPE_WLAN, THING_TYPE_WIRED_CLIENT, THING_TYPE_WIRELESS_CLIENT, THING_TYPE_POE_PORT,
44             THING_TYPE_ACCESS_POINT);
45     public static final Set<ThingTypeUID> THING_TYPE_SUPPORTED = Set.of(THING_TYPE_SITE, THING_TYPE_WLAN,
46             THING_TYPE_WIRED_CLIENT, THING_TYPE_WIRELESS_CLIENT, THING_TYPE_POE_PORT, THING_TYPE_ACCESS_POINT);
47
48     // List of site channels
49     public static final String CHANNEL_TOTAL_CLIENTS = "totalClients";
50     public static final String CHANNEL_WIRELESS_CLIENTS = "wirelessClients";
51     public static final String CHANNEL_WIRED_CLIENTS = "wiredClients";
52     public static final String CHANNEL_GUEST_CLIENTS = "guestClients";
53     public static final String CHANNEL_GUEST_VOUCHER = "guestVoucher";
54     public static final String CHANNEL_GUEST_VOUCHERS_GENERATE = "guestVouchersGenerate";
55
56     // List of wlan channels
57     public static final String CHANNEL_SECURITY = "security";
58     public static final String CHANNEL_WLANBAND = "wlanBand";
59     public static final String CHANNEL_WPAENC = "wpaEnc";
60     public static final String CHANNEL_WPAMODE = "wpaMode";
61     public static final String CHANNEL_PASSPHRASE = "passphrase";
62     public static final String CHANNEL_QRCODE_ENCODING = "qrcodeEncoding";
63
64     // List of common wired + wireless client channels
65     public static final String CHANNEL_ONLINE = "online";
66     public static final String CHANNEL_NAME = "name";
67     public static final String CHANNEL_HOSTNAME = "hostname";
68     public static final String CHANNEL_SITE = "site";
69     public static final String CHANNEL_MAC_ADDRESS = "macAddress";
70     public static final String CHANNEL_IP_ADDRESS = "ipAddress";
71     public static final String CHANNEL_UPTIME = "uptime";
72     public static final String CHANNEL_LAST_SEEN = "lastSeen";
73     public static final String CHANNEL_GUEST = "guest";
74     public static final String CHANNEL_BLOCKED = "blocked";
75     public static final String CHANNEL_RECONNECT = "reconnect";
76     public static final String CHANNEL_CMD = "cmd";
77     public static final String CHANNEL_CMD_RECONNECT = "reconnect";
78     public static final String CHANNEL_EXPERIENCE = "experience";
79
80     // List of additional wireless client channels
81     public static final String CHANNEL_AP = "ap";
82     public static final String CHANNEL_ESSID = "essid";
83     public static final String CHANNEL_RSSI = "rssi";
84
85     // List of switch port channels
86     public static final String CHANNEL_ENABLE = "enable";
87     public static final String CHANNEL_ENABLE_PARAMETER_MODE = "mode";
88     public static final String CHANNEL_ENABLE_PARAMETER_MODE_OFF = "off";
89     public static final String CHANNEL_ENABLE_PARAMETER_MODE_AUTO = "auto";
90     public static final String CHANNEL_PORT_POE_MODE = "mode";
91     public static final String CHANNEL_PORT_POE_CMD = "cmd";
92     public static final String CHANNEL_PORT_POE_CMD_POWER_CYCLE = "powercycle";
93     public static final String CHANNEL_PORT_POE_ENABLE = "enable";
94     public static final String CHANNEL_PORT_POE_POWER = "power";
95     public static final String CHANNEL_PORT_POE_VOLTAGE = "voltage";
96     public static final String CHANNEL_PORT_POE_CURRENT = "current";
97
98     // List of access point channels
99     public static final String CHANNEL_AP_ENABLE = "enable";
100
101     // List of all Parameters
102     public static final String PARAMETER_HOST = "host";
103     public static final String PARAMETER_PORT = "port";
104     public static final String PARAMETER_USERNAME = "username";
105     public static final String PARAMETER_PASSWORD = "password";
106     public static final String PARAMETER_UNIFIOS = "unifios";
107     public static final String PARAMETER_SITE = "site";
108     public static final String PARAMETER_CID = "cid";
109     public static final String PARAMETER_SID = "sid";
110     public static final String PARAMETER_WID = "wid";
111     public static final String PARAMETER_VOUCHER_COUNT = "voucherCount";
112     public static final String PARAMETER_VOUCHER_EXPIRATION = "voucherExpiration";
113     public static final String PARAMETER_VOUCHER_USERS = "voucherUsers";
114     public static final String PARAMETER_VOUCHER_UP_LIMIT = "voucherUpLimit";
115     public static final String PARAMETER_VOUCHER_DOWN_LIMIT = "voucherDownLimit";
116     public static final String PARAMETER_VOUCHER_DATA_QUOTA = "voucherDataQuota";
117     public static final String PARAMETER_PORT_NUMBER = "portNumber";
118     public static final String PARAMETER_MAC_ADDRESS = "macAddress";
119     public static final String PARAMETER_WIFI_NAME = "wifi";
120
121     // UniFi device types
122     public static final String DEVICE_TYPE_UAP = "uap";
123
124     private UniFiBindingConstants() {
125         // Constants class
126     }
127 }