]> git.basschouten.com Git - openhab-addons.git/blob
453b8f0a582733c184967b2cc8f0bef636ce8f69
[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.valloxmv.internal;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
19
20 /**
21  * The {@link ValloxMVBindingConstants} class defines common constants, which are
22  * used across the whole binding.
23  *
24  * @author Björn Brings - Initial contribution
25  */
26 @NonNullByDefault
27 public class ValloxMVBindingConstants {
28
29     private static final String BINDING_ID = "valloxmv";
30
31     // List of all Thing Type UIDs
32     public static final ThingTypeUID THING_TYPE_VALLOXMV = new ThingTypeUID(BINDING_ID, "valloxmv");
33
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;
39
40     // List of all Channel ids
41     /**
42      * Ventilation unit powered on
43      */
44     public static final String CHANNEL_ONOFF = "onoff";
45
46     /**
47      * Current state ventilation unit (Fireplace = 1, Away = 2, At home = 3, Boost = 4)
48      */
49     public static final String CHANNEL_STATE = "state";
50
51     /**
52      * Current fan speed (0 - 100)
53      */
54     public static final String CHANNEL_FAN_SPEED = "fanspeed";
55
56     /**
57      * Current fan speed of extracting fan (1/min)
58      */
59     public static final String CHANNEL_FAN_SPEED_EXTRACT = "fanspeedextract";
60
61     /**
62      * Current fan speed of supplying fan (1/min)
63      */
64     public static final String CHANNEL_FAN_SPEED_SUPPLY = "fanspeedsupply";
65
66     /**
67      * Current temperature inside the building
68      */
69     public static final String CHANNEL_TEMPERATURE_INSIDE = "tempinside";
70
71     /**
72      * Current temperature outside the building
73      */
74     public static final String CHANNEL_TEMPERATURE_OUTSIDE = "tempoutside";
75
76     /**
77      * Current temperature of the air flow exhausting the building.
78      */
79     public static final String CHANNEL_TEMPERATURE_EXHAUST = "tempexhaust";
80
81     /**
82      * Current temperature of the air flow incoming to the building before heating (if optional heating module included
83      * in ventilation unit).
84      */
85     public static final String CHANNEL_TEMPERATURE_INCOMING_BEFORE_HEATING = "tempincomingbeforeheating";
86
87     /**
88      * Current temperature of the air flow incoming to the building.
89      */
90     public static final String CHANNEL_TEMPERATURE_INCOMING = "tempincoming";
91
92     /**
93      * Current humidity of the air flow exhausting the building.
94      */
95     public static final String CHANNEL_HUMIDITY = "humidity";
96
97     /**
98      * Current CO2 of the air flow exhausting the building.
99      */
100     public static final String CHANNEL_CO2 = "co2";
101
102     /**
103      * Current cell state (0=heat recovery, 1=cool recovery, 2=bypass, 3=defrosting).
104      */
105     public static final String CHANNEL_CELLSTATE = "cellstate";
106
107     /**
108      * Total uptime in years (+ uptime in hours = total uptime).
109      */
110     public static final String CHANNEL_UPTIME_YEARS = "uptimeyears";
111
112     /**
113      * Total uptime in hours (+ uptime in years = total uptime).
114      */
115     public static final String CHANNEL_UPTIME_HOURS = "uptimehours";
116
117     /**
118      * Current uptime in hours.
119      */
120     public static final String CHANNEL_UPTIME_HOURS_CURRENT = "uptimehourscurrent";
121
122     /**
123      * Date filter was changed last time.
124      */
125     public static final String CHANNEL_FILTER_CHANGED_DATE = "filterchangeddate";
126
127     /**
128      * Days until filter has to be changed.
129      */
130     public static final String CHANNEL_REMAINING_FILTER_DAYS = "remainingfilterdays";
131
132     /**
133      * Extract fan base speed in % (0-100).
134      */
135     public static final String CHANNEL_EXTR_FAN_BALANCE_BASE = "extrfanbalancebase";
136
137     /**
138      * Supply fan base speed in % (0-100).
139      */
140     public static final String CHANNEL_SUPP_FAN_BALANCE_BASE = "suppfanbalancebase";
141
142     /**
143      * Home fan speed in % (0-100).
144      */
145     public static final String CHANNEL_HOME_SPEED_SETTING = "homespeedsetting";
146
147     /**
148      * Away fan speed in % (0-100).
149      */
150     public static final String CHANNEL_AWAY_SPEED_SETTING = "awayspeedsetting";
151
152     /**
153      * Boost fan speed in % (0-100).
154      */
155     public static final String CHANNEL_BOOST_SPEED_SETTING = "boostspeedsetting";
156
157     /**
158      * Target temperature in home state.
159      */
160     public static final String CHANNEL_HOME_AIR_TEMP_TARGET = "homeairtemptarget";
161
162     /**
163      * Target temperature in away state.
164      */
165     public static final String CHANNEL_AWAY_AIR_TEMP_TARGET = "awayairtemptarget";
166
167     /**
168      * Target temperature in boost state.
169      */
170     public static final String CHANNEL_BOOST_AIR_TEMP_TARGET = "boostairtemptarget";
171
172     /**
173      * Timer value setting in minutes of boost profile (1-65535).
174      */
175     public static final String CHANNEL_BOOST_TIME = "boosttime";
176
177     /**
178      * Timer enabled setting in boost profile (Enabled = 1, Disabled = 0).
179      */
180     public static final String CHANNEL_BOOST_TIMER_ENABLED = "boosttimerenabled";
181
182     /**
183      * Fireplace profile extract fan speed setting in % (0-100).
184      */
185     public static final String CHANNEL_FIREPLACE_EXTR_FAN = "fireplaceextrfan";
186
187     /**
188      * Fireplace profile supply fan speed setting in % (0-100).
189      */
190     public static final String CHANNEL_FIREPLACE_SUPP_FAN = "fireplacesuppfan";
191
192     /**
193      * Timer value setting in minutes of fireplace profile (1-65535).
194      */
195     public static final String CHANNEL_FIREPLACE_TIME = "fireplacetime";
196
197     /**
198      * Timer enabled setting in fireplace profile (Enabled = 1, Disabled = 0).
199      */
200     public static final String CHANNEL_FIREPLACE_TIMER_ENABLED = "fireplacetimerenabled";
201
202     /**
203      * Programmable profile enabled
204      * Not sure if this is needed at all, Vallox modbus document does not list this.
205      */
206     // public static final String CHANNEL_EXTRA_ENABLED = "extraenabled";
207
208     /**
209      * Target temperature in programmable profile.
210      */
211     public static final String CHANNEL_EXTRA_AIR_TEMP_TARGET = "extraairtemptarget";
212
213     /**
214      * Programmable profile extract fan speed setting in % (0-100).
215      */
216     public static final String CHANNEL_EXTRA_EXTR_FAN = "extraextrfan";
217
218     /**
219      * Programmable profile supply fan speed setting in % (0-100).
220      */
221     public static final String CHANNEL_EXTRA_SUPP_FAN = "extrasuppfan";
222
223     /**
224      * Timer value setting in minutes of programmable profile (1-65535).
225      */
226     public static final String CHANNEL_EXTRA_TIME = "extratime";
227
228     /**
229      * Timer enabled setting in programmable profile (Enabled = 1, Disabled = 0).
230      */
231     public static final String CHANNEL_EXTRA_TIMER_ENABLED = "extratimerenabled";
232
233     /**
234      * Weekly Timer enabled setting (Enabled = 1, Disabled = 0).
235      */
236     public static final String CHANNEL_WEEKLY_TIMER_ENABLED = "weeklytimerenabled";
237
238     /**
239      * Set of writable channels that are Switches
240      */
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);
243
244     /**
245      *
246      * Set of writable channels that are dimensionless
247      */
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);
253
254     /**
255      * Set of writable channels that are temperatures
256      */
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);
259
260     // Thing configuration
261     /**
262      * Name of the configuration parameters
263      */
264     public static final String CONFIG_UPDATE_INTERVAL = "updateinterval";
265     public static final String CONFIG_IP = "ip";
266 }