]> git.basschouten.com Git - openhab-addons.git/blob
91ab3de07326fc77faf86b928093499664a7e55d
[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 ZWayBindingConstants} 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.unmodifiableSet(Set.of(("BatteryPolling")));
44
45     // List of all Channel IDs
46     public static final String BATTERY_CHANNEL = "battery";
47     public static final String DOORLOCK_CHANNEL = "doorlock";
48     public static final String SENSOR_BINARY_CHANNEL = "sensorBinary";
49     public static final String SENSOR_MULTILEVEL_CHANNEL = "sensorMultilevel";
50     public static final String SENSOR_DISCRETE_CHANNEL = "sensorDiscrete";
51     public static final String SWITCH_BINARY_CHANNEL = "switchBinary";
52     public static final String SWITCH_CONTROL_CHANNEL = "switchControl";
53     public static final String SWITCH_MULTILEVEL_CHANNEL = "switchMultilevel";
54     // switch multilevel (color)
55     public static final String SWITCH_COLOR_CHANNEL = "switchColor";
56     public static final String SWITCH_COLOR_TEMPERATURE_CHANNEL = "switchColorTemperature";
57     // thermostat
58     public static final String THERMOSTAT_MODE_CHANNEL = "thermostatMode";
59     public static final String THERMOSTAT_SET_POINT_CHANNEL = "thermostatSetPoint";
60
61     public static final String THERMOSTAT_MODE_CC_CHANNEL = "thermostatModeCC";
62
63     // sensor multilevel
64     public static final String SENSOR_TEMPERATURE_CHANNEL = "sensorTemperature";
65     public static final String SENSOR_LUMINOSITY_CHANNEL = "sensorLuminosity";
66     public static final String SENSOR_HUMIDITY_CHANNEL = "sensorHumidity";
67     public static final String SENSOR_BAROMETER_CHANNEL = "sensorBarometer";
68     public static final String SENSOR_ULTRAVIOLET_CHANNEL = "sensorUltraviolet";
69     public static final String SENSOR_CO2_CHANNEL = "sensorCO2";
70     public static final String SENSOR_ENERGY_CHANNEL = "sensorEnergy";
71     // sensor multilevel (meter)
72     public static final String SENSOR_METER_KWH_CHANNEL = "sensorMeterKWh";
73     public static final String SENSOR_METER_W_CHANNEL = "sensorMeterW";
74     // sensor binary
75     public static final String SENSOR_SMOKE_CHANNEL = "sensorSmoke";
76     public static final String SENSOR_CO_CHANNEL = "sensorCo";
77     public static final String SENSOR_FLOOD_CHANNEL = "sensorFlood";
78     public static final String SENSOR_TAMPER_CHANNEL = "sensorTamper";
79     public static final String SENSOR_DOOR_WINDOW_CHANNEL = "sensorDoorWindow";
80     public static final String SENSOR_MOTION_CHANNEL = "sensorMotion";
81     // switch binary
82     public static final String SWITCH_POWER_OUTLET_CHANNEL = "switchPowerOutlet";
83     // switch multilevel
84     public static final String SWITCH_ROLLERSHUTTER_CHANNEL = "switchBlinds";
85     // special channels
86     public static final String ACTIONS_CHANNEL = "actions";
87     public static final String SECURE_INCLUSION_CHANNEL = "secureInclusion";
88     public static final String INCLUSION_CHANNEL = "inclusion";
89     public static final String EXCLUSION_CHANNEL = "exclusion";
90
91     public static final String ACTIONS_CHANNEL_OPTION_REFRESH = "REFRESH";
92
93     /* Bridge config properties */
94     public static final String BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS = "zwayServerIpAddress";
95     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PORT = "zwayServerPort";
96     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL = "zwayServerProtocol";
97     public static final String BRIDGE_CONFIG_ZWAY_SERVER_USERNAME = "zwayServerUsername";
98     public static final String BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD = "zwayServerPassword";
99     public static final String BRIDGE_CONFIG_POLLING_INTERVAL = "pollingInterval";
100
101     public static final String DEVICE_CONFIG_NODE_ID = "nodeId";
102     public static final String DEVICE_CONFIG_VIRTUAL_DEVICE_ID = "deviceId";
103
104     public static final String DEVICE_PROP_LOCATION = "location";
105     public static final String DEVICE_PROP_MANUFACTURER_ID = "manufacturerId";
106     public static final String DEVICE_PROP_DEVICE_TYPE = "deviceType";
107     public static final String DEVICE_PROP_ZDDXMLFILE = "zddxmlfile";
108     public static final String DEVICE_PROP_SDK = "SDK";
109     public static final String DEVICE_PROP_LAST_UPDATE = "lastUpdate";
110
111     /* Bridge properties */
112     public static final String BRIDGE_PROP_SOFTWARE_REVISION_VERSION = "softwareRevisionVersion";
113     public static final String BRIDGE_PROP_SOFTWARE_REVISION_DATE = "softwareRevisionDate";
114     public static final String BRIDGE_PROP_SDK = "SDK";
115     public static final String BRIDGE_PROP_MANUFACTURER_ID = "manufacturerId";
116     public static final String BRIDGE_PROP_SECURE_INCLUSION = "secureInclusion";
117     public static final String BRIDGE_PROP_FREQUENCY = "frequency";
118 }