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.intesis.internal.gson;
15 import com.google.gson.JsonArray;
16 import com.google.gson.JsonElement;
19 * {@link IntesisHomeJSonDTO} is used for the JSon/GSon mapping
21 * @author Hans-Jörg Merk - Initial contribution
23 public class IntesisHomeJSonDTO {
25 public static class Response {
26 public boolean success;
27 public JsonElement data;
30 public static class Data {
31 public JsonElement id;
32 public JsonElement info;
33 public JsonElement userinfo;
34 public JsonElement config;
35 public JsonElement dp;
36 public JsonElement dpval;
39 public static class Id {
40 public String sessionID; // Session ID
43 // Device Information used for thing properties
44 public static class Info {
45 public String wlanSTAMAC; // Device Client MAC Address
46 public String wlanAPMAC; // Device Access Point MAC Address
47 public String fwVersion; // Device Firmware Version
48 public String wlanFwVersion; // Wireless Firmware Version
49 public String acStatus; // Air Conditioner Communication Status
50 public String wlanLNK; // Connection Status with Wireless Network
51 public String ssid; // Wireless Network SSID
52 public String rssi; // Wireless Signal Strength
53 public String tcpServerLNK; // Cloud Server Connection (Not used for communication here)
54 public String localdatetime; // Local Date Time
55 public String powerStatus;
56 public String lastconfigdatetime; // Last Configuration Date Time
57 public String deviceModel; // Device Model
58 public String sn; // Serial Number
59 public String lastError;
62 public static class Userinfo {
63 public String username;
64 public JsonElement servicelist;
67 // List of available services
68 public static class Servicelist {
69 public String setconfig;
70 public String getconfig;
71 public String getcurrentconfig;
72 public String getinfo;
75 public String passchange;
76 public String getavailabledatapoints;
77 public String setdatapointvalue;
78 public String getdatapointvalue;
79 public String getavailableservices;
81 public String setdefaults;
82 public String getdefaultconfig;
85 public static class Config {
86 public String deviceModel; // Device Model
87 public String ip; // Device IP Address
88 public String netmask; // Device IP Address
89 public String dfltgw; // Default gateway
90 public boolean dhcp; // DHCP enabled
91 public String ssid; // WLAN Access Point
92 public int security; // Security Type
94 public int lastconfigdatetime;
97 public static class Dp {
98 public JsonArray datapoints; // dataPoints
101 // Array of UIDs with corresponding description for dynamic channel creation
102 public static class Datapoints {
103 public int uid; // dataPoint
104 public String rw; // read/write status
106 public JsonElement descr;
109 // Descriptor of dataPoint values
110 public static class Descr {
111 public int numStates;
112 public String[] states;
113 public String maxValue;
114 public String minValue;
117 // Array of UIDs with corresponding values, mapped into channel
118 public static class Dpval {
119 public int uid; // ID