]> git.basschouten.com Git - openhab-addons.git/blob
baca941fd626cc187306b140b233d19e454d3319
[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.caddx.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
22
23 /**
24  * The {@link CaddxBindingConstants} class is responsible for creating things and thing
25  * handlers.
26  *
27  * @author Georgios Moutsos - Initial contribution
28  */
29 @NonNullByDefault
30 public class CaddxBindingConstants {
31     // Binding ID
32     private static final String BINDING_ID = "caddx";
33
34     // List of bridge device types
35     public static final String CADDX_BRIDGE = "bridge";
36
37     // List of device types
38     public static final String PANEL = "panel";
39     public static final String PARTITION = "partition";
40     public static final String ZONE = "zone";
41     public static final String KEYPAD = "keypad";
42
43     // List of all Bridge Thing Type UIDs
44     public static final ThingTypeUID CADDXBRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, CADDX_BRIDGE);
45
46     // List of all Thing Type UIDs
47     public static final ThingTypeUID PANEL_THING_TYPE = new ThingTypeUID(BINDING_ID, PANEL);
48     public static final ThingTypeUID PARTITION_THING_TYPE = new ThingTypeUID(BINDING_ID, PARTITION);
49     public static final ThingTypeUID ZONE_THING_TYPE = new ThingTypeUID(BINDING_ID, ZONE);
50     public static final ThingTypeUID KEYPAD_THING_TYPE = new ThingTypeUID(BINDING_ID, KEYPAD);
51
52     // Bridge
53     // Commands
54     // Channels
55     public static final String SEND_COMMAND = "send_command";
56
57     // Panel
58     // Commands
59     public static final String PANEL_INTERFACE_CONFIGURATION_REQUEST = "panel_interface_configuration_request";
60     public static final String PANEL_SYSTEM_STATUS_REQUEST = "panel_system_status_request";
61     public static final String PANEL_LOG_EVENT_REQUEST = "panel_log_event_request";
62     // Channels
63     public static final String PANEL_FIRMWARE_VERSION = "panel_firmware_version";
64     public static final String PANEL_LOG_MESSAGE_N_0 = "panel_log_message_n_0";
65
66     // Partition
67     // Commands
68     public static final String PARTITION_STATUS_REQUEST = "partition_status_request";
69     public static final String PARTITION_PRIMARY_COMMAND_WITH_PIN = "partition_primary_command_with_pin";
70     public static final String PARTITION_SECONDARY_COMMAND = "partition_secondary_command";
71     // Channels
72     public static final String PARTITION_ARMED = "partition_armed";
73     public static final String PARTITION_PRIMARY = "partition_primary";
74     public static final String PARTITION_SECONDARY = "partition_secondary";
75
76     // Zone
77     // Commands
78     public static final String ZONE_STATUS_REQUEST = "zone_status_request";
79     public static final String ZONE_NAME_REQUEST = "zone_name_request";
80     // Channels
81     public static final String ZONE_NAME = "zone_name";
82     public static final String ZONE_FAULTED = "zone_faulted";
83     public static final String ZONE_BYPASSED = "zone_bypassed";
84
85     // Keypad
86     // Commands
87     public static final String KEYPAD_TERMINAL_MODE_REQUEST = "keypad_terminal_mode_request";
88     public static final String KEYPAD_SEND_KEYPAD_TEXT_MESSAGE = "keypad_send_keypad_text_message";
89     // Channels
90     public static final String KEYPAD_KEY_PRESSED = "keypad_key_pressed";
91
92     // Set of all supported Thing Type UIDs
93     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream
94             .of(CADDXBRIDGE_THING_TYPE, PANEL_THING_TYPE, PARTITION_THING_TYPE, ZONE_THING_TYPE, KEYPAD_THING_TYPE)
95             .collect(Collectors.toSet()));
96
97     // Set of all supported Bridge Type UIDs
98     public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS = Collections
99             .unmodifiableSet(Stream.of(CADDXBRIDGE_THING_TYPE).collect(Collectors.toSet()));
100 }