]> git.basschouten.com Git - openhab-addons.git/blob
96a1b8b42dc73c9491fe21e2d4ee5582cd28acc0
[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.zway.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 ZWayBinding} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Patrick Hecker - Initial contribution
28  */
29 @NonNullByDefault
30 public class ZWayBindingConstants {
31
32     public static final String BINDING_ID = "zway";
33
34     // List of all Thing Type UIDs
35     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "zwayServer");
36     public static final ThingTypeUID THING_TYPE_DEVICE = new ThingTypeUID(BINDING_ID, "zwayDevice");
37     public static final ThingTypeUID THING_TYPE_VIRTUAL_DEVICE = new ThingTypeUID(BINDING_ID, "zwayVirtualDevice");
38
39     public static final Set<ThingTypeUID> SUPPORTED_DEVICE_THING_TYPES_UIDS = Collections
40             .unmodifiableSet(Stream.of(THING_TYPE_DEVICE, THING_TYPE_VIRTUAL_DEVICE).collect(Collectors.toSet()));
41
42     // List of ignored devices for Discovery
43     public static final Set<String> DISCOVERY_IGNORED_DEVICES = Collections
44             .unmodifiableSet(Collections.singleton(("BatteryPolling")));
45
46     // List of all Channel IDs
47     public static final String BATTERY_CHANNEL = "battery";
48     public static final String DOORLOCK_CHANNEL = "doorlock";
49     public static final String SENSOR_BINARY_CHANNEL = "sensorBinary";
50     public static final String SENSOR_MULTILEVEL_CHANNEL = "sensorMultilevel";
51     public static final String SENSOR_DISCRETE_CHANNEL = "sensorDiscrete";
52     public static final String SWITCH_BINARY_CHANNEL = "switchBinary";
53     public static final String SWITCH_CONTROL_CHANNEL = "switchControl";
54     public static final String SWITCH_MULTILEVEL_CHANNEL = "switchMultilevel";
55     // switch multilevel (color)
56     public static final String SWITCH_COLOR_CHANNEL = "switchColor";
57     public static final String SWITCH_COLOR_TEMPERATURE_CHANNEL = "switchColorTemperature";
58     // thermostat
59     public static final String THERMOSTAT_MODE_CHANNEL = "thermostatMode";
60     public static final String THERMOSTAT_SET_POINT_CHANNEL = "thermostatSetPoint";
61
62     public static final String THERMOSTAT_MODE_CC_CHANNEL = "thermostatModeCC";
63
64     // sensor multilevel
65     public static final String SENSOR_TEMPERATURE_CHANNEL = "sensorTemperature";
66     public static final String SENSOR_LUMINOSITY_CHANNEL = "sensorLuminosity";
67     public static final String SENSOR_HUMIDITY_CHANNEL = "sensorHumidity";
68     public static final String SENSOR_BAROMETER_CHANNEL = "sensorBarometer";
69     public static final String SENSOR_ULTRAVIOLET_CHANNEL = "sensorUltraviolet";
70     public static final String SENSOR_CO2_CHANNEL = "sensorCO2";
71     public static final String SENSOR_ENERGY_CHANNEL = "sensorEnergy";
72     // sensor multilevel (meter)
73     public static final String SENSOR_METER_KWH_CHANNEL = "sensorMeterKWh";
74     public static final String SENSOR_METER_W_CHANNEL = "sensorMeterW";
75     // sensor binary
76     public static final String SENSOR_SMOKE_CHANNEL = "sensorSmoke";
77     public static final String SENSOR_CO_CHANNEL = "sensorCo";
78     public static final String SENSOR_FLOOD_CHANNEL = "sensorFlood";
79     public static final String SENSOR_TAMPER_CHANNEL = "sensorTamper";
80     public static final String SENSOR_DOOR_WINDOW_CHANNEL = "sensorDoorWindow";
81     public static final String SENSOR_MOTION_CHANNEL = "sensorMotion";
82     // switch binary
83     public static final String SWITCH_POWER_OUTLET_CHANNEL = "switchPowerOutlet";
84     // switch multilevel
85     public static final String SWITCH_ROLLERSHUTTER_CHANNEL = "switchBlinds";
86     // special channels
87     public static final String ACTIONS_CHANNEL = "actions";
88     public static final String SECURE_INCLUSION_CHANNEL = "secureInclusion";
89     public static final String INCLUSION_CHANNEL = "inclusion";
90     public static final String EXCLUSION_CHANNEL = "exclusion";
91
92     public static final String ACTIONS_CHANNEL_OPTION_REFRESH = "REFRESH";
93
94     /* Bridge config properties */
95     public static final String BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS = "zwayServerIpAddress";
96     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PORT = "zwayServerPort";
97     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL = "zwayServerProtocol";
98     public static final String BRIDGE_CONFIG_ZWAY_SERVER_USERNAME = "zwayServerUsername";
99     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD = "zwayServerPassword";
100     public static final String BRIDGE_CONFIG_POLLING_INTERVAL = "pollingInterval";
101
102     public static final String DEVICE_CONFIG_NODE_ID = "nodeId";
103     public static final String DEVICE_CONFIG_VIRTUAL_DEVICE_ID = "deviceId";
104
105     public static final String DEVICE_PROP_LOCATION = "location";
106     public static final String DEVICE_PROP_MANUFACTURER_ID = "manufacturerId";
107     public static final String DEVICE_PROP_DEVICE_TYPE = "deviceType";
108     public static final String DEVICE_PROP_ZDDXMLFILE = "zddxmlfile";
109     public static final String DEVICE_PROP_SDK = "SDK";
110     public static final String DEVICE_PROP_LAST_UPDATE = "lastUpdate";
111
112     /* Bridge properties */
113     public static final String BRIDGE_PROP_SOFTWARE_REVISION_VERSION = "softwareRevisionVersion";
114     public static final String BRIDGE_PROP_SOFTWARE_REVISION_DATE = "softwareRevisionDate";
115     public static final String BRIDGE_PROP_SDK = "SDK";
116     public static final String BRIDGE_PROP_MANUFACTURER_ID = "manufacturerId";
117     public static final String BRIDGE_PROP_SECURE_INCLUSION = "secureInclusion";
118     public static final String BRIDGE_PROP_FREQUENCY = "frequency";
119 }