2 * Copyright (c) 2010-2024 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.nikohomecontrol.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 NikoHomeControlBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Mark Herwege - Initial Contribution
30 public class NikoHomeControlBindingConstants {
32 public static final String BINDING_ID = "nikohomecontrol";
34 // Listener threadname prefix
35 public static final String THREAD_NAME_PREFIX = "OH-binding-";
37 // List of all Thing Type UIDs
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");
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");
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()));
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";
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";
75 public static final String CHANNEL_POWER = "power";
77 public static final String CHANNEL_ALARM = "alarm";
78 public static final String CHANNEL_NOTICE = "notice";
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";
87 // Thing config properties
88 public static final String CONFIG_ACTION_ID = "actionId";
89 public static final String CONFIG_STEP_VALUE = "step";
91 public static final String CONFIG_THERMOSTAT_ID = "thermostatId";
92 public static final String CONFIG_OVERRULETIME = "overruleTime";
94 public static final String CONFIG_ENERGYMETER_ID = "energyMeterId";
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";