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.valloxmv.internal;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
21 * The {@link ValloxMVBindingConstants} class defines common constants, which are
22 * used across the whole binding.
24 * @author Björn Brings - Initial contribution
27 public class ValloxMVBindingConstants {
29 private static final String BINDING_ID = "valloxmv";
31 // List of all Thing Type UIDs
32 public static final ThingTypeUID THING_TYPE_VALLOXMV = new ThingTypeUID(BINDING_ID, "valloxmv");
34 // 4 states of ventilation unit (Fireplace = 1, Away = 2, At home = 3, Boost = 4)
35 public static final int STATE_FIREPLACE = 1;
36 public static final int STATE_AWAY = 2;
37 public static final int STATE_ATHOME = 3;
38 public static final int STATE_BOOST = 4;
40 // List of all Channel ids
42 * Ventilation unit powered on
44 public static final String CHANNEL_ONOFF = "onoff";
47 * Current state ventilation unit (Fireplace = 1, Away = 2, At home = 3, Boost = 4)
49 public static final String CHANNEL_STATE = "state";
52 * Current fan speed (0 - 100)
54 public static final String CHANNEL_FAN_SPEED = "fanspeed";
57 * Current fan speed of extracting fan (1/min)
59 public static final String CHANNEL_FAN_SPEED_EXTRACT = "fanspeedextract";
62 * Current fan speed of supplying fan (1/min)
64 public static final String CHANNEL_FAN_SPEED_SUPPLY = "fanspeedsupply";
67 * Current temperature inside the building
69 public static final String CHANNEL_TEMPERATURE_INSIDE = "tempinside";
72 * Current temperature outside the building
74 public static final String CHANNEL_TEMPERATURE_OUTSIDE = "tempoutside";
77 * Current temperature of the air flow exhausting the building.
79 public static final String CHANNEL_TEMPERATURE_EXHAUST = "tempexhaust";
82 * Current temperature of the air flow incoming to the building before heating (if optional heating module included
83 * in ventilation unit).
85 public static final String CHANNEL_TEMPERATURE_INCOMING_BEFORE_HEATING = "tempincomingbeforeheating";
88 * Current temperature of the air flow incoming to the building.
90 public static final String CHANNEL_TEMPERATURE_INCOMING = "tempincoming";
93 * Current humidity of the air flow exhausting the building.
95 public static final String CHANNEL_HUMIDITY = "humidity";
98 * Current CO2 of the air flow exhausting the building.
100 public static final String CHANNEL_CO2 = "co2";
103 * Current cell state (0=heat recovery, 1=cool recovery, 2=bypass, 3=defrosting).
105 public static final String CHANNEL_CELLSTATE = "cellstate";
108 * Total uptime in years (+ uptime in hours = total uptime).
110 public static final String CHANNEL_UPTIME_YEARS = "uptimeyears";
113 * Total uptime in hours (+ uptime in years = total uptime).
115 public static final String CHANNEL_UPTIME_HOURS = "uptimehours";
118 * Current uptime in hours.
120 public static final String CHANNEL_UPTIME_HOURS_CURRENT = "uptimehourscurrent";
123 * Date filter was changed last time.
125 public static final String CHANNEL_FILTER_CHANGED_DATE = "filterchangeddate";
128 * Days until filter has to be changed.
130 public static final String CHANNEL_REMAINING_FILTER_DAYS = "remainingfilterdays";
133 * Extract fan base speed in % (0-100).
135 public static final String CHANNEL_EXTR_FAN_BALANCE_BASE = "extrfanbalancebase";
138 * Supply fan base speed in % (0-100).
140 public static final String CHANNEL_SUPP_FAN_BALANCE_BASE = "suppfanbalancebase";
143 * Home fan speed in % (0-100).
145 public static final String CHANNEL_HOME_SPEED_SETTING = "homespeedsetting";
148 * Away fan speed in % (0-100).
150 public static final String CHANNEL_AWAY_SPEED_SETTING = "awayspeedsetting";
153 * Boost fan speed in % (0-100).
155 public static final String CHANNEL_BOOST_SPEED_SETTING = "boostspeedsetting";
158 * Target temperature in home state.
160 public static final String CHANNEL_HOME_AIR_TEMP_TARGET = "homeairtemptarget";
163 * Target temperature in away state.
165 public static final String CHANNEL_AWAY_AIR_TEMP_TARGET = "awayairtemptarget";
168 * Target temperature in boost state.
170 public static final String CHANNEL_BOOST_AIR_TEMP_TARGET = "boostairtemptarget";
173 * Timer value setting in minutes of boost profile (1-65535).
175 public static final String CHANNEL_BOOST_TIME = "boosttime";
178 * Timer enabled setting in boost profile (Enabled = 1, Disabled = 0).
180 public static final String CHANNEL_BOOST_TIMER_ENABLED = "boosttimerenabled";
183 * Fireplace profile extract fan speed setting in % (0-100).
185 public static final String CHANNEL_FIREPLACE_EXTR_FAN = "fireplaceextrfan";
188 * Fireplace profile supply fan speed setting in % (0-100).
190 public static final String CHANNEL_FIREPLACE_SUPP_FAN = "fireplacesuppfan";
193 * Timer value setting in minutes of fireplace profile (1-65535).
195 public static final String CHANNEL_FIREPLACE_TIME = "fireplacetime";
198 * Timer enabled setting in fireplace profile (Enabled = 1, Disabled = 0).
200 public static final String CHANNEL_FIREPLACE_TIMER_ENABLED = "fireplacetimerenabled";
203 * Programmable profile enabled
204 * Not sure if this is needed at all, Vallox modbus document does not list this.
206 // public static final String CHANNEL_EXTRA_ENABLED = "extraenabled";
209 * Target temperature in programmable profile.
211 public static final String CHANNEL_EXTRA_AIR_TEMP_TARGET = "extraairtemptarget";
214 * Programmable profile extract fan speed setting in % (0-100).
216 public static final String CHANNEL_EXTRA_EXTR_FAN = "extraextrfan";
219 * Programmable profile supply fan speed setting in % (0-100).
221 public static final String CHANNEL_EXTRA_SUPP_FAN = "extrasuppfan";
224 * Timer value setting in minutes of programmable profile (1-65535).
226 public static final String CHANNEL_EXTRA_TIME = "extratime";
229 * Timer enabled setting in programmable profile (Enabled = 1, Disabled = 0).
231 public static final String CHANNEL_EXTRA_TIMER_ENABLED = "extratimerenabled";
234 * Weekly Timer enabled setting (Enabled = 1, Disabled = 0).
236 public static final String CHANNEL_WEEKLY_TIMER_ENABLED = "weeklytimerenabled";
239 * Set of writable channels that are Switches
241 public static final Set<String> WRITABLE_CHANNELS_SWITCHES = Set.of(CHANNEL_ONOFF, CHANNEL_BOOST_TIMER_ENABLED,
242 CHANNEL_FIREPLACE_TIMER_ENABLED, CHANNEL_EXTRA_TIMER_ENABLED, CHANNEL_WEEKLY_TIMER_ENABLED);
246 * Set of writable channels that are dimensionless
248 public static final Set<String> WRITABLE_CHANNELS_DIMENSIONLESS = Set.of(CHANNEL_EXTR_FAN_BALANCE_BASE,
249 CHANNEL_SUPP_FAN_BALANCE_BASE, CHANNEL_HOME_SPEED_SETTING, CHANNEL_AWAY_SPEED_SETTING,
250 CHANNEL_BOOST_SPEED_SETTING, CHANNEL_BOOST_TIME, CHANNEL_BOOST_TIMER_ENABLED, CHANNEL_FIREPLACE_EXTR_FAN,
251 CHANNEL_FIREPLACE_SUPP_FAN, CHANNEL_FIREPLACE_TIME, CHANNEL_FIREPLACE_TIMER_ENABLED, CHANNEL_EXTRA_EXTR_FAN,
252 CHANNEL_EXTRA_SUPP_FAN, CHANNEL_EXTRA_TIME, CHANNEL_EXTRA_TIMER_ENABLED, CHANNEL_WEEKLY_TIMER_ENABLED);
255 * Set of writable channels that are temperatures
257 public static final Set<String> WRITABLE_CHANNELS_TEMPERATURE = Set.of(CHANNEL_HOME_AIR_TEMP_TARGET,
258 CHANNEL_AWAY_AIR_TEMP_TARGET, CHANNEL_BOOST_AIR_TEMP_TARGET, CHANNEL_EXTRA_AIR_TEMP_TARGET);
260 // Thing configuration
262 * Name of the configuration parameters
264 public static final String CONFIG_UPDATE_INTERVAL = "updateinterval";
265 public static final String CONFIG_IP = "ip";