]> git.basschouten.com Git - openhab-addons.git/blob
7b43c23f45e810b9d57a27d0d12a6a70538c000e
[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.nikohomecontrol.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 NikoHomeControlBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Mark Herwege - Initial Contribution
28  */
29 @NonNullByDefault
30 public class NikoHomeControlBindingConstants {
31
32     public static final String BINDING_ID = "nikohomecontrol";
33
34     // Listener threadname prefix
35     public static final String THREAD_NAME_PREFIX = "OH-binding-";
36
37     // List of all Thing Type UIDs
38
39     // bridge
40     public static final ThingTypeUID BRIDGEI_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge");
41     public static final ThingTypeUID BRIDGEII_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge2");
42
43     // generic thing types
44     public static final ThingTypeUID THING_TYPE_PUSHBUTTON = new ThingTypeUID(BINDING_ID, "pushButton");
45     public static final ThingTypeUID THING_TYPE_ON_OFF_LIGHT = new ThingTypeUID(BINDING_ID, "onOff");
46     public static final ThingTypeUID THING_TYPE_DIMMABLE_LIGHT = new ThingTypeUID(BINDING_ID, "dimmer");
47     public static final ThingTypeUID THING_TYPE_BLIND = new ThingTypeUID(BINDING_ID, "blind");
48     public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
49     public static final ThingTypeUID THING_TYPE_ENERGYMETER = new ThingTypeUID(BINDING_ID, "energyMeter");
50
51     // thing type sets
52     public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Collections
53             .unmodifiableSet(Stream.of(BRIDGEI_THING_TYPE, BRIDGEII_THING_TYPE).collect(Collectors.toSet()));
54     public static final Set<ThingTypeUID> ACTION_THING_TYPES_UIDS = Collections.unmodifiableSet(
55             Stream.of(THING_TYPE_PUSHBUTTON, THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT, THING_TYPE_BLIND)
56                     .collect(Collectors.toSet()));
57     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
58             .unmodifiableSet(Stream.of(THING_TYPE_PUSHBUTTON, THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT,
59                     THING_TYPE_BLIND, THING_TYPE_THERMOSTAT, THING_TYPE_ENERGYMETER).collect(Collectors.toSet()));
60
61     // List of all Channel ids
62     public static final String CHANNEL_BUTTON = "button";
63     public static final String CHANNEL_SWITCH = "switch";
64     public static final String CHANNEL_BRIGHTNESS = "brightness";
65     public static final String CHANNEL_ROLLERSHUTTER = "rollershutter";
66
67     public static final String CHANNEL_MEASURED = "measured";
68     public static final String CHANNEL_SETPOINT = "setpoint";
69     public static final String CHANNEL_OVERRULETIME = "overruletime";
70     public static final String CHANNEL_MODE = "mode";
71     public static final String CHANNEL_DEMAND = "demand";
72     public static final String CHANNEL_HEATING_MODE = "heatingmode";
73     public static final String CHANNEL_HEATING_DEMAND = "heatingdemand";
74
75     public static final String CHANNEL_POWER = "power";
76
77     public static final String CHANNEL_ALARM = "alarm";
78     public static final String CHANNEL_NOTICE = "notice";
79
80     // Bridge config properties
81     public static final String CONFIG_HOST_NAME = "addr";
82     public static final String CONFIG_PORT = "port";
83     public static final String CONFIG_REFRESH = "refresh";
84     public static final String CONFIG_PROFILE = "profile";
85     public static final String CONFIG_PASSWORD = "password";
86
87     // Thing config properties
88     public static final String CONFIG_ACTION_ID = "actionId";
89     public static final String CONFIG_STEP_VALUE = "step";
90
91     public static final String CONFIG_THERMOSTAT_ID = "thermostatId";
92     public static final String CONFIG_OVERRULETIME = "overruleTime";
93
94     public static final String CONFIG_ENERGYMETER_ID = "energyMeterId";
95
96     // Thing properties
97     public static final String PROPERTY_DEVICE_TYPE = "deviceType";
98     public static final String PROPERTY_DEVICE_TECHNOLOGY = "deviceTechnology";
99     public static final String PROPERTY_DEVICE_MODEL = "deviceModel";
100 }