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.souliss.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * the class {@link SoulissProtocolConstants} class contains Souliss constants. Original version is taken from
19 * SoulissApp. For scope of this binding not all constants are used.
21 * @author Tonino Fazio - Initial contribution
22 * @author Luca Calcaterra - Refactor for OH3
23 * @author Alessandro Del Pex - soulissapp
24 * @author Tonino Fazio - @since 1.7.0
25 * @author Luca Remigio - @since 2.0.0
30 public final class SoulissProtocolConstants {
32 public static final String TAG = "SoulissApp:Typicals";
35 * /** // Defines for Typicals C LIBRARY
37 * #define SOULISS_T31 31 // Temperature control #define Souliss_T41 41 //
38 * Anti-theft integration (Main) #define Souliss_T42 42 // Anti-theft
41 public static final byte SOULISS_T_EMPTY = 0;
42 public static final byte SOULISS_T_RELATED = (byte) 0xFF;
44 public static final byte SOULISS_TSERVICE_NODE_HEALTHY = (byte) 0x98;
45 public static final byte SOULISS_TSERVICE_NODE_TIMESTAMP = (byte) 0x99;
47 public static final int SOULISS_TSERVICE_NODE_HEALTHY_VIRTUAL_SLOT = 998;
48 public static final int SOULISS_TSERVICE_NODE_TIMESTAMP_VIRTUAL_SLOT = 999;
50 // Defines for Typicals
51 public static final byte SOULISS_T11 = 0x11;
52 public static final byte SOULISS_T12 = 0x12;
53 public static final byte SOULISS_T13 = 0x13;
54 public static final byte SOULISS_T14 = 0x14;
56 public static final byte SOULISS_T1N_RGB = 0x15;
57 public static final byte SOULISS_T16 = 0x16;
58 public static final byte SOULISS_T18 = 0x18;
59 public static final byte SOULISS_T19 = 0x19;
60 public static final byte SOULISS_T1A = 0x1A;
62 // Motorized devices with limit switches
63 public static final byte SOULISS_T21 = 0x21;
64 // Motorized devices with limit switches and middle position
65 public static final byte SOULISS_T22 = 0x22;
66 public static final byte SOULISS_T31 = 0x31;
67 public static final byte SOULISS_T32_IRCOM_AIRCON = 0x32;
69 // Anti-theft group (used with massive commands)
70 public static final byte SOULISS_T42_ANTITHEFT_GROUP = 0x40;
71 // Anti-theft integration (Main)
72 public static final byte SOULISS_T41_ANTITHEFT_MAIN = 0x41;
73 // Anti-theft integration (Peer)
74 public static final byte SOULISS_T42_ANTITHEFT_PEER = 0x42;
76 public static final byte SOULISS_T51 = 0x51;
77 public static final byte SOULISS_T52_TEMPERATURE_SENSOR = 0x52;
78 public static final byte SOULISS_T53_HUMIDITY_SENSOR = 0x53;
79 public static final byte SOULISS_T54_LUX_SENSOR = 0x54;
80 public static final byte SOULISS_T55_VOLTAGE_SENSOR = 0x55;
81 public static final byte SOULISS_T56_CURRENT_SENSOR = 0x56;
82 public static final byte SOULISS_T57_POWER_SENSOR = 0x57;
83 public static final byte SOULISS_T58_PRESSURE_SENSOR = 0x58;
85 public static final byte SOULISS_T61 = 0x61;
86 public static final byte SOULISS_T62_TEMPERATURE_SENSOR = 0x62;
87 public static final byte SOULISS_T63_HUMIDITY_SENSOR = 0x63;
88 public static final byte SOULISS_T64_LUX_SENSOR = 0x64;
89 public static final byte SOULISS_T65_VOLTAGE_SENSOR = 0x65;
90 public static final byte SOULISS_T66_CURRENT_SENSOR = 0x66;
91 public static final byte SOULISS_T67_POWER_SENSOR = 0x67;
92 public static final byte SOULISS_T68_PRESSURE_SENSOR = 0x68;
94 public static final byte SOULISS_TOPICS = 0x72;
96 // customized (remote) AirCon commands
97 public static final int SOULISS_T_IRCOM_AIRCON_POW_ON = 0x8FFE;
98 public static final int SOULISS_T_IRCOM_AIRCON_POW_AUTO_20 = 0x8FFD;
99 public static final int SOULISS_T_IRCOM_AIRCON_POW_AUTO_24 = 0x8FFE;
100 public static final int SOULISS_T_IRCOM_AIRCON_POW_COOL_18 = 0x807B;
101 public static final int SOULISS_T_IRCOM_AIRCON_POW_COOL_22 = 0x8079;
102 public static final int SOULISS_T_IRCOM_AIRCON_POW_COOL_26 = 0x807A;
103 public static final int SOULISS_T_IRCOM_AIRCON_POW_FAN = 0x8733;
104 public static final int SOULISS_T_IRCOM_AIRCON_POW_DRY = 0x87BE;
105 public static final int SOULISS_T_IRCOM_AIRCON_POW_OFF = 0x70FE;
107 // Souliss Aircon Temperature
109 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_16C = 0xF;
110 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_17C = 0x7;
111 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_18C = 0xB;
112 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_19C = 0x3;
113 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_20C = 0xD;
114 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_21C = 0x5;
115 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_22C = 0x9;
116 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_23C = 0x1;
117 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_24C = 0xE;
118 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_25C = 0x6;
119 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_26C = 0xA;
120 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_27C = 0x2;
121 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_28C = 0xC;
122 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_29C = 0x4;
123 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_30C = 0x8;
125 // Souliss conditioner Function
127 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FUN_AAUTO = 0xF;
128 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FUN_DRY = 0xB;
129 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FUN_FAN = 0x3;
130 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FUN_HEAT = 0xD;
131 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FUN_COOL = 0x7;
133 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FAN_AUTO = 0x7;
134 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FAN_HIGH = 0x2;
135 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FAN_MEDIUM = 0x6;
136 public static final byte SOULISS_T_IRCOM_AIRCON_TEMP_FAN_LOW = 0x5;
138 // optional switches. May be used to toggle
139 // custom aircon functions as air deflector, ionizer, turbomode, etc.
140 public static final byte SOULISS_T_IRCOM_AIRCON_OPT1 = 0x2D;
141 public static final byte SOULISS_T_IRCOM_AIRCON_OPT2 = 0x77;
143 public static final byte SOULISS_T_IRCOM_AIRCON_RESET = 0x00;
145 // General defines for T1n
146 public static final byte SOULISS_T1N_TOGGLE_CMD = 0x01;
147 public static final byte SOULISS_T1N_ON_CMD = 0x02;
148 public static final byte SOULISS_T1N_OFF_CMD = 0x04;
149 public static final byte SOULISS_T1N_AUTO_CMD = 0x08;
150 public static final byte SOULISS_T1N_TIMED = 0x30;
151 public static final byte SOULISS_T1N_RST_CMD = 0x00;
152 public static final byte SOULISS_T1N_ON_COIL = 0x01;
153 public static final byte SOULISS_T1N_OFF_COIL = 0x00;
154 public static final byte SOULISS_T1N_ON_COIL_AUTO = (byte) 0xF1;
155 public static final byte SOULISS_T1N_OFF_COIL_AUTO = (byte) 0xF0;
157 public static final byte SOULISS_T1N_SET = 0x22;
160 public static final byte SOULISS_T1N_BRIGHT_UP = 0x10;
162 public static final byte SOULISS_T1N_BRIGHT_DOWN = 0x20;
164 public static final byte SOULISS_T1N_FLASH = 0x21;
166 public static final byte SOULISS_T1N_ON_FEEDBACK = 0x23;
167 public static final byte SOULISS_T1N_OFF_FEEDBACK = 0x24;
168 public static final String SOULISS_T12_USE_OF_SLOT_AUTO_MODE = "autoMode";
169 public static final String SOULISS_T12_USE_OF_SLOT_SWITCH = "switch";
172 public static final long SOULISS_T16_RED = 0x22FF0000;
173 public static final long SOULISS_T16_GREEN = 0x2200FF00;
174 public static final long SOULISS_T16_BLUE = 0x220000FF;
175 public static final long SOULISS_T18_PULSE = 0xA1;
179 public static final byte SOULISS_T1N_RGB_ON_CMD = 0x1;
180 public static final byte SOULISS_T1N_RGB_OFF_CMD = 0x9;
182 // Souliss RGB main colours
183 public static final byte SOULISS_T1N_RGB_R = 0x2;
184 public static final byte SOULISS_T1N_RGB_G = 0x3;
185 public static final byte SOULISS_T1N_RGB_B = 0x4;
186 public static final byte SOULISS_T1N_RGB_W = 0x5;
187 // Souliss RGB Controls
188 public static final byte SOULISS_T_IRCOM_RGB_BRIGHT_UP = 0x6;
189 public static final byte SOULISS_T_IRCOM_RGB_BRIGHT_DOWN = 0x7;
191 public static final byte SOULISS_T_IRCOM_RGB_MODE_FLASH = (byte) 0xA1;
192 public static final byte SOULISS_T_IRCOM_RGB_MODE_STROBE = (byte) 0xA2;
193 public static final byte SOULISS_T_IRCOM_RGB_MODE_FADE = (byte) 0xA3;
194 public static final byte SOULISS_T_IRCOM_RGB_MODE_SMOOTH = (byte) 0xA4;
196 public static final byte SOULISS_T1N_RGB_R2 = (byte) 0xB1;
197 public static final byte SOULISS_T1N_RGB_R3 = (byte) 0xB2;
198 public static final byte SOULISS_T1N_RGB_R4 = (byte) 0xB3;
199 public static final byte SOULISS_T1N_RGB_R5 = (byte) 0xB4;
200 public static final byte SOULISS_T1N_RGB_G2 = (byte) 0xC1;
201 public static final byte SOULISS_T1N_RGB_G3 = (byte) 0xC2;
202 public static final byte SOULISS_T1N_RGB_G4 = (byte) 0xC3;
203 public static final byte SOULISS_T1N_RGB_G5 = (byte) 0xC4;
204 public static final byte SOULISS_T1N_RGB_B2 = (byte) 0xD1;
205 public static final byte SOULISS_T1N_RGB_B3 = (byte) 0xD2;
206 public static final byte SOULISS_T1N_RGB_B4 = (byte) 0xD3;
207 public static final byte SOULISS_T1N_RGB_B5 = (byte) 0xD4;
209 public static final byte SOULISS_T1N_RGB_RST_CMD = 0x00;
211 // Defines for Typical 2n
212 public static final byte SOULISS_T2N_CLOSE_CMD = 0x01;
213 public static final byte SOULISS_T2N_OPEN_CMD = 0x02;
214 public static final byte SOULISS_T2N_STOP_CMD = 0x04;
215 // Close Command (only from local pushbutton)
216 public static final byte SOULISS_T2N_CLOSE_CMD_LOCAL = 0x08;
217 // Open Command (only from local pushbutton)
218 public static final byte SOULISS_T2N_OPEN_CMD_LOCAL = 0x10;
219 public static final byte SOULISS_T2N_TOGGLE_CMD = 0x08;
220 public static final byte SOULISS_T2N_RST_CMD = 0x00;
222 public static final byte SOULISS_T2N_TIMER_VAL = (byte) 0xC0;
223 // Timer expired value
224 public static final byte SOULISS_T2N_TIMER_OFF = (byte) 0xA0;
226 public static final byte SOULISS_T2N_TIMEDSTOP_VAL = (byte) 0xC2;
227 // Timed stop exipred value
228 public static final byte SOULISS_T2N_TIMEDSTOP_OFF = (byte) 0xC0;
229 public static final byte SOULISS_T2N_LIMSWITCH_CLOSE = 0x14;
230 public static final byte SOULISS_T2N_LIMSWITCH_OPEN = 0x16;
231 // Close Feedback from Limit Switch
232 public static final byte SOULISS_T2N_STATE_CLOSE = 0x08;
233 // Open Feedback from Limit Switch
234 public static final byte SOULISS_T2N_STATE_OPEN = 0x10;
236 public static final byte SOULISS_T2N_NOLIMSWITCH = 0x20;
237 public static final byte SOULISS_T2N_COIL_CLOSE = 0x01;
238 public static final byte SOULISS_T2N_COIL_OPEN = 0x02;
239 public static final byte SOULISS_T2N_COIL_STOP = 0x03;
240 public static final byte SOULISS_T2N_COIL_OFF = 0x00;
242 // General defines for T3n
243 public static final String SOULISS_T31_USE_OF_SLOT_SETPOINT = "setPoint";
244 public static final String SOULISS_T31_USE_OF_SLOT_MEASURED = "measured";
245 public static final String SOULISS_T31_USE_OF_SLOT_SETASMEASURED = "setAsMeasured";
247 public static final byte SOULISS_T31_USE_OF_SLOT_SETPOINT_COMMAND = 0x0C;
248 public static final byte SOULISS_T31_USE_OF_SLOT_HEATING = 0x05;
249 public static final byte SOULISS_T31_USE_OF_SLOT_COOLING = 0x04;
250 public static final String SOULISS_T31_USE_OF_SLOT_HEATING_COOLING = "heatingCooling";
251 public static final byte SOULISS_T31_USE_OF_SLOT_FAN_OFF = 0x06;
252 public static final byte SOULISS_T31_USE_OF_SLOT_FAN_LOW = 0x07;
253 public static final byte SOULISS_T31_USE_OF_SLOT_FAN_MED = 0x08;
254 public static final byte SOULISS_T31_USE_OF_SLOT_FAN_HIGH = 0x09;
255 public static final byte SOULISS_T31_USE_OF_SLOT_FAN_AUTOMODE = 0x0A;
256 public static final String SOULISS_T31_USE_OF_SLOT_POWER = "power";
258 public static final byte SOULISS_T3N_IN_SETPOINT = 0x01;
259 public static final byte SOULISS_T3N_OUT_SETPOINT = 0x02;
260 public static final byte SOULISS_T3N_AS_MEASURED = 0x03;
261 public static final byte SOULISS_T3N_COOLING = 0x04;
262 public static final byte SOULISS_T3N_HEATING = 0x05;
263 public static final byte SOULISS_T3N_FAN_OFF = 0x06;
264 public static final byte SOULISS_T3N_FAN_LOW = 0x07;
265 public static final byte SOULISS_T3N_FAN_MED = 0x08;
266 public static final byte SOULISS_T3N_FAN_HIGH = 0x09;
267 public static final byte SOULISS_T3N_FAN_AUTO = 0x0A;
268 public static final byte SOULISS_T3N_FAN_MANUAL = 0x0B;
269 public static final byte SOULISS_T3N_SET_TEMP = 0x0C;
270 public static final byte SOULISS_T3N_SHUTDOWN = 0x0D;
272 public static final String SOULISS_T3N_HEATING_ON = "0x02";
273 public static final String SOULISS_T3N_COOLING_ON = "0x03";
274 public static final String SOULISS_T3N_FAN_ON_1 = "0x08";
275 public static final String SOULISS_T3N_FAN_ON_2 = "0x10";
276 public static final String SOULISS_T3N_FAN_ON_3 = "0x20";
278 // General defines for T4n
280 // Alarm Condition Detected (Input)
281 public static final byte SOULISS_T4N_ALARM = 0x01;
282 public static final byte SOULISS_T4N_RST_CMD = 0x00;
283 // Silence and Arm Command
284 public static final byte SOULISS_T4N_REARM = 0x03;
285 // Anti-theft not Armed Command
286 public static final byte SOULISS_T4N_NOT_ARMED = 0x04;
287 // Anti-theft Armed Command
288 public static final byte SOULISS_T4N_ARMED = 0x05;
289 // Anti-theft Armed Feedback
290 public static final byte SOULISS_T4N_ANTITHEFT = 0x01;
291 // Anti-theft not Armed Feedback
292 public static final byte SOULISS_T4N_NO_ANTITHEFT = 0x00;
293 // Anti-theft in Alarm
294 public static final byte SOULISS_T4N_IN_ALARM = 0x03;
296 public static final byte SOULISS_RST_CMD = 0x00;
297 public static final byte SOULISS_NOT_TRIGGED = 0x00;
298 public static final byte SOULISS_TRIGGED = 0x01;
300 // Defines for current sensor
301 public static final byte SOULISS_T_CURRENT_SENSOR = 0x65;
304 public static final byte SOULISS_T_TEMPERATURE_SENSOR = 0x67;
305 public static final byte SOULISS_T_TEMPERATURE_SENSOR_REFRESH = 0x02;
307 public static final byte SOULISS_T_HUMIDITY_SENSOR = 0x69;
308 public static final byte SOULISS_T_HUMIDITY_SENSOR_REFRESH = 0x03;