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;
15 import java.util.Arrays;
16 import java.util.Collections;
17 import java.util.HashSet;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link ValloxMVBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Björn Brings - Initial contribution
30 public class ValloxMVBindingConstants {
32 private static final String BINDING_ID = "valloxmv";
34 // List of all Thing Type UIDs
35 public static final ThingTypeUID THING_TYPE_VALLOXMV = new ThingTypeUID(BINDING_ID, "valloxmv");
37 // 4 states of ventilation unit (Fireplace = 1, Away = 2, At home = 3, Boost = 4)
38 public static final int STATE_FIREPLACE = 1;
39 public static final int STATE_AWAY = 2;
40 public static final int STATE_ATHOME = 3;
41 public static final int STATE_BOOST = 4;
43 // List of all Channel ids
45 * Ventilation unit powered on
47 public static final String CHANNEL_ONOFF = "onoff";
50 * Current state ventilation unit (Fireplace = 1, Away = 2, At home = 3, Boost = 4)
52 public static final String CHANNEL_STATE = "state";
55 * Current fan speed (0 - 100)
57 public static final String CHANNEL_FAN_SPEED = "fanspeed";
60 * Current fan speed of extracting fan (1/min)
62 public static final String CHANNEL_FAN_SPEED_EXTRACT = "fanspeedextract";
65 * Current fan speed of supplying fan (1/min)
67 public static final String CHANNEL_FAN_SPEED_SUPPLY = "fanspeedsupply";
70 * Current temperature inside the building
72 public static final String CHANNEL_TEMPERATURE_INSIDE = "tempinside";
75 * Current temperature outside the building
77 public static final String CHANNEL_TEMPERATURE_OUTSIDE = "tempoutside";
80 * Current temperature of the air flow exhausting the building.
82 public static final String CHANNEL_TEMPERATURE_EXHAUST = "tempexhaust";
85 * Current temperature of the air flow incoming to the building before heating (if optional heating module included
86 * in ventilation unit).
88 public static final String CHANNEL_TEMPERATURE_INCOMING_BEFORE_HEATING = "tempincomingbeforeheating";
91 * Current temperature of the air flow incoming to the building.
93 public static final String CHANNEL_TEMPERATURE_INCOMING = "tempincoming";
96 * Current humidity of the air flow exhausting the building.
98 public static final String CHANNEL_HUMIDITY = "humidity";
101 * Current CO2 of the air flow exhausting the building.
103 public static final String CHANNEL_CO2 = "co2";
106 * Current cell state (0=heat recovery, 1=cool recovery, 2=bypass, 3=defrosting).
108 public static final String CHANNEL_CELLSTATE = "cellstate";
111 * Total uptime in years (+ uptime in hours = total uptime).
113 public static final String CHANNEL_UPTIME_YEARS = "uptimeyears";
116 * Total uptime in hours (+ uptime in years = total uptime).
118 public static final String CHANNEL_UPTIME_HOURS = "uptimehours";
121 * Current uptime in hours.
123 public static final String CHANNEL_UPTIME_HOURS_CURRENT = "uptimehourscurrent";
126 * Date filter was changed last time.
128 public static final String CHANNEL_FILTER_CHANGED_DATE = "filterchangeddate";
131 * Days until filter has to be changed.
133 public static final String CHANNEL_REMAINING_FILTER_DAYS = "remainingfilterdays";
136 * Extract fan base speed in % (0-100).
138 public static final String CHANNEL_EXTR_FAN_BALANCE_BASE = "extrfanbalancebase";
141 * Supply fan base speed in % (0-100).
143 public static final String CHANNEL_SUPP_FAN_BALANCE_BASE = "suppfanbalancebase";
146 * Home fan speed in % (0-100).
148 public static final String CHANNEL_HOME_SPEED_SETTING = "homespeedsetting";
151 * Away fan speed in % (0-100).
153 public static final String CHANNEL_AWAY_SPEED_SETTING = "awayspeedsetting";
156 * Boost fan speed in % (0-100).
158 public static final String CHANNEL_BOOST_SPEED_SETTING = "boostspeedsetting";
161 * Target temperature in home state.
163 public static final String CHANNEL_HOME_AIR_TEMP_TARGET = "homeairtemptarget";
166 * Target temperature in away state.
168 public static final String CHANNEL_AWAY_AIR_TEMP_TARGET = "awayairtemptarget";
171 * Target temperature in boost state.
173 public static final String CHANNEL_BOOST_AIR_TEMP_TARGET = "boostairtemptarget";
176 * Timer value setting in minutes of boost profile (1-65535).
178 public static final String CHANNEL_BOOST_TIME = "boosttime";
181 * Timer enabled setting in boost profile (Enabled = 1, Disabled = 0).
183 public static final String CHANNEL_BOOST_TIMER_ENABLED = "boosttimerenabled";
186 * Fireplace profile extract fan speed setting in % (0-100).
188 public static final String CHANNEL_FIREPLACE_EXTR_FAN = "fireplaceextrfan";
191 * Fireplace profile supply fan speed setting in % (0-100).
193 public static final String CHANNEL_FIREPLACE_SUPP_FAN = "fireplacesuppfan";
196 * Timer value setting in minutes of fireplace profile (1-65535).
198 public static final String CHANNEL_FIREPLACE_TIME = "fireplacetime";
201 * Timer enabled setting in fireplace profile (Enabled = 1, Disabled = 0).
203 public static final String CHANNEL_FIREPLACE_TIMER_ENABLED = "fireplacetimerenabled";
206 * Programmable profile enabled
207 * Not sure if this is needed at all, Vallox modbus document does not list this.
209 // public static final String CHANNEL_EXTRA_ENABLED = "extraenabled";
212 * Target temperature in programmable profile.
214 public static final String CHANNEL_EXTRA_AIR_TEMP_TARGET = "extraairtemptarget";
217 * Programmable profile extract fan speed setting in % (0-100).
219 public static final String CHANNEL_EXTRA_EXTR_FAN = "extraextrfan";
222 * Programmable profile supply fan speed setting in % (0-100).
224 public static final String CHANNEL_EXTRA_SUPP_FAN = "extrasuppfan";
227 * Timer value setting in minutes of programmable profile (1-65535).
229 public static final String CHANNEL_EXTRA_TIME = "extratime";
232 * Timer enabled setting in programmable profile (Enabled = 1, Disabled = 0).
234 public static final String CHANNEL_EXTRA_TIMER_ENABLED = "extratimerenabled";
237 * Weekly Timer enabled setting (Enabled = 1, Disabled = 0).
239 public static final String CHANNEL_WEEKLY_TIMER_ENABLED = "weeklytimerenabled";
242 * Set of writable channels that are Switches
244 public static final Set<String> WRITABLE_CHANNELS_SWITCHES = Collections
245 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_ONOFF, CHANNEL_BOOST_TIMER_ENABLED,
246 CHANNEL_FIREPLACE_TIMER_ENABLED, CHANNEL_EXTRA_TIMER_ENABLED, CHANNEL_WEEKLY_TIMER_ENABLED)));
250 * Set of writable channels that are dimensionless
252 public static final Set<String> WRITABLE_CHANNELS_DIMENSIONLESS = Collections
253 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_EXTR_FAN_BALANCE_BASE, CHANNEL_SUPP_FAN_BALANCE_BASE,
254 CHANNEL_HOME_SPEED_SETTING, CHANNEL_AWAY_SPEED_SETTING, CHANNEL_BOOST_SPEED_SETTING,
255 CHANNEL_BOOST_TIME, CHANNEL_BOOST_TIMER_ENABLED, CHANNEL_FIREPLACE_EXTR_FAN,
256 CHANNEL_FIREPLACE_SUPP_FAN, CHANNEL_FIREPLACE_TIME, CHANNEL_FIREPLACE_TIMER_ENABLED,
257 CHANNEL_EXTRA_EXTR_FAN, CHANNEL_EXTRA_SUPP_FAN, CHANNEL_EXTRA_TIME, CHANNEL_EXTRA_TIMER_ENABLED,
258 CHANNEL_WEEKLY_TIMER_ENABLED)));
261 * Set of writable channels that are temperatures
263 public static final Set<String> WRITABLE_CHANNELS_TEMPERATURE = Collections
264 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_HOME_AIR_TEMP_TARGET, CHANNEL_AWAY_AIR_TEMP_TARGET,
265 CHANNEL_BOOST_AIR_TEMP_TARGET, CHANNEL_EXTRA_AIR_TEMP_TARGET)));
267 // Thing configuration
269 * Name of the configuration parameters
271 public static final String CONFIG_UPDATE_INTERVAL = "updateinterval";
272 public static final String CONFIG_IP = "ip";