]> git.basschouten.com Git - openhab-addons.git/blob
08a10e5e423f1823824757c40eee6aece563456a
[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.alarmdecoder.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 AlarmDecoderBindingConstants} class defines common constants, which are
25  * used throughout the binding.
26  *
27  * @author Bob Adair - Initial contribution
28  * @author Bill Forsyth - Initial contribution
29  */
30 @NonNullByDefault
31 public class AlarmDecoderBindingConstants {
32
33     private static final String BINDING_ID = "alarmdecoder";
34
35     // List of all Thing Type UIDs
36     public static final ThingTypeUID THING_TYPE_IPBRIDGE = new ThingTypeUID(BINDING_ID, "ipbridge");
37     public static final ThingTypeUID THING_TYPE_SERIALBRIDGE = new ThingTypeUID(BINDING_ID, "serialbridge");
38     public static final ThingTypeUID THING_TYPE_ZONE = new ThingTypeUID(BINDING_ID, "zone");
39     public static final ThingTypeUID THING_TYPE_RFZONE = new ThingTypeUID(BINDING_ID, "rfzone");
40     public static final ThingTypeUID THING_TYPE_VZONE = new ThingTypeUID(BINDING_ID, "vzone");
41     public static final ThingTypeUID THING_TYPE_KEYPAD = new ThingTypeUID(BINDING_ID, "keypad");
42     public static final ThingTypeUID THING_TYPE_LRR = new ThingTypeUID(BINDING_ID, "lrr");
43
44     public static final Set<ThingTypeUID> DISCOVERABLE_DEVICE_TYPE_UIDS = Collections.unmodifiableSet(Stream
45             .of(THING_TYPE_ZONE, THING_TYPE_RFZONE, THING_TYPE_KEYPAD, THING_TYPE_LRR).collect(Collectors.toSet()));
46
47     // Bridge properties
48     public static final String PROPERTY_SERIALNUM = "serialNumber";
49     public static final String PROPERTY_VERSION = "firmwareVersion";
50     public static final String PROPERTY_CAPABILITIES = "capabilities";
51
52     // Channel IDs for ZoneHandler
53     public static final String PROPERTY_ADDRESS = "address";
54     public static final String PROPERTY_CHANNEL = "channel";
55     public static final String PROPERTY_ID = "id";
56
57     public static final String CHANNEL_CONTACT = "contact";
58     public static final String CHANNEL_STATE = "state";
59
60     // Channel IDs for VZoneHandler
61     public static final String CHANNEL_COMMAND = "command";
62
63     // Channel IDs for RFZoneHandler
64     public static final String PROPERTY_SERIAL = "serial";
65
66     public static final String CHANNEL_RF_LOWBAT = "lowbat";
67     public static final String CHANNEL_RF_SUPERVISION = "supervision";
68     public static final String CHANNEL_RF_LOOP1 = "loop1";
69     public static final String CHANNEL_RF_LOOP2 = "loop2";
70     public static final String CHANNEL_RF_LOOP3 = "loop3";
71     public static final String CHANNEL_RF_LOOP4 = "loop4";
72
73     // Channel IDs for KeypadHandler
74     public static final String CHANNEL_KP_ZONE = "zone";
75     public static final String CHANNEL_KP_TEXT = "text";
76     public static final String CHANNEL_KP_READY = "ready";
77     public static final String CHANNEL_KP_ARMEDAWAY = "armedaway";
78     public static final String CHANNEL_KP_ARMEDHOME = "armedhome";
79     public static final String CHANNEL_KP_BACKLIGHT = "backlight";
80     public static final String CHANNEL_KP_PRORGAM = "program";
81     public static final String CHANNEL_KP_BEEPS = "beeps";
82     public static final String CHANNEL_KP_BYPASSED = "bypassed";
83     public static final String CHANNEL_KP_ACPOWER = "acpower";
84     public static final String CHANNEL_KP_CHIME = "chime";
85     public static final String CHANNEL_KP_ALARMOCCURRED = "alarmoccurred";
86     public static final String CHANNEL_KP_ALARM = "alarm";
87     public static final String CHANNEL_KP_LOWBAT = "lowbat";
88     public static final String CHANNEL_KP_DELAYOFF = "delayoff";
89     public static final String CHANNEL_KP_FIRE = "fire";
90     public static final String CHANNEL_KP_SYSFAULT = "sysfault";
91     public static final String CHANNEL_KP_PERIMETER = "perimeter";
92     public static final String CHANNEL_KP_COMMAND = "command";
93     public static final String CHANNEL_KP_INTCOMMAND = "intcommand";
94     public static final String DEFAULT_MAPPING = "0=0,1=1,2=2,3=3,4=4,5=5,6=6,7=7,8=8,9=9,10=*,11=#";
95
96     // Channel IDs for LRRHandler
97     public static final String CHANNEL_LRR_PARTITION = "partition";
98     public static final String CHANNEL_LRR_EVENTDATA = "eventdata";
99     public static final String CHANNEL_LRR_CIDMESSAGE = "cidmessage";
100     public static final String CHANNEL_LRR_REPORTCODE = "reportcode";
101 }