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