]> git.basschouten.com Git - openhab-addons.git/blob
fc6a2948e78f0a97033bcd4fcec1df34c54c305f
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.nikohomecontrol.internal.protocol.nhc2;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  * {@link NhcDevice2} represents a Niko Home Control II device. It is used when parsing the device response json and
22  * when creating the state update json to send to the Connected Controller.
23  *
24  * @author Mark Herwege - Initial Contribution
25  */
26 @NonNullByDefault
27 class NhcDevice2 {
28     static class NhcProperty {
29         // fields for lights
30         @Nullable
31         String status;
32         @Nullable
33         String brightness;
34         @Nullable
35         String aligned;
36         @Nullable
37         String basicState;
38         // fields for motors
39         @Nullable
40         String action;
41         @Nullable
42         String position;
43         @Nullable
44         String moving;
45         // fields for thermostats and hvac
46         @Nullable
47         String setpointTemperature;
48         @Nullable
49         String program;
50         @Nullable
51         String overruleActive;
52         @Nullable
53         String overruleSetpoint;
54         @Nullable
55         String overruleTime;
56         @Nullable
57         String ecoSave;
58         @Nullable
59         String demand;
60         @Nullable
61         String operationMode;
62         @Nullable
63         String ambientTemperature;
64         @Nullable
65         String protectMode;
66         @Nullable
67         String thermostatOn;
68         @Nullable
69         String hvacOn;
70         // fields for fans and ventilation
71         @Nullable
72         String fanSpeed;
73         // fields for electricity metering
74         @Nullable
75         String electricalEnergy;
76         @Nullable
77         String electricalPower;
78         @Nullable
79         String reportInstantUsage;
80         // fields for access control
81         @Nullable
82         String doorlock;
83     }
84
85     static class NhcTrait {
86         @Nullable
87         String macAddress;
88         // fields for energyMeters metering
89         @Nullable
90         String channel;
91         @Nullable
92         String meterType;
93     }
94
95     static class NhcParameter {
96         @Nullable
97         String locationId;
98         @Nullable
99         String locationName;
100         @Nullable
101         String locationIcon;
102         // fields for electricity metering
103         @Nullable
104         String flow;
105         @Nullable
106         String segment;
107         @Nullable
108         String clampType;
109         @Nullable
110         String shortName;
111     }
112
113     String name = "";
114     String uuid = "";
115     String technology = "";
116     String identifier = "";
117     String model = "";
118     String type = "";
119     String online = "";
120     @Nullable
121     List<NhcProperty> properties;
122     @Nullable
123     List<NhcTrait> traits;
124     @Nullable
125     List<NhcParameter> parameters;
126 }