]> git.basschouten.com Git - openhab-addons.git/blob
d140f2a12fa5117c84b0bebf718362beb294aa24
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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     // List of all Thing Type UIDs
35
36     // bridge
37     public static final ThingTypeUID BRIDGEI_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge");
38     public static final ThingTypeUID BRIDGEII_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge2");
39
40     // generic thing types
41     public static final ThingTypeUID THING_TYPE_PUSHBUTTON = new ThingTypeUID(BINDING_ID, "pushButton");
42     public static final ThingTypeUID THING_TYPE_ON_OFF_LIGHT = new ThingTypeUID(BINDING_ID, "onOff");
43     public static final ThingTypeUID THING_TYPE_DIMMABLE_LIGHT = new ThingTypeUID(BINDING_ID, "dimmer");
44     public static final ThingTypeUID THING_TYPE_BLIND = new ThingTypeUID(BINDING_ID, "blind");
45     public static final ThingTypeUID THING_TYPE_THERMOSTAT = new ThingTypeUID(BINDING_ID, "thermostat");
46     public static final ThingTypeUID THING_TYPE_ENERGYMETER = new ThingTypeUID(BINDING_ID, "energyMeter");
47
48     // thing type sets
49     public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Collections
50             .unmodifiableSet(Stream.of(BRIDGEI_THING_TYPE, BRIDGEII_THING_TYPE).collect(Collectors.toSet()));
51     public static final Set<ThingTypeUID> ACTION_THING_TYPES_UIDS = Collections.unmodifiableSet(
52             Stream.of(THING_TYPE_PUSHBUTTON, THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT, THING_TYPE_BLIND)
53                     .collect(Collectors.toSet()));
54     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
55             .unmodifiableSet(Stream.of(THING_TYPE_PUSHBUTTON, THING_TYPE_ON_OFF_LIGHT, THING_TYPE_DIMMABLE_LIGHT,
56                     THING_TYPE_BLIND, THING_TYPE_THERMOSTAT, THING_TYPE_ENERGYMETER).collect(Collectors.toSet()));
57
58     // List of all Channel ids
59     public static final String CHANNEL_BUTTON = "button";
60     public static final String CHANNEL_SWITCH = "switch";
61     public static final String CHANNEL_BRIGHTNESS = "brightness";
62     public static final String CHANNEL_ROLLERSHUTTER = "rollershutter";
63
64     public static final String CHANNEL_MEASURED = "measured";
65     public static final String CHANNEL_SETPOINT = "setpoint";
66     public static final String CHANNEL_OVERRULETIME = "overruletime";
67     public static final String CHANNEL_MODE = "mode";
68     public static final String CHANNEL_DEMAND = "demand";
69
70     public static final String CHANNEL_POWER = "power";
71
72     public static final String CHANNEL_ALARM = "alarm";
73     public static final String CHANNEL_NOTICE = "notice";
74
75     // Bridge config properties
76     public static final String CONFIG_HOST_NAME = "addr";
77     public static final String CONFIG_PORT = "port";
78     public static final String CONFIG_REFRESH = "refresh";
79     public static final String CONFIG_PROFILE = "profile";
80     public static final String CONFIG_PASSWORD = "password";
81
82     // Thing config properties
83     public static final String CONFIG_ACTION_ID = "actionId";
84     public static final String CONFIG_STEP_VALUE = "step";
85
86     public static final String CONFIG_THERMOSTAT_ID = "thermostatId";
87     public static final String CONFIG_OVERRULETIME = "overruleTime";
88
89     public static final String CONFIG_ENERGYMETER_ID = "energyMeterId";
90 }