mclimate-payload-helper 1.2.19 → 1.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +21 -0
  2. package/dist/decoders/payloadParsers/multisensorPayloadParser.d.ts.map +1 -1
  3. package/dist/decoders/payloadParsers/multisensorPayloadParser.js +80 -33
  4. package/dist/decoders/payloadParsers/multisensorPayloadParser.js.map +1 -1
  5. package/dist/encoders/ButtonCommands.test.d.ts +2 -0
  6. package/dist/encoders/ButtonCommands.test.d.ts.map +1 -0
  7. package/dist/encoders/ButtonCommands.test.js +20 -0
  8. package/dist/encoders/ButtonCommands.test.js.map +1 -0
  9. package/dist/encoders/ChildLockCommands.test.d.ts +2 -0
  10. package/dist/encoders/ChildLockCommands.test.d.ts.map +1 -0
  11. package/dist/encoders/ChildLockCommands.test.js +17 -0
  12. package/dist/encoders/ChildLockCommands.test.js.map +1 -0
  13. package/dist/encoders/Co2DisplayCommands.test.d.ts +2 -0
  14. package/dist/encoders/Co2DisplayCommands.test.d.ts.map +1 -0
  15. package/dist/encoders/Co2DisplayCommands.test.js +18 -0
  16. package/dist/encoders/Co2DisplayCommands.test.js.map +1 -0
  17. package/dist/encoders/Co2DisplayCommonCommands.d.ts +4 -0
  18. package/dist/encoders/Co2DisplayCommonCommands.d.ts.map +1 -1
  19. package/dist/encoders/Co2DisplayCommonCommands.js +38 -0
  20. package/dist/encoders/Co2DisplayCommonCommands.js.map +1 -1
  21. package/dist/encoders/Co2DisplayLiteCommands.test.d.ts +2 -0
  22. package/dist/encoders/Co2DisplayLiteCommands.test.d.ts.map +1 -0
  23. package/dist/encoders/Co2DisplayLiteCommands.test.js +21 -0
  24. package/dist/encoders/Co2DisplayLiteCommands.test.js.map +1 -0
  25. package/dist/encoders/Co2PirLiteCommands.test.d.ts +2 -0
  26. package/dist/encoders/Co2PirLiteCommands.test.d.ts.map +1 -0
  27. package/dist/encoders/Co2PirLiteCommands.test.js +23 -0
  28. package/dist/encoders/Co2PirLiteCommands.test.js.map +1 -0
  29. package/dist/encoders/Co2SensorCommands.test.d.ts +2 -0
  30. package/dist/encoders/Co2SensorCommands.test.d.ts.map +1 -0
  31. package/dist/encoders/Co2SensorCommands.test.js +55 -0
  32. package/dist/encoders/Co2SensorCommands.test.js.map +1 -0
  33. package/dist/encoders/DisplayCommands.test.d.ts +2 -0
  34. package/dist/encoders/DisplayCommands.test.d.ts.map +1 -0
  35. package/dist/encoders/DisplayCommands.test.js +26 -0
  36. package/dist/encoders/DisplayCommands.test.js.map +1 -0
  37. package/dist/encoders/DskDeviceCommands.test.d.ts +2 -0
  38. package/dist/encoders/DskDeviceCommands.test.d.ts.map +1 -0
  39. package/dist/encoders/DskDeviceCommands.test.js +20 -0
  40. package/dist/encoders/DskDeviceCommands.test.js.map +1 -0
  41. package/dist/encoders/FanCoilThermostatCommands.test.d.ts +2 -0
  42. package/dist/encoders/FanCoilThermostatCommands.test.d.ts.map +1 -0
  43. package/dist/encoders/FanCoilThermostatCommands.test.js +117 -0
  44. package/dist/encoders/FanCoilThermostatCommands.test.js.map +1 -0
  45. package/dist/encoders/GeneralCommands.test.d.ts +2 -0
  46. package/dist/encoders/GeneralCommands.test.d.ts.map +1 -0
  47. package/dist/encoders/GeneralCommands.test.js +26 -0
  48. package/dist/encoders/GeneralCommands.test.js.map +1 -0
  49. package/dist/encoders/HTDisplayLiteCommands.test.d.ts +2 -0
  50. package/dist/encoders/HTDisplayLiteCommands.test.d.ts.map +1 -0
  51. package/dist/encoders/HTDisplayLiteCommands.test.js +20 -0
  52. package/dist/encoders/HTDisplayLiteCommands.test.js.map +1 -0
  53. package/dist/encoders/HTPirLiteCommands.test.d.ts +2 -0
  54. package/dist/encoders/HTPirLiteCommands.test.d.ts.map +1 -0
  55. package/dist/encoders/HTPirLiteCommands.test.js +23 -0
  56. package/dist/encoders/HTPirLiteCommands.test.js.map +1 -0
  57. package/dist/encoders/HTSensorCommands.test.d.ts +2 -0
  58. package/dist/encoders/HTSensorCommands.test.d.ts.map +1 -0
  59. package/dist/encoders/HTSensorCommands.test.js +17 -0
  60. package/dist/encoders/HTSensorCommands.test.js.map +1 -0
  61. package/dist/encoders/MelissaCommands.test.d.ts +2 -0
  62. package/dist/encoders/MelissaCommands.test.d.ts.map +1 -0
  63. package/dist/encoders/MelissaCommands.test.js +14 -0
  64. package/dist/encoders/MelissaCommands.test.js.map +1 -0
  65. package/dist/encoders/MultiSensorCommands.test.d.ts +2 -0
  66. package/dist/encoders/MultiSensorCommands.test.d.ts.map +1 -0
  67. package/dist/encoders/MultiSensorCommands.test.js +41 -0
  68. package/dist/encoders/MultiSensorCommands.test.js.map +1 -0
  69. package/dist/encoders/OpenCloseSensorCommands.test.d.ts +2 -0
  70. package/dist/encoders/OpenCloseSensorCommands.test.d.ts.map +1 -0
  71. package/dist/encoders/OpenCloseSensorCommands.test.js +14 -0
  72. package/dist/encoders/OpenCloseSensorCommands.test.js.map +1 -0
  73. package/dist/encoders/PIRCommands.test.d.ts +2 -0
  74. package/dist/encoders/PIRCommands.test.d.ts.map +1 -0
  75. package/dist/encoders/PIRCommands.test.js +29 -0
  76. package/dist/encoders/PIRCommands.test.js.map +1 -0
  77. package/dist/encoders/Relay16Commands.test.d.ts +2 -0
  78. package/dist/encoders/Relay16Commands.test.d.ts.map +1 -0
  79. package/dist/encoders/Relay16Commands.test.js +44 -0
  80. package/dist/encoders/Relay16Commands.test.js.map +1 -0
  81. package/dist/encoders/Relay16DryCommands.test.d.ts +2 -0
  82. package/dist/encoders/Relay16DryCommands.test.d.ts.map +1 -0
  83. package/dist/encoders/Relay16DryCommands.test.js +32 -0
  84. package/dist/encoders/Relay16DryCommands.test.js.map +1 -0
  85. package/dist/encoders/SetAqiLedCommands.test.d.ts +2 -0
  86. package/dist/encoders/SetAqiLedCommands.test.d.ts.map +1 -0
  87. package/dist/encoders/SetAqiLedCommands.test.js +20 -0
  88. package/dist/encoders/SetAqiLedCommands.test.js.map +1 -0
  89. package/dist/encoders/TFloodCommands.test.d.ts +2 -0
  90. package/dist/encoders/TFloodCommands.test.d.ts.map +1 -0
  91. package/dist/encoders/TFloodCommands.test.js +23 -0
  92. package/dist/encoders/TFloodCommands.test.js.map +1 -0
  93. package/dist/encoders/TRingThermostatCommands.test.d.ts +2 -0
  94. package/dist/encoders/TRingThermostatCommands.test.d.ts.map +1 -0
  95. package/dist/encoders/TRingThermostatCommands.test.js +16 -0
  96. package/dist/encoders/TRingThermostatCommands.test.js.map +1 -0
  97. package/dist/encoders/TValveCommands.test.d.ts +2 -0
  98. package/dist/encoders/TValveCommands.test.d.ts.map +1 -0
  99. package/dist/encoders/TValveCommands.test.js +56 -0
  100. package/dist/encoders/TValveCommands.test.js.map +1 -0
  101. package/dist/encoders/TemperatureCommonCommands.test.d.ts +2 -0
  102. package/dist/encoders/TemperatureCommonCommands.test.d.ts.map +1 -0
  103. package/dist/encoders/TemperatureCommonCommands.test.js +14 -0
  104. package/dist/encoders/TemperatureCommonCommands.test.js.map +1 -0
  105. package/dist/encoders/VickiCommands.test.d.ts +2 -0
  106. package/dist/encoders/VickiCommands.test.d.ts.map +1 -0
  107. package/dist/encoders/VickiCommands.test.js +156 -0
  108. package/dist/encoders/VickiCommands.test.js.map +1 -0
  109. package/dist/encoders/WirelessThermostatCommands.test.d.ts +2 -0
  110. package/dist/encoders/WirelessThermostatCommands.test.d.ts.map +1 -0
  111. package/dist/encoders/WirelessThermostatCommands.test.js +41 -0
  112. package/dist/encoders/WirelessThermostatCommands.test.js.map +1 -0
  113. package/dist/test/payloadDecoders.test.js +34 -34
  114. package/dist/test/payloadDecoders.test.js.map +1 -1
  115. package/package.json +1 -1
  116. package/src/decoders/payloadParsers/multisensorPayloadParser.ts +96 -34
  117. package/src/encoders/ButtonCommands.test.ts +26 -0
  118. package/src/encoders/ChildLockCommands.test.ts +22 -0
  119. package/src/encoders/Co2DisplayCommands.test.ts +26 -0
  120. package/src/encoders/Co2DisplayLiteCommands.test.ts +30 -0
  121. package/src/encoders/Co2PirLiteCommands.test.ts +32 -0
  122. package/src/encoders/Co2SensorCommands.test.ts +79 -0
  123. package/src/encoders/DisplayCommands.test.ts +40 -0
  124. package/src/encoders/DskDeviceCommands.test.ts +26 -0
  125. package/src/encoders/FanCoilThermostatCommands.test.ts +204 -0
  126. package/src/encoders/GeneralCommands.test.ts +38 -0
  127. package/src/encoders/HTDisplayLiteCommands.test.ts +28 -0
  128. package/src/encoders/HTPirLiteCommands.test.ts +32 -0
  129. package/src/encoders/HTSensorCommands.test.ts +24 -0
  130. package/src/encoders/MelissaCommands.test.ts +16 -0
  131. package/src/encoders/MultiSensorCommands.test.ts +68 -0
  132. package/src/encoders/OpenCloseSensorCommands.test.ts +16 -0
  133. package/src/encoders/PIRCommands.test.ts +46 -0
  134. package/src/encoders/Relay16Commands.test.ts +76 -0
  135. package/src/encoders/Relay16DryCommands.test.ts +52 -0
  136. package/src/encoders/SetAqiLedCommands.test.ts +18 -0
  137. package/src/encoders/TFloodCommands.test.ts +34 -0
  138. package/src/encoders/TRingThermostatCommands.test.ts +23 -0
  139. package/src/encoders/TValveCommands.test.ts +98 -0
  140. package/src/encoders/TemperatureCommonCommands.test.ts +16 -0
  141. package/src/encoders/VickiCommands.test.ts +275 -0
  142. package/src/encoders/WirelessThermostatCommands.test.ts +70 -0
  143. package/src/test/payloadDecoders.test.ts +34 -34
  144. package/src/test.txt +1 -0
  145. package/dist/encoders/FanCoilThermostat.d.ts +0 -61
  146. package/dist/encoders/FanCoilThermostat.d.ts.map +0 -1
  147. package/dist/encoders/FanCoilThermostat.js +0 -719
  148. package/dist/encoders/FanCoilThermostat.js.map +0 -1
  149. package/dist/encoders/SetAqiLed.d.ts +0 -6
  150. package/dist/encoders/SetAqiLed.d.ts.map +0 -1
  151. package/dist/encoders/SetAqiLed.js +0 -46
  152. package/dist/encoders/SetAqiLed.js.map +0 -1
  153. package/dist/encoders/types/enumValidation.d.ts +0 -6
  154. package/dist/encoders/types/enumValidation.d.ts.map +0 -1
  155. package/dist/encoders/types/enumValidation.js +0 -50
  156. package/dist/encoders/types/enumValidation.js.map +0 -1
  157. package/dist/encoders/types/schemaValidatedEnums.d.ts +0 -40
  158. package/dist/encoders/types/schemaValidatedEnums.d.ts.map +0 -1
  159. package/dist/encoders/types/schemaValidatedEnums.js +0 -181
  160. package/dist/encoders/types/schemaValidatedEnums.js.map +0 -1
  161. package/dist/types/deviceTypes.d.ts +0 -19
  162. package/dist/types/deviceTypes.d.ts.map +0 -1
  163. package/dist/types/deviceTypes.js +0 -23
  164. package/dist/types/deviceTypes.js.map +0 -1
  165. package/dist/types/index.d.ts +0 -2
  166. package/dist/types/index.d.ts.map +0 -1
  167. package/dist/types/index.js +0 -18
  168. package/dist/types/index.js.map +0 -1
  169. package/dist/types/types.d.ts +0 -13
  170. package/dist/types/types.d.ts.map +0 -1
  171. package/dist/types/types.js +0 -9
  172. package/dist/types/types.js.map +0 -1
  173. package/dist/validation.d.ts +0 -3
  174. package/dist/validation.d.ts.map +0 -1
  175. package/dist/validation.js +0 -8
  176. package/dist/validation.js.map +0 -1
  177. package/src/test/payloadEncoders.test.ts +0 -850
@@ -1,719 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FanCoilThermostatCommands = void 0;
4
- const encoders_1 = require("../encoders");
5
- const utils_1 = require("../utils");
6
- const zod_1 = require("zod");
7
- const types_1 = require("../encoders/types");
8
- class FanCoilThermostatCommands {
9
- static setTargetTemperatureStep(params) {
10
- try {
11
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setTargetTemperatureStep.parse(params);
12
- const { value } = params;
13
- return new encoders_1.BaseCommand('SetTargetTemperatureStep', 0x03, (0, utils_1.decToHex)(value * 10));
14
- }
15
- catch (e) {
16
- if (e instanceof zod_1.ZodError) {
17
- throw new utils_1.CustomError({
18
- message: 'Zod validation error during SetTargetTemperatureStep execution',
19
- command: 'SetTargetTemperatureStep',
20
- originalError: e,
21
- });
22
- }
23
- else {
24
- throw new utils_1.CustomError({
25
- message: 'Error during SetTargetTemperatureStep execution',
26
- command: 'SetTargetTemperatureStep',
27
- originalError: e,
28
- });
29
- }
30
- }
31
- }
32
- static getTargetTemperatureStep() {
33
- return new encoders_1.BaseCommand('GetTargetTemperatureStep', 0x05);
34
- }
35
- static setKeysLock(params) {
36
- try {
37
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setKeysLock.parse(params);
38
- const { value } = params;
39
- return new encoders_1.BaseCommand('SetKeysLock', 0x07, (0, utils_1.decToHex)(value));
40
- }
41
- catch (e) {
42
- if (e instanceof zod_1.ZodError) {
43
- throw new utils_1.CustomError({
44
- message: 'Zod validation error during SetKeysLock execution',
45
- command: 'SetKeysLock',
46
- originalError: e,
47
- });
48
- }
49
- else {
50
- throw new utils_1.CustomError({
51
- message: 'Error during SetKeysLock execution',
52
- command: 'SetKeysLock',
53
- originalError: e,
54
- });
55
- }
56
- }
57
- }
58
- static getKeysLock() {
59
- return new encoders_1.BaseCommand('GetKeysLock', 0x14);
60
- }
61
- static setFanCoilTarget(params) {
62
- try {
63
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFanCoilTarget.parse(params);
64
- const { value } = params;
65
- return new encoders_1.BaseCommand('SetFanCoilTarget', 0x2e, (0, utils_1.dec2hex)(value * 10));
66
- }
67
- catch (e) {
68
- if (e instanceof zod_1.ZodError) {
69
- throw new utils_1.CustomError({
70
- message: 'Zod validation error during SetFanCoilTarget execution',
71
- command: 'SetFanCoilTarget',
72
- originalError: e,
73
- });
74
- }
75
- else {
76
- throw new utils_1.CustomError({
77
- message: 'Error during SetFanCoilTarget execution',
78
- command: 'SetFanCoilTarget',
79
- originalError: e,
80
- });
81
- }
82
- }
83
- }
84
- static setTargetTemperature(params) {
85
- try {
86
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setTargetTemperatureFanCoil.parse(params);
87
- const { targetTemperature } = params;
88
- return new encoders_1.BaseCommand('SetTargetTemperature', 0x2e, (0, utils_1.dec2hex)(targetTemperature * 10));
89
- }
90
- catch (e) {
91
- if (e instanceof zod_1.ZodError) {
92
- throw new utils_1.CustomError({
93
- message: 'Zod validation error during SetTargetTemperature execution',
94
- command: 'SetTargetTemperature',
95
- originalError: e,
96
- });
97
- }
98
- else {
99
- throw new utils_1.CustomError({
100
- message: 'Error during SetTargetTemperature execution',
101
- command: 'SetTargetTemperature',
102
- originalError: e,
103
- });
104
- }
105
- }
106
- }
107
- static setFctOperationalMode(params) {
108
- try {
109
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFctOperationalMode.parse(params);
110
- const { value } = params;
111
- return new encoders_1.BaseCommand('SetFctOperationalMode', 0x52, (0, utils_1.decToHex)(value));
112
- }
113
- catch (e) {
114
- if (e instanceof zod_1.ZodError) {
115
- throw new utils_1.CustomError({
116
- message: 'Zod validation error during SetFctOperationalMode execution',
117
- command: 'SetFctOperationalMode',
118
- originalError: e,
119
- });
120
- }
121
- else {
122
- throw new utils_1.CustomError({
123
- message: 'Error during SetFctOperationalMode execution',
124
- command: 'SetFctOperationalMode',
125
- originalError: e,
126
- });
127
- }
128
- }
129
- }
130
- static setValveOpenCloseTime(params) {
131
- try {
132
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setValveOpenCloseTime.parse(params);
133
- const { value } = params;
134
- return new encoders_1.BaseCommand('SetValveOpenCloseTime', 0x31, (0, utils_1.decToHex)(value));
135
- }
136
- catch (e) {
137
- if (e instanceof zod_1.ZodError) {
138
- throw new utils_1.CustomError({
139
- message: 'Zod validation error during SetValveOpenCloseTime execution',
140
- command: 'SetValveOpenCloseTime',
141
- originalError: e,
142
- });
143
- }
144
- else {
145
- throw new utils_1.CustomError({
146
- message: 'Error during SetValveOpenCloseTime execution',
147
- command: 'SetValveOpenCloseTime',
148
- originalError: e,
149
- });
150
- }
151
- }
152
- }
153
- static getValveOpenCloseTime() {
154
- return new encoders_1.BaseCommand('GetValveOpenCloseTime', 0x32);
155
- }
156
- static setExtAutomaticTemperatureControl(params) {
157
- try {
158
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setExtAutomaticTemperatureControl.parse(params);
159
- const { value } = params;
160
- return new encoders_1.BaseCommand('SetExtAutomaticTemperatureControl', 0x35, (0, utils_1.decToHex)(value));
161
- }
162
- catch (e) {
163
- if (e instanceof zod_1.ZodError) {
164
- throw new utils_1.CustomError({
165
- message: 'Zod validation error during SetExtAutomaticTemperatureControl execution',
166
- command: 'SetExtAutomaticTemperatureControl',
167
- originalError: e,
168
- });
169
- }
170
- else {
171
- throw new utils_1.CustomError({
172
- message: 'Error during SetExtAutomaticTemperatureControl execution',
173
- command: 'SetExtAutomaticTemperatureControl',
174
- originalError: e,
175
- });
176
- }
177
- }
178
- }
179
- static getExtAutomaticTemperatureControl() {
180
- return new encoders_1.BaseCommand('GetExtAutomaticTemperatureControl', 0x36);
181
- }
182
- static setFanSpeed(params) {
183
- try {
184
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFanSpeed.parse(params);
185
- const { value } = params;
186
- return new encoders_1.BaseCommand('SetFanSpeed', 0x44, (0, utils_1.decToHex)(value));
187
- }
188
- catch (e) {
189
- if (e instanceof zod_1.ZodError) {
190
- throw new utils_1.CustomError({
191
- message: 'Zod validation error during SetFanSpeed execution',
192
- command: 'SetFanSpeed',
193
- originalError: e,
194
- });
195
- }
196
- else {
197
- throw new utils_1.CustomError({
198
- message: 'Error during SetFanSpeed execution',
199
- command: 'SetFanSpeed',
200
- originalError: e,
201
- });
202
- }
203
- }
204
- }
205
- static getFanSpeed() {
206
- return new encoders_1.BaseCommand('GetFanSpeed', 0x45);
207
- }
208
- static setFanSpeedLimit(params) {
209
- try {
210
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFanSpeedLimit.parse(params);
211
- const { value } = params;
212
- return new encoders_1.BaseCommand('SetFanSpeedLimit', 0x46, (0, utils_1.decToHex)(value));
213
- }
214
- catch (e) {
215
- if (e instanceof zod_1.ZodError) {
216
- throw new utils_1.CustomError({
217
- message: 'Zod validation error during SetFanSpeedLimit execution',
218
- command: 'SetFanSpeedLimit',
219
- originalError: e,
220
- });
221
- }
222
- else {
223
- throw new utils_1.CustomError({
224
- message: 'Error during SetFanSpeedLimit execution',
225
- command: 'SetFanSpeedLimit',
226
- originalError: e,
227
- });
228
- }
229
- }
230
- }
231
- static getFanSpeedLimit() {
232
- return new encoders_1.BaseCommand('GetFanSpeedLimit', 0x47);
233
- }
234
- static setEcmVoltageRange(params) {
235
- try {
236
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setEcmVoltageRange.parse(params);
237
- const { min, max } = params;
238
- return new encoders_1.BaseCommand('SetEcmVoltageRange', 0x48, (0, utils_1.decToHex)(min * 10), (0, utils_1.decToHex)(max * 10));
239
- }
240
- catch (e) {
241
- if (e instanceof zod_1.ZodError) {
242
- throw new utils_1.CustomError({
243
- message: 'Zod validation error during SetEcmVoltageRange execution',
244
- command: 'SetEcmVoltageRange',
245
- originalError: e,
246
- });
247
- }
248
- else {
249
- throw new utils_1.CustomError({
250
- message: 'Error during SetEcmVoltageRange execution',
251
- command: 'SetEcmVoltageRange',
252
- originalError: e,
253
- });
254
- }
255
- }
256
- }
257
- static getEcmVoltageRange() {
258
- return new encoders_1.BaseCommand('GetEcmVoltageRange', 0x49);
259
- }
260
- static setEcmStartUpTime(params) {
261
- try {
262
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setEcmStartUpTime.parse(params);
263
- const { value } = params;
264
- return new encoders_1.BaseCommand('SetEcmStartUpTime', 0x4a, (0, utils_1.decToHex)(value));
265
- }
266
- catch (e) {
267
- if (e instanceof zod_1.ZodError) {
268
- throw new utils_1.CustomError({
269
- message: 'Zod validation error during SetEcmStartUpTime execution',
270
- command: 'SetEcmStartUpTime',
271
- originalError: e,
272
- });
273
- }
274
- else {
275
- throw new utils_1.CustomError({
276
- message: 'Error during SetEcmStartUpTime execution',
277
- command: 'SetEcmStartUpTime',
278
- originalError: e,
279
- });
280
- }
281
- }
282
- }
283
- static getEcmStartUpTime() {
284
- return new encoders_1.BaseCommand('GetEcmStartUpTime', 0x4b);
285
- }
286
- static setEcmRelay(params) {
287
- try {
288
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setEcmRelay.parse(params);
289
- const { value } = params;
290
- return new encoders_1.BaseCommand('SetEcmRelay', 0x4c, (0, utils_1.decToHex)(value));
291
- }
292
- catch (e) {
293
- if (e instanceof zod_1.ZodError) {
294
- throw new utils_1.CustomError({
295
- message: 'Zod validation error during SetEcmRelay execution',
296
- command: 'SetEcmRelay',
297
- originalError: e,
298
- });
299
- }
300
- else {
301
- throw new utils_1.CustomError({
302
- message: 'Error during SetEcmRelay execution',
303
- command: 'SetEcmRelay',
304
- originalError: e,
305
- });
306
- }
307
- }
308
- }
309
- static getEcmRelay() {
310
- return new encoders_1.BaseCommand('GetEcmRelay', 0x4d);
311
- }
312
- static setFrostProtection(params) {
313
- try {
314
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFrostProtection.parse(params);
315
- const { value } = params;
316
- return new encoders_1.BaseCommand('SetFrostProtection', 0x4e, (0, utils_1.decToHex)(value));
317
- }
318
- catch (e) {
319
- if (e instanceof zod_1.ZodError) {
320
- throw new utils_1.CustomError({
321
- message: 'Zod validation error during SetFrostProtection execution',
322
- command: 'SetFrostProtection',
323
- originalError: e,
324
- });
325
- }
326
- else {
327
- throw new utils_1.CustomError({
328
- message: 'Error during SetFrostProtection execution',
329
- command: 'SetFrostProtection',
330
- originalError: e,
331
- });
332
- }
333
- }
334
- }
335
- static getFrostProtection() {
336
- return new encoders_1.BaseCommand('GetFrostProtection', 0x4f);
337
- }
338
- static setFrostProtectionSettings(params) {
339
- try {
340
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFrostProtectionSettings.parse(params);
341
- const { threshold, setpoint } = params;
342
- return new encoders_1.BaseCommand('SetFrostProtectionSettings', 0x50, (0, utils_1.decToHex)(threshold), (0, utils_1.decToHex)(setpoint));
343
- }
344
- catch (e) {
345
- if (e instanceof zod_1.ZodError) {
346
- throw new utils_1.CustomError({
347
- message: 'Zod validation error during SetFrostProtectionSettings execution',
348
- command: 'SetFrostProtectionSettings',
349
- originalError: e,
350
- });
351
- }
352
- else {
353
- throw new utils_1.CustomError({
354
- message: 'Error during SetFrostProtectionSettings execution',
355
- command: 'SetFrostProtectionSettings',
356
- originalError: e,
357
- });
358
- }
359
- }
360
- }
361
- static getFrostProtectionSettings() {
362
- return new encoders_1.BaseCommand('GetFrostProtectionSettings', 0x51);
363
- }
364
- static setAllowedOperationalModes(params) {
365
- try {
366
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setAllowedOperationalModes.parse(params);
367
- const { value } = params;
368
- return new encoders_1.BaseCommand('SetAllowedOperationalModes', 0x54, (0, utils_1.decToHex)(value));
369
- }
370
- catch (e) {
371
- if (e instanceof zod_1.ZodError) {
372
- throw new utils_1.CustomError({
373
- message: 'Zod validation error during SetAllowedOperationalModes execution',
374
- command: 'SetAllowedOperationalModes',
375
- originalError: e,
376
- });
377
- }
378
- else {
379
- throw new utils_1.CustomError({
380
- message: 'Error during SetAllowedOperationalModes execution',
381
- command: 'SetAllowedOperationalModes',
382
- originalError: e,
383
- });
384
- }
385
- }
386
- }
387
- static getAllowedOperationalModes() {
388
- return new encoders_1.BaseCommand('GetAllowedOperationalModes', 0x55);
389
- }
390
- static setCoolingSetpointNotOccupied(params) {
391
- try {
392
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setCoolingSetpointNotOccupied.parse(params);
393
- const { value } = params;
394
- return new encoders_1.BaseCommand('SetCoolingSetpointNotOccupied', 0x56, (0, utils_1.decToHex)(value));
395
- }
396
- catch (e) {
397
- if (e instanceof zod_1.ZodError) {
398
- throw new utils_1.CustomError({
399
- message: 'Zod validation error during SetCoolingSetpointNotOccupied execution',
400
- command: 'SetCoolingSetpointNotOccupied',
401
- originalError: e,
402
- });
403
- }
404
- else {
405
- throw new utils_1.CustomError({
406
- message: 'Error during SetCoolingSetpointNotOccupied execution',
407
- command: 'SetCoolingSetpointNotOccupied',
408
- originalError: e,
409
- });
410
- }
411
- }
412
- }
413
- static getCoolingSetpointNotOccupied() {
414
- return new encoders_1.BaseCommand('GetCoolingSetpointNotOccupied', 0x57);
415
- }
416
- static setHeatingSetpointNotOccupied(params) {
417
- try {
418
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setHeatingSetpointNotOccupied.parse(params);
419
- const { value } = params;
420
- return new encoders_1.BaseCommand('SetHeatingSetpointNotOccupied', 0x58, (0, utils_1.decToHex)(value));
421
- }
422
- catch (e) {
423
- if (e instanceof zod_1.ZodError) {
424
- throw new utils_1.CustomError({
425
- message: 'Zod validation error during SetHeatingSetpointNotOccupied execution',
426
- command: 'SetHeatingSetpointNotOccupied',
427
- originalError: e,
428
- });
429
- }
430
- else {
431
- throw new utils_1.CustomError({
432
- message: 'Error during SetHeatingSetpointNotOccupied execution',
433
- command: 'SetHeatingSetpointNotOccupied',
434
- originalError: e,
435
- });
436
- }
437
- }
438
- }
439
- static getHeatingSetpointNotOccupied() {
440
- return new encoders_1.BaseCommand('GetHeatingSetpointNotOccupied', 0x59);
441
- }
442
- static setTempSensorCompensation(params) {
443
- try {
444
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setTempSensorCompensation.parse(params);
445
- const { compensation, temperature } = params;
446
- return new encoders_1.BaseCommand('SetTempSensorCompensation', 0x5a, (0, utils_1.decToHex)(compensation), (0, utils_1.decToHex)(temperature * 10));
447
- }
448
- catch (e) {
449
- if (e instanceof zod_1.ZodError) {
450
- throw new utils_1.CustomError({
451
- message: 'Zod validation error during SetTempSensorCompensation execution',
452
- command: 'SetTempSensorCompensation',
453
- originalError: e,
454
- });
455
- }
456
- else {
457
- throw new utils_1.CustomError({
458
- message: 'Error during SetTempSensorCompensation execution',
459
- command: 'SetTempSensorCompensation',
460
- originalError: e,
461
- });
462
- }
463
- }
464
- }
465
- static getTempSensorCompensation() {
466
- return new encoders_1.BaseCommand('GetTempSensorCompensation', 0x5b);
467
- }
468
- static setFanSpeedNotOccupied(params) {
469
- try {
470
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setFanSpeedNotOccupied.parse(params);
471
- const { value } = params;
472
- return new encoders_1.BaseCommand('SetFanSpeedNotOccupied', 0x5c, (0, utils_1.decToHex)(value));
473
- }
474
- catch (e) {
475
- if (e instanceof zod_1.ZodError) {
476
- throw new utils_1.CustomError({
477
- message: 'Zod validation error during SetFanSpeedNotOccupied execution',
478
- command: 'SetFanSpeedNotOccupied',
479
- originalError: e,
480
- });
481
- }
482
- else {
483
- throw new utils_1.CustomError({
484
- message: 'Error during SetFanSpeedNotOccupied execution',
485
- command: 'SetFanSpeedNotOccupied',
486
- originalError: e,
487
- });
488
- }
489
- }
490
- }
491
- static getFanSpeedNotOccupied() {
492
- return new encoders_1.BaseCommand('GetFanSpeedNotOccupied', 0x5d);
493
- }
494
- static setAutomaticChangeover(params) {
495
- try {
496
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setAutomaticChangeover.parse(params);
497
- const { value } = params;
498
- return new encoders_1.BaseCommand('SetAutomaticChangeover', 0x5e, (0, utils_1.decToHex)(value));
499
- }
500
- catch (e) {
501
- if (e instanceof zod_1.ZodError) {
502
- throw new utils_1.CustomError({
503
- message: 'Zod validation error during SetAutomaticChangeover execution',
504
- command: 'SetAutomaticChangeover',
505
- originalError: e,
506
- });
507
- }
508
- else {
509
- throw new utils_1.CustomError({
510
- message: 'Error during SetAutomaticChangeover execution',
511
- command: 'SetAutomaticChangeover',
512
- originalError: e,
513
- });
514
- }
515
- }
516
- }
517
- static getAutomaticChangeover() {
518
- return new encoders_1.BaseCommand('GetAutomaticChangeover', 0x5f);
519
- }
520
- static setWiringDiagram(params) {
521
- try {
522
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setWiringDiagram.parse(params);
523
- const { value } = params;
524
- return new encoders_1.BaseCommand('SetWiringDiagram', 0x60, (0, utils_1.decToHex)(value));
525
- }
526
- catch (e) {
527
- if (e instanceof zod_1.ZodError) {
528
- throw new utils_1.CustomError({
529
- message: 'Zod validation error during SetWiringDiagram execution',
530
- command: 'SetWiringDiagram',
531
- originalError: e,
532
- });
533
- }
534
- else {
535
- throw new utils_1.CustomError({
536
- message: 'Error during SetWiringDiagram execution',
537
- command: 'SetWiringDiagram',
538
- originalError: e,
539
- });
540
- }
541
- }
542
- }
543
- static getWiringDiagram() {
544
- return new encoders_1.BaseCommand('GetWiringDiagram', 0x61);
545
- }
546
- static setOccFunction(params) {
547
- try {
548
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setOccFunction.parse(params);
549
- const { value } = params;
550
- return new encoders_1.BaseCommand('SetOccFunction', 0x62, (0, utils_1.decToHex)(value));
551
- }
552
- catch (e) {
553
- if (e instanceof zod_1.ZodError) {
554
- throw new utils_1.CustomError({
555
- message: 'Zod validation error during SetOccFunction execution',
556
- command: 'SetOccFunction',
557
- originalError: e,
558
- });
559
- }
560
- else {
561
- throw new utils_1.CustomError({
562
- message: 'Error during SetOccFunction execution',
563
- command: 'SetOccFunction',
564
- originalError: e,
565
- });
566
- }
567
- }
568
- }
569
- static getOccFunction() {
570
- return new encoders_1.BaseCommand('GetOccFunction', 0x63);
571
- }
572
- static setAutomaticChangeoverThreshold(params) {
573
- try {
574
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setAutomaticChangeoverThreshold.parse(params);
575
- const { coolingThreshold, heatingThreshold } = params;
576
- return new encoders_1.BaseCommand('SetAutomaticChangeoverThreshold', 0x64, (0, utils_1.decToHex)(coolingThreshold), (0, utils_1.decToHex)(heatingThreshold));
577
- }
578
- catch (e) {
579
- if (e instanceof zod_1.ZodError) {
580
- throw new utils_1.CustomError({
581
- message: 'Zod validation error during SetAutomaticChangeoverThreshold execution',
582
- command: 'SetAutomaticChangeoverThreshold',
583
- originalError: e,
584
- });
585
- }
586
- else {
587
- throw new utils_1.CustomError({
588
- message: 'Error during SetAutomaticChangeoverThreshold execution',
589
- command: 'SetAutomaticChangeoverThreshold',
590
- originalError: e,
591
- });
592
- }
593
- }
594
- }
595
- static getAutomaticChangeoverThreshold() {
596
- return new encoders_1.BaseCommand('GetAutomaticChangeoverThreshold', 0x65);
597
- }
598
- static setDeviceStatus(params) {
599
- try {
600
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setDeviceStatus.parse(params);
601
- const { value } = params;
602
- return new encoders_1.BaseCommand('SetDeviceStatus', 0x66, (0, utils_1.decToHex)(value));
603
- }
604
- catch (e) {
605
- if (e instanceof zod_1.ZodError) {
606
- throw new utils_1.CustomError({
607
- message: 'Zod validation error during SetDeviceStatus execution',
608
- command: 'SetDeviceStatus',
609
- originalError: e,
610
- });
611
- }
612
- else {
613
- throw new utils_1.CustomError({
614
- message: 'Error during SetDeviceStatus execution',
615
- command: 'SetDeviceStatus',
616
- originalError: e,
617
- });
618
- }
619
- }
620
- }
621
- static getDeviceStatus() {
622
- return new encoders_1.BaseCommand('GetDeviceStatus', 0x67);
623
- }
624
- static setReturnOfPowerOperation(params) {
625
- try {
626
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setReturnOfPowerOperation.parse(params);
627
- const { value } = params;
628
- return new encoders_1.BaseCommand('SetReturnOfPowerOperation', 0x68, (0, utils_1.decToHex)(value));
629
- }
630
- catch (e) {
631
- if (e instanceof zod_1.ZodError) {
632
- throw new utils_1.CustomError({
633
- message: 'Zod validation error during SetReturnOfPowerOperation execution',
634
- command: 'SetReturnOfPowerOperation',
635
- originalError: e,
636
- });
637
- }
638
- else {
639
- throw new utils_1.CustomError({
640
- message: 'Error during SetReturnOfPowerOperation execution',
641
- command: 'SetReturnOfPowerOperation',
642
- originalError: e,
643
- });
644
- }
645
- }
646
- }
647
- static getReturnOfPowerOperation() {
648
- return new encoders_1.BaseCommand('GetReturnOfPowerOperation', 0x69);
649
- }
650
- static setDeltaTemperature1(params) {
651
- try {
652
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setDeltaTemperature1.parse(params);
653
- const { value } = params;
654
- return new encoders_1.BaseCommand('SetDeltaTemperature1', 0x6a, (0, utils_1.decToHex)(value * 10));
655
- }
656
- catch (e) {
657
- if (e instanceof zod_1.ZodError) {
658
- throw new utils_1.CustomError({
659
- message: 'Zod validation error during SetDeltaTemperature1 execution',
660
- command: 'SetDeltaTemperature1',
661
- originalError: e,
662
- });
663
- }
664
- else {
665
- throw new utils_1.CustomError({
666
- message: 'Error during SetDeltaTemperature1 execution',
667
- command: 'SetDeltaTemperature1',
668
- originalError: e,
669
- });
670
- }
671
- }
672
- }
673
- static getDeltaTemperature1() {
674
- return new encoders_1.BaseCommand('GetDeltaTemperature1', 0x6b);
675
- }
676
- static setDeltaTemperature2and3(params) {
677
- try {
678
- types_1.DeviceCommandSchemas.FanCoilThermostatCommandSchemas.setDeltaTemperature2and3.parse(params);
679
- const { deltaTemperature2, deltaTemperature3 } = params;
680
- return new encoders_1.BaseCommand('SetDeltaTemperature2and3', 0x6c, (0, utils_1.decToHex)(deltaTemperature2 * 10), (0, utils_1.decToHex)(deltaTemperature3 * 10));
681
- }
682
- catch (e) {
683
- if (e instanceof zod_1.ZodError) {
684
- throw new utils_1.CustomError({
685
- message: 'Zod validation error during SetDeltaTemperature2and3 execution',
686
- command: 'SetDeltaTemperature2and3',
687
- originalError: e,
688
- });
689
- }
690
- else {
691
- throw new utils_1.CustomError({
692
- message: 'Error during SetDeltaTemperature2and3 execution',
693
- command: 'SetDeltaTemperature2and3',
694
- originalError: e,
695
- });
696
- }
697
- }
698
- }
699
- static getDeltaTemperature2and3() {
700
- return new encoders_1.BaseCommand('GetDeltaTemperature2and3', 0x6d);
701
- }
702
- static getFrostProtectionStatus() {
703
- return new encoders_1.BaseCommand('GetFrostProtectionStatus', 0x6e);
704
- }
705
- static getOccupancySensorStatusSetPoint() {
706
- return new encoders_1.BaseCommand('GetOccupancySensorStatusSetPoint', 0x70);
707
- }
708
- static getOccupancySensorStatus() {
709
- return new encoders_1.BaseCommand('GetOccupancySensorStatus', 0x71);
710
- }
711
- static getDewPointSensorStatus() {
712
- return new encoders_1.BaseCommand('GetDewPointSensorStatus', 0x72);
713
- }
714
- static getFilterAlarm() {
715
- return new encoders_1.BaseCommand('GetFilterAlarm', 0x73);
716
- }
717
- }
718
- exports.FanCoilThermostatCommands = FanCoilThermostatCommands;
719
- //# sourceMappingURL=FanCoilThermostat.js.map