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.velux.internal.config;
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;
21 * The {@link VeluxThingConfiguration} is a wrapper for
22 * configuration settings needed to access the <B>Velux</B> device.
24 * It contains the factory default values as well.
26 * There are three parts. Information for:
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>
37 * @author Guenther Schreiner - Initial contribution.
38 * @author Andrew Fiddian-Green - adapted.
41 public class VeluxThingConfiguration extends Configuration {
44 * {@link #sceneName} of type {@link String}, identifying a Velux scene by human-readable name.
46 * <B>Configuration for the channel scene:</B>
49 * <LI>{@link #sceneName} for identification of a set of settings, so called scene.</LI>
52 String sceneName = VeluxBindingConstants.UNKNOWN;
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).
58 * <B>Configuration for the channels actuator, rollershutter and window:</B>
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>
67 public String serial = VeluxProductSerialNo.UNKNOWN;
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.
72 * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
75 String name = VeluxBindingConstants.UNKNOWN;
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%.
80 * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
83 Boolean inverted = false;
85 * {@link #velocity} of type {@link String}, describes the intended speed of action.
86 * Possible values are defined within VeluxProductVelocity.
88 * Part of the {@link #serial Configuration for the channels actuator, rollershutter and window}.
91 String velocity = VeluxBindingConstants.UNKNOWN;
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.
97 * <B>Configuration for the channel virtualshutter:</B>
100 * <LI>{@link #sceneLevels} for identification of a set of settings, so called scene.</LI>
103 * Additionally it contains an internal variable for keeping the actual virtual shutter level.
106 * <LI>{@link #currentLevel} for identification of a set of settings, so called scene.</LI>
109 String sceneLevels = VeluxBindingConstants.UNKNOWN;
111 * {@link #currentLevel} of type {@link int}, which represents the current shutter level.
113 * Private part of the {@link #sceneLevels Configuration for the channel virtualshutter}.
116 int currentLevel = 0;