2 * Copyright (c) 2010-2020 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 cell state (0=heat recovery, 1=cool recovery, 2=bypass, 3=defrosting).
103 public static final String CHANNEL_CELLSTATE = "cellstate";
106 * Total uptime in years (+ uptime in hours = total uptime).
108 public static final String CHANNEL_UPTIME_YEARS = "uptimeyears";
111 * Total uptime in hours (+ uptime in years = total uptime).
113 public static final String CHANNEL_UPTIME_HOURS = "uptimehours";
116 * Current uptime in hours.
118 public static final String CHANNEL_UPTIME_HOURS_CURRENT = "uptimehourscurrent";
121 * Date filter was changed last time.
123 public static final String CHANNEL_FILTER_CHANGED_DATE = "filterchangeddate";
126 * Days until filter has to be changed.
128 public static final String CHANNEL_REMAINING_FILTER_DAYS = "remainingfilterdays";
131 * Extract fan base speed in % (0-100).
133 public static final String CHANNEL_EXTR_FAN_BALANCE_BASE = "extrfanbalancebase";
136 * Supply fan base speed in % (0-100).
138 public static final String CHANNEL_SUPP_FAN_BALANCE_BASE = "suppfanbalancebase";
141 * Home fan speed in % (0-100).
143 public static final String CHANNEL_HOME_SPEED_SETTING = "homespeedsetting";
146 * Away fan speed in % (0-100).
148 public static final String CHANNEL_AWAY_SPEED_SETTING = "awayspeedsetting";
151 * Boost fan speed in % (0-100).
153 public static final String CHANNEL_BOOST_SPEED_SETTING = "boostspeedsetting";
156 * Target temperature in home state.
158 public static final String CHANNEL_HOME_AIR_TEMP_TARGET = "homeairtemptarget";
161 * Target temperature in away state.
163 public static final String CHANNEL_AWAY_AIR_TEMP_TARGET = "awayairtemptarget";
166 * Target temperature in boost state.
168 public static final String CHANNEL_BOOST_AIR_TEMP_TARGET = "boostairtemptarget";
171 * Timer value setting in minutes of boost profile (1-65535).
173 public static final String CHANNEL_BOOST_TIME = "boosttime";
176 * Timer enabled setting in boost profile (Enabled = 1, Disabled = 0).
178 public static final String CHANNEL_BOOST_TIMER_ENABLED = "boosttimerenabled";
181 * Fireplace profile extract fan speed setting in % (0-100).
183 public static final String CHANNEL_FIREPLACE_EXTR_FAN = "fireplaceextrfan";
186 * Fireplace profile supply fan speed setting in % (0-100).
188 public static final String CHANNEL_FIREPLACE_SUPP_FAN = "fireplacesuppfan";
191 * Timer value setting in minutes of fireplace profile (1-65535).
193 public static final String CHANNEL_FIREPLACE_TIME = "fireplacetime";
196 * Timer enabled setting in fireplace profile (Enabled = 1, Disabled = 0).
198 public static final String CHANNEL_FIREPLACE_TIMER_ENABLED = "fireplacetimerenabled";
201 * Programmable profile enabled
202 * Not sure if this is needed at all, Vallox modbus document does not list this.
204 // public static final String CHANNEL_EXTRA_ENABLED = "extraenabled";
207 * Target temperature in programmable profile.
209 public static final String CHANNEL_EXTRA_AIR_TEMP_TARGET = "extraairtemptarget";
212 * Programmable profile extract fan speed setting in % (0-100).
214 public static final String CHANNEL_EXTRA_EXTR_FAN = "extraextrfan";
217 * Programmable profile supply fan speed setting in % (0-100).
219 public static final String CHANNEL_EXTRA_SUPP_FAN = "extrasuppfan";
222 * Timer value setting in minutes of programmable profile (1-65535).
224 public static final String CHANNEL_EXTRA_TIME = "extratime";
227 * Timer enabled setting in programmable profile (Enabled = 1, Disabled = 0).
229 public static final String CHANNEL_EXTRA_TIMER_ENABLED = "extratimerenabled";
232 * Weekly Timer enabled setting (Enabled = 1, Disabled = 0).
234 public static final String CHANNEL_WEEKLY_TIMER_ENABLED = "weeklytimerenabled";
237 * Set of writable channels that are Switches
239 public static final Set<String> WRITABLE_CHANNELS_SWITCHES = Collections
240 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_ONOFF, CHANNEL_BOOST_TIMER_ENABLED,
241 CHANNEL_FIREPLACE_TIMER_ENABLED, CHANNEL_EXTRA_TIMER_ENABLED, CHANNEL_WEEKLY_TIMER_ENABLED)));
245 * Set of writable channels that are dimensionless
247 public static final Set<String> WRITABLE_CHANNELS_DIMENSIONLESS = Collections
248 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_EXTR_FAN_BALANCE_BASE, CHANNEL_SUPP_FAN_BALANCE_BASE,
249 CHANNEL_HOME_SPEED_SETTING, CHANNEL_AWAY_SPEED_SETTING, CHANNEL_BOOST_SPEED_SETTING,
250 CHANNEL_BOOST_TIME, CHANNEL_BOOST_TIMER_ENABLED, CHANNEL_FIREPLACE_EXTR_FAN,
251 CHANNEL_FIREPLACE_SUPP_FAN, CHANNEL_FIREPLACE_TIME, CHANNEL_FIREPLACE_TIMER_ENABLED,
252 CHANNEL_EXTRA_EXTR_FAN, CHANNEL_EXTRA_SUPP_FAN, CHANNEL_EXTRA_TIME, CHANNEL_EXTRA_TIMER_ENABLED,
253 CHANNEL_WEEKLY_TIMER_ENABLED)));
256 * Set of writable channels that are temperatures
258 public static final Set<String> WRITABLE_CHANNELS_TEMPERATURE = Collections
259 .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_HOME_AIR_TEMP_TARGET, CHANNEL_AWAY_AIR_TEMP_TARGET,
260 CHANNEL_BOOST_AIR_TEMP_TARGET, CHANNEL_EXTRA_AIR_TEMP_TARGET)));
262 // Thing configuration
264 * Name of the configuration parameters
266 public static final String CONFIG_UPDATE_INTERVAL = "updateinterval";
267 public static final String CONFIG_IP = "ip";