]> git.basschouten.com Git - openhab-addons.git/blob
2ddcbb697c96ba54de0b05d7357734a44be71388
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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 electricalPowerToGrid;
80         @Nullable
81         String electricalPowerFromGrid;
82         @Nullable
83         String electricalPowerProduction;
84         @Nullable
85         String electricalPowerSelfConsumption;
86         @Nullable
87         String electricalPowerConsumption;
88         @Nullable
89         String electricalPowerProductionThresholdExceeded;
90         @Nullable
91         String reportInstantUsage;
92         // fields for access control
93         @Nullable
94         String doorlock;
95         // fields for video devices
96         @Nullable
97         String ipAddress;
98         @Nullable
99         String callStatus01;
100         @Nullable
101         String callStatus02;
102         @Nullable
103         String callStatus03;
104         @Nullable
105         String callStatus04;
106     }
107
108     static class NhcTrait {
109         @Nullable
110         String macAddress;
111         // fields for metering
112         @Nullable
113         String channel;
114         @Nullable
115         String meterType;
116     }
117
118     static class NhcParameter {
119         @Nullable
120         String locationId;
121         @Nullable
122         String locationName;
123         @Nullable
124         String locationIcon;
125         // fields for electricity metering
126         @Nullable
127         String flow;
128         @Nullable
129         String segment;
130         @Nullable
131         String clampType;
132         @Nullable
133         String shortName;
134         // fields for access control
135         @Nullable
136         String buttonId;
137         @Nullable
138         String ringTone;
139         @Nullable
140         String declineCallAppliedOnAllDevices;
141         @Nullable
142         String iconCode;
143         // fields for video devices
144         @Nullable
145         String mjpegUri;
146         @Nullable
147         String tnUri;
148     }
149
150     String name = "";
151     String uuid = "";
152     String technology = "";
153     String identifier = "";
154     String model = "";
155     String type = "";
156     String online = "";
157     @Nullable
158     List<NhcProperty> properties;
159     @Nullable
160     List<NhcTrait> traits;
161     @Nullable
162     List<NhcParameter> parameters;
163 }