2 * Copyright (c) 2010-2023 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.max.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 MaxBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Marcel Verpaalen - Initial contribution
30 public class MaxBindingConstants {
32 public static final String BINDING_ID = "max";
34 // List of main device types
35 public static final String DEVICE_THERMOSTAT = "thermostat";
36 public static final String DEVICE_THERMOSTATPLUS = "thermostatplus";
37 public static final String DEVICE_WALLTHERMOSTAT = "wallthermostat";
38 public static final String DEVICE_ECOSWITCH = "ecoswitch";
39 public static final String DEVICE_SHUTTERCONTACT = "shuttercontact";
40 public static final String BRIDGE_MAXCUBE = "bridge";
42 // List of all Thing Type UIDs
43 public static final ThingTypeUID HEATINGTHERMOSTAT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_THERMOSTAT);
44 public static final ThingTypeUID HEATINGTHERMOSTATPLUS_THING_TYPE = new ThingTypeUID(BINDING_ID,
45 DEVICE_THERMOSTATPLUS);
46 public static final ThingTypeUID WALLTHERMOSTAT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_WALLTHERMOSTAT);
47 public static final ThingTypeUID ECOSWITCH_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_ECOSWITCH);
48 public static final ThingTypeUID SHUTTERCONTACT_THING_TYPE = new ThingTypeUID(BINDING_ID, DEVICE_SHUTTERCONTACT);
49 public static final ThingTypeUID CUBEBRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, BRIDGE_MAXCUBE);
51 // List of all Channel ids
52 public static final String CHANNEL_VALVE = "valve";
53 public static final String CHANNEL_BATTERY = "battery_low";
54 public static final String CHANNEL_MODE = "mode";
55 public static final String CHANNEL_ACTUALTEMP = "actual_temp";
56 public static final String CHANNEL_SETTEMP = "set_temp";
57 public static final String CHANNEL_LOCKED = "locked";
58 public static final String CHANNEL_CONTACT_STATE = "contact_state";
59 public static final String CHANNEL_FREE_MEMORY = "free_mem";
60 public static final String CHANNEL_DUTY_CYCLE = "duty_cycle";
63 public static final String PROPERTY_IP_ADDRESS = "ipAddress";
64 public static final String PROPERTY_VENDOR_NAME = "eQ-3 AG";
65 public static final String PROPERTY_RFADDRESS = "rfAddress";
66 public static final String PROPERTY_ROOMNAME = "room";
67 public static final String PROPERTY_ROOMID = "roomId";
68 public static final String PROPERTY_DEVICENAME = "name";
69 public static final String PROPERTY_REFRESH_ACTUAL_RATE = "refreshActualRate";
70 public static final String PROPERTY_NTP_SERVER1 = "ntpServer1";
71 public static final String PROPERTY_NTP_SERVER2 = "ntpServer2";
73 // Thermostat settings properties
74 public static final String PROPERTY_THERMO_COMFORT_TEMP = "comfortTemp";
75 public static final String PROPERTY_THERMO_ECO_TEMP = "ecoTemp";
76 public static final String PROPERTY_THERMO_MAX_TEMP_SETPOINT = "maxTempSetpoint";
77 public static final String PROPERTY_THERMO_MIN_TEMP_SETPOINT = "minTempSetpoint";
78 public static final String PROPERTY_THERMO_OFFSET_TEMP = "offsetTemp";
79 public static final String PROPERTY_THERMO_WINDOW_OPEN_TEMP = "windowOpenTemp";
80 public static final String PROPERTY_THERMO_WINDOW_OPEN_DURATION = "windowOpenDuration";
81 public static final String PROPERTY_THERMO_DECALCIFICATION = "decalcification";
82 public static final String PROPERTY_THERMO_VALVE_MAX = "valveMaximum";
83 public static final String PROPERTY_THERMO_VALVE_OFFSET = "valveOffset";
84 public static final String PROPERTY_THERMO_BOOST_DURATION = "boostDuration";
85 public static final String PROPERTY_THERMO_BOOST_VALVEPOS = "boostValvePos";
86 public static final String PROPERTY_THERMO_PROGRAM_DATA = "programData";
89 public static final String ACTION_CUBE_REBOOT = "action-cubeReboot";
90 public static final String ACTION_CUBE_RESET = "action-cubeReset";
91 public static final String ACTION_DEVICE_DELETE = "action-deviceDelete";
92 public static final String BUTTON_ACTION_VALUE = "1234";
93 public static final int BUTTON_NOACTION_VALUE = -1;
95 public static final Set<ThingTypeUID> SUPPORTED_DEVICE_THING_TYPES_UIDS = Collections.unmodifiableSet(
96 Stream.of(HEATINGTHERMOSTAT_THING_TYPE, HEATINGTHERMOSTATPLUS_THING_TYPE, WALLTHERMOSTAT_THING_TYPE,
97 ECOSWITCH_THING_TYPE, SHUTTERCONTACT_THING_TYPE).collect(Collectors.toSet()));
99 public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_THING_TYPES_UIDS = Collections
100 .unmodifiableSet(Stream.of(CUBEBRIDGE_THING_TYPE).collect(Collectors.toSet()));
102 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(
103 Stream.concat(SUPPORTED_DEVICE_THING_TYPES_UIDS.stream(), SUPPORTED_BRIDGE_THING_TYPES_UIDS.stream())
104 .collect(Collectors.toSet()));