]> git.basschouten.com Git - openhab-addons.git/blob
7f992848d3fac2e7b83d5205b04fbcc2684ea910
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.satel.internal;
14
15 import java.util.Set;
16 import java.util.stream.Collectors;
17 import java.util.stream.Stream;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
21 import org.openhab.core.thing.type.ChannelTypeUID;
22
23 /**
24  * The {@link SatelBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Krzysztof Goworek - Initial contribution
28  */
29 @NonNullByDefault
30 public class SatelBindingConstants {
31
32     public static final String BINDING_ID = "satel";
33
34     // List of all Thing Type UIDs
35     public static final ThingTypeUID THING_TYPE_ETHM1 = new ThingTypeUID(BINDING_ID, "ethm-1");
36     public static final ThingTypeUID THING_TYPE_INTRS = new ThingTypeUID(BINDING_ID, "int-rs");
37     public static final ThingTypeUID THING_TYPE_OUTPUT = new ThingTypeUID(BINDING_ID, "output");
38     public static final ThingTypeUID THING_TYPE_PARTITION = new ThingTypeUID(BINDING_ID, "partition");
39     public static final ThingTypeUID THING_TYPE_SHUTTER = new ThingTypeUID(BINDING_ID, "shutter");
40     public static final ThingTypeUID THING_TYPE_ZONE = new ThingTypeUID(BINDING_ID, "zone");
41     public static final ThingTypeUID THING_TYPE_SYSTEM = new ThingTypeUID(BINDING_ID, "system");
42     public static final ThingTypeUID THING_TYPE_EVENTLOG = new ThingTypeUID(BINDING_ID, "event-log");
43     public static final ThingTypeUID THING_TYPE_ATD100 = new ThingTypeUID(BINDING_ID, "atd-100");
44
45     public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Stream.of(THING_TYPE_ETHM1, THING_TYPE_INTRS)
46             .collect(Collectors.toSet());
47
48     // Physical devices
49     public static final Set<ThingTypeUID> DEVICE_THING_TYPES_UIDS = Stream
50             .of(THING_TYPE_OUTPUT, THING_TYPE_PARTITION, THING_TYPE_SHUTTER, THING_TYPE_ZONE, THING_TYPE_ATD100)
51             .collect(Collectors.toSet());
52
53     // Virtual devices
54     public static final Set<ThingTypeUID> VIRTUAL_THING_TYPES_UIDS = Stream.of(THING_TYPE_SYSTEM, THING_TYPE_EVENTLOG)
55             .collect(Collectors.toSet());
56
57     // Channel types
58     public static final ChannelTypeUID CHANNEL_TYPE_LOBATT = new ChannelTypeUID("system", "low-battery");
59     public static final ChannelTypeUID CHANNEL_TYPE_NOCOMM = new ChannelTypeUID(BINDING_ID, "device_nocomm");
60
61     // List of all Channel ids except those covered by state enums
62     public static final String CHANNEL_SHUTTER_STATE = "shutter_state";
63     public static final String CHANNEL_DATE_TIME = "date_time";
64     public static final String CHANNEL_SERVICE_MODE = "service_mode";
65     public static final String CHANNEL_TROUBLES = "troubles";
66     public static final String CHANNEL_TROUBLES_MEMORY = "troubles_memory";
67     public static final String CHANNEL_ACU100_PRESENT = "acu100_present";
68     public static final String CHANNEL_INTRX_PRESENT = "intrx_present";
69     public static final String CHANNEL_GRADE23_SET = "grade23_set";
70     public static final String CHANNEL_USER_CODE = "user_code";
71     public static final String CHANNEL_INDEX = "index";
72     public static final String CHANNEL_PREV_INDEX = "prev_index";
73     public static final String CHANNEL_TIMESTAMP = "timestamp";
74     public static final String CHANNEL_DESCRIPTION = "description";
75     public static final String CHANNEL_DETAILS = "details";
76     public static final String CHANNEL_TEMPERATURE = "temperature";
77 }