2 * Copyright (c) 2010-2023 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.caddx.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link CaddxBindingConstants} class is responsible for creating things and thing
27 * @author Georgios Moutsos - Initial contribution
30 public class CaddxBindingConstants {
32 private static final String BINDING_ID = "caddx";
34 // List of bridge device types
35 public static final String CADDX_BRIDGE = "bridge";
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";
43 // List of all Bridge Thing Type UIDs
44 public static final ThingTypeUID CADDXBRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, CADDX_BRIDGE);
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);
55 public static final String SEND_COMMAND = "send_command";
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";
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";
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";
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";
78 public static final String ZONE_STATUS_REQUEST = "zone_status_request";
79 public static final String ZONE_NAME_REQUEST = "zone_name_request";
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";
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";
90 public static final String KEYPAD_KEY_PRESSED = "keypad_key_pressed";
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()));
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()));