]> git.basschouten.com Git - openhab-addons.git/blob
c6c6595458f16db7927d3ae562f2a98d79446042
[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.velux.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.velux.internal.VeluxBindingConstants;
17 import org.openhab.binding.velux.internal.things.VeluxProductSerialNo;
18 import org.openhab.core.config.core.Configuration;
19
20 /**
21  * The {@link VeluxThingConfiguration} is a wrapper for
22  * configuration settings needed to access the <B>Velux</B> device.
23  * <p>
24  * It contains the factory default values as well.
25  * <p>
26  * There are three parts. Information for:
27  * <UL>
28  * <LI>{@link #sceneName} Name of a scene,</LI>
29  * <LI>{@link #serial} Unique identification of type actuator, rollershutter and window,</LI>
30  * <LI>{@link #name} Alternate Unique identification of type actuator, rollershutter and window,</LI>
31  * <LI>{@link #inverted} Value inversion for an actuator, rollershutter or window,</LI>
32  * <LI>{@link #velocity} Speed value for a scene,</LI>
33  * <LI>{@link #sceneLevels} Virtual shutter definition as a set of scenes imitating a shutter,</LI>
34  * <LI>{@link #currentLevel} Initial state of Virtual shutter definition.</LI>
35  * </UL>
36  *
37  * @author Guenther Schreiner - Initial contribution.
38  * @author Andrew Fiddian-Green - adapted.
39  */
40 @NonNullByDefault
41 public class VeluxThingConfiguration extends Configuration {
42
43     /**
44      * {@link #sceneName} of type {@link String}, identifying a Velux scene by human-readable name.
45      * <P>
46      * <B>Configuration for the channel scene:</B>
47      * </P>
48      * <UL>
49      * <LI>{@link #sceneName} for identification of a set of settings, so called scene.</LI>
50      * </UL>
51      */
52     String sceneName = VeluxBindingConstants.UNKNOWN;
53
54     /**
55      * {@link #serial} of type {@link String}, identifying an io-homecontrol device by its serial number (i.e.
56      * 43:12:14:5A:12:1C:05:5F).
57      * <P>
58      * <B>Configuration for the channels actuator, rollershutter and window:</B>
59      * </P>
60      * <UL>
61      * <LI>{@link #serial} for identification of an io-homecontrol device,</LI>
62      * <LI>{@link #name} for alternate identification of an io-homecontrol device,</LI>
63      * <LI>{@link #inverted} for modified value behavior.</LI>
64      * <LI>{@link #velocity} for modified action speed.</LI>
65      * </UL>
66      */
67     public String serial = VeluxProductSerialNo.UNKNOWN;
68     /**
69      * {@link #name} of type {@link String}, identifying an io-homecontrol device by its registration name especially
70      * for <B>somfy</B> as they do not provide a valid serial number.
71      * <P>
72      * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
73      * </P>
74      */
75     String name = VeluxBindingConstants.UNKNOWN;
76     /**
77      * {@link #inverted} of type {@link Boolean}, inverts each Channel value. This means 0% will be handled as 100%,
78      * and vice versa, 100% will be handled as 0%.
79      * <P>
80      * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
81      * </P>
82      */
83     Boolean inverted = false;
84     /**
85      * {@link #velocity} of type {@link String}, describes the intended speed of action.
86      * Possible values are defined within VeluxProductVelocity.
87      * <P>
88      * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
89      * </P>
90      */
91     String velocity = VeluxBindingConstants.UNKNOWN;
92
93     /**
94      * {@link #sceneLevels} of type {@link String}, identifying a number of Velux scenes which act together as a virtual
95      * shutter. Each scene is defined to a corresponding shutter level.
96      * <P>
97      * <B>Configuration for the channel virtualshutter:</B>
98      * </P>
99      * <UL>
100      * <LI>{@link #sceneLevels} for identification of a set of settings, so called scene.</LI>
101      * </UL>
102      * <P>
103      * Additionally it contains an internal variable for keeping the actual virtual shutter level.
104      * </P>
105      * <UL>
106      * <LI>{@link #currentLevel} for identification of a set of settings, so called scene.</LI>
107      * </UL>
108      */
109     String sceneLevels = VeluxBindingConstants.UNKNOWN;
110     /**
111      * {@link #currentLevel} of type {@link int}, which represents the current shutter level.
112      * <P>
113      * Private part of the {@link #sceneLevels Configuration for the channel virtualshutter}.
114      * </P>
115      */
116     int currentLevel = 0;
117 }