homematic-manager 3.4.0 → 3.4.2
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.
- package/node_modules/@homematic-manager/backend/dist/api/backend.js +6 -5
- package/node_modules/@homematic-manager/backend/package.json +1 -1
- package/node_modules/@homematic-manager/core/dist/api/types.d.ts +4 -2
- package/node_modules/@homematic-manager/core/dist/data/types.d.ts +6 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/engine.d.ts +8 -7
- package/node_modules/@homematic-manager/core/dist/easymodes/engine.js +23 -29
- package/node_modules/@homematic-manager/core/dist/easymodes/legacyValues.d.ts +28 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/legacyValues.js +97 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/linkTypes.d.ts +118 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/linkTypes.js +325 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/senderForms.d.ts +101 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/senderForms.js +251 -0
- package/node_modules/@homematic-manager/core/dist/index.d.ts +3 -0
- package/node_modules/@homematic-manager/core/dist/index.js +3 -0
- package/node_modules/@homematic-manager/core/package.json +1 -1
- package/package.json +4 -4
- package/ui/assets/{index-D94DHu87.css → index-BOEXCG42.css} +1 -1
- package/ui/assets/index-Fj6yr6EG.js +21 -0
- package/ui/index.html +2 -2
- package/ui/assets/index-Ot-YDwXG.js +0 -21
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task 108: which receiver folder and sender file of the easy-mode data a link's profiles come
|
|
3
|
+
* from - the step the CCU's WebUI takes before it shows a single profile.
|
|
4
|
+
*
|
|
5
|
+
* `ic_setprofiles.cgi` does not open `<RECEIVER_TYPE>/<SENDER_TYPE>.tcl` directly. It opens
|
|
6
|
+
* `linkHmIP_<RECEIVER_TYPE>.tcl` for an HmIP receiver, or the `<paramid>.tcl` its LINK paramset id
|
|
7
|
+
* names for a BidCos one, and that file chooses the folder and the sender file; inside the folder,
|
|
8
|
+
* a sender file may again be only a dispatcher that sources another by a value read at run time.
|
|
9
|
+
* Looking the profiles up by the raw channel types, as hmm did up to 3.4.0, gave every link whose
|
|
10
|
+
* WebUI file is chosen that way the expert profile only - HmIPW-DRI16/DRI32 inputs above all,
|
|
11
|
+
* whose channels are `MULTI_MODE_INPUT_TRANSMITTER` - or another device's profiles (a wired blind
|
|
12
|
+
* actuator run as a shutter got the blind profiles).
|
|
13
|
+
*
|
|
14
|
+
* The rules below are those of the WebUI's easymode tree (OpenCCU-Base `www/config/easymodes`);
|
|
15
|
+
* `data/extracted/easymode_links.json` is extracted from it by `data/scripts/easymode-links.mjs`,
|
|
16
|
+
* and `linkTypes.test.ts` fails for every rule of it this module does not follow.
|
|
17
|
+
*
|
|
18
|
+
* Pure: whatever has to be read from the interface (a MASTER paramset, the `channelMode`
|
|
19
|
+
* metadata, a LINK paramset id, whether a link exists) is asked through {@link LinkTypeQueries},
|
|
20
|
+
* and only when a rule needs it.
|
|
21
|
+
*/
|
|
22
|
+
const MULTI = 'MULTI_MODE_INPUT_TRANSMITTER';
|
|
23
|
+
const ROTARY = 'ROTARY_CONTROL_TRANSCEIVER';
|
|
24
|
+
const FDC = { deviceType: 'HmIP-FDC', mode: 1, suffix: '_FDC' };
|
|
25
|
+
function multi(folder, variant) {
|
|
26
|
+
return variant ? { by: 'CHANNEL_OPERATION_MODE', folder, variant } : { by: 'CHANNEL_OPERATION_MODE', folder };
|
|
27
|
+
}
|
|
28
|
+
function rotary(folder) {
|
|
29
|
+
return { by: 'channel', folder };
|
|
30
|
+
}
|
|
31
|
+
/** The dispatcher files of the WebUI's receiver folders, by folder and sender type. */
|
|
32
|
+
export const LINK_DISPATCHERS = {
|
|
33
|
+
ACCESS_RECEIVER: { [MULTI]: multi('ACCESS_RECEIVER') },
|
|
34
|
+
ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER: { [MULTI]: multi('ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER') },
|
|
35
|
+
ALARM_SWITCH_VIRTUAL_RECEIVER: { [MULTI]: multi('ALARM_SWITCH_VIRTUAL_RECEIVER') },
|
|
36
|
+
AUTO_RELOCK_TRANSCEIVER: { [MULTI]: multi('AUTO_RELOCK_TRANSCEIVER') },
|
|
37
|
+
BLIND_VIRTUAL_RECEIVER: { [MULTI]: multi('BLIND_VIRTUAL_RECEIVER'), [ROTARY]: rotary('BLIND_VIRTUAL_RECEIVER') },
|
|
38
|
+
DIMMER_VIRTUAL_RECEIVER: { [MULTI]: multi('DIMMER_VIRTUAL_RECEIVER'), [ROTARY]: rotary('DIMMER_VIRTUAL_RECEIVER') },
|
|
39
|
+
DOOR_LOCK_TRANSCEIVER: { [MULTI]: multi('DOOR_LOCK_TRANSCEIVER') },
|
|
40
|
+
DOOR_RECEIVER: { [MULTI]: multi('DOOR_RECEIVER') },
|
|
41
|
+
HEATING_KEY_RECEIVER: { [MULTI]: multi('HEATING_KEY_RECEIVER') },
|
|
42
|
+
SHUTTER_VIRTUAL_RECEIVER: {
|
|
43
|
+
[MULTI]: multi('SHUTTER_VIRTUAL_RECEIVER'),
|
|
44
|
+
[ROTARY]: rotary('SHUTTER_VIRTUAL_RECEIVER'),
|
|
45
|
+
},
|
|
46
|
+
SIMPLE_SWITCH_RECEIVER: { [MULTI]: multi('SIMPLE_SWITCH_RECEIVER') },
|
|
47
|
+
STATE_RESET_RECEIVER: { [MULTI]: multi('STATE_RESET_RECEIVER') },
|
|
48
|
+
SWITCH_VIRTUAL_RECEIVER: {
|
|
49
|
+
[MULTI]: multi('SWITCH_VIRTUAL_RECEIVER', FDC),
|
|
50
|
+
[ROTARY]: rotary('SWITCH_VIRTUAL_RECEIVER'),
|
|
51
|
+
},
|
|
52
|
+
UNIVERSAL_ACTOR: { [MULTI]: multi('DIMMER_VIRTUAL_RECEIVER'), [ROTARY]: rotary('DIMMER_VIRTUAL_RECEIVER') },
|
|
53
|
+
UNIVERSAL_LIGHT_RECEIVER_LSC: {
|
|
54
|
+
[MULTI]: multi('UNIVERSAL_LIGHT_RECEIVER_LSC'),
|
|
55
|
+
[ROTARY]: rotary('UNIVERSAL_LIGHT_RECEIVER_LSC'),
|
|
56
|
+
},
|
|
57
|
+
UNIVERSAL_LIGHT_RECEIVER_PWM: {
|
|
58
|
+
[MULTI]: multi('DIMMER_VIRTUAL_RECEIVER'),
|
|
59
|
+
[ROTARY]: rotary('DIMMER_VIRTUAL_RECEIVER'),
|
|
60
|
+
},
|
|
61
|
+
'UNIVERSAL_LIGHT_RECEIVER_RGB(W)': { [MULTI]: multi('UNIVERSAL_LIGHT_RECEIVER_RGB(W)') },
|
|
62
|
+
UNIVERSAL_LIGHT_RECEIVER_RGBW_DALI: { [MULTI]: multi('UNIVERSAL_LIGHT_RECEIVER_RGBW_DALI') },
|
|
63
|
+
UNIVERSAL_LIGHT_RECEIVER_TW: { [MULTI]: multi('UNIVERSAL_LIGHT_RECEIVER_TW') },
|
|
64
|
+
WATER_SWITCH_VIRTUAL_RECEIVER: {
|
|
65
|
+
[MULTI]: multi('SWITCH_VIRTUAL_RECEIVER', FDC),
|
|
66
|
+
[ROTARY]: rotary('SWITCH_VIRTUAL_RECEIVER'),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const LEVEL_COMMAND = {
|
|
70
|
+
LEVEL_COMMAND_TRANSMITTER_CO2: 'COND_SWITCH_TRANSMITTER',
|
|
71
|
+
LEVEL_COMMAND_TRANSMITTER_HUMIDITY: 'COND_SWITCH_TRANSMITTER_HUMIDITY',
|
|
72
|
+
LEVEL_COMMAND_TRANSMITTER_TEMPERATURE: 'COND_SWITCH_TRANSMITTER_TEMPERATURE',
|
|
73
|
+
};
|
|
74
|
+
const file = (modRc8, levelCommand = {}) => ({
|
|
75
|
+
modRc8,
|
|
76
|
+
levelCommand,
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* The WebUI's `linkHmIP_<RECEIVER_TYPE>.tcl` files. An HmIP receiver type without one has no easy
|
|
80
|
+
* mode in the WebUI (`receiver_paramid` stays empty); hmm still offers what the data has for it.
|
|
81
|
+
*/
|
|
82
|
+
export const HMIP_LINK_FILES = {
|
|
83
|
+
ACCESS_RECEIVER: file(true),
|
|
84
|
+
ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
85
|
+
ALARM_COND_SWITCH_RECEIVER: file(false),
|
|
86
|
+
ALARM_SWITCH_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
87
|
+
AUTO_RELOCK_TRANSCEIVER: file(true),
|
|
88
|
+
BLIND_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
89
|
+
CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER: file(false),
|
|
90
|
+
CLIMATECONTROL_FLOOR_TRANSCEIVER: file(false),
|
|
91
|
+
CLIMATECONTROL_INPUT_RECEIVER: file(false),
|
|
92
|
+
DIMMER_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
93
|
+
DOOR_LOCK_TRANSCEIVER: file(true),
|
|
94
|
+
DOOR_RECEIVER: file(true),
|
|
95
|
+
HEATING_CLIMATECONTROL_CL_RECEIVER: file(false),
|
|
96
|
+
HEATING_CLIMATECONTROL_RECEIVER: file(false),
|
|
97
|
+
HEATING_KEY_RECEIVER: file(false),
|
|
98
|
+
HEATING_ROOM_TH_RECEIVER: file(false),
|
|
99
|
+
HEATING_SHUTTER_CONTACT_RECEIVER: file(false),
|
|
100
|
+
OPTICAL_SIGNAL_RECEIVER: file(true),
|
|
101
|
+
SERVO_VIRTUAL_RECEIVER: file(true),
|
|
102
|
+
SHUTTER_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
103
|
+
SIMPLE_SWITCH_RECEIVER: file(true),
|
|
104
|
+
STATE_RESET_RECEIVER: file(false),
|
|
105
|
+
SWITCH_TRANSCEIVER: file(true, LEVEL_COMMAND),
|
|
106
|
+
// the only one that keeps the CO2 sender apart
|
|
107
|
+
SWITCH_VIRTUAL_RECEIVER: file(true, {
|
|
108
|
+
...LEVEL_COMMAND,
|
|
109
|
+
LEVEL_COMMAND_TRANSMITTER_CO2: 'COND_SWITCH_TRANSMITTER_CO2',
|
|
110
|
+
}),
|
|
111
|
+
UNIVERSAL_LIGHT_RECEIVER: file(true, LEVEL_COMMAND),
|
|
112
|
+
WATER_SWITCH_VIRTUAL_RECEIVER: file(true, LEVEL_COMMAND),
|
|
113
|
+
WINDOW_DRIVE_RECEIVER: file(false, LEVEL_COMMAND),
|
|
114
|
+
};
|
|
115
|
+
const WDS100 = { senderSuffix: { deviceType: 'HM-WDS100-C6-O-2', suffix: '_2' } };
|
|
116
|
+
/** The BidCos link dispatchers that do more than open `<TYPE>/<SENDER_TYPE>.tcl`, by paramset id. */
|
|
117
|
+
export const BIDCOS_LINK_FILES = {
|
|
118
|
+
alarmactuator_ch_link: WDS100,
|
|
119
|
+
blind_ch_link: WDS100,
|
|
120
|
+
dimmer_ch_link: { virtualDimmer: 'DIMMER' },
|
|
121
|
+
dw_controller_brightness_ch_link: { receiver: 'DIMMER' },
|
|
122
|
+
hmw_blind_ch_link: { receiver: 'HMW_', inputType: true },
|
|
123
|
+
hmw_dimmer_ch_link: { receiver: 'HMW_', inputType: true },
|
|
124
|
+
hmw_switch_ch_link: { receiver: 'HMW_', inputType: true },
|
|
125
|
+
jalousie_ch_link: WDS100,
|
|
126
|
+
signal_chime_ch_link: { pair: true },
|
|
127
|
+
signal_led_ch_link: { pair: true },
|
|
128
|
+
signal_mchime_ch_link: { receiver: 'M', pair: true },
|
|
129
|
+
signal_mled_ch_link: { receiver: 'M', pair: true },
|
|
130
|
+
statusindicator_ch_link: WDS100,
|
|
131
|
+
switch_ch_link: WDS100,
|
|
132
|
+
};
|
|
133
|
+
/** Whether an interface is served by hmipserver, where the WebUI takes the `linkHmIP_*` route. */
|
|
134
|
+
export function isHmipInterface(interfaceName) {
|
|
135
|
+
return interfaceName.startsWith('HmIP');
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* An enum read from a MASTER paramset as the number the WebUI's Tcl compares: HmIP answers the
|
|
139
|
+
* index, a name is looked up in the description's `VALUE_LIST`. `undefined` when neither works.
|
|
140
|
+
*/
|
|
141
|
+
export function enumValueIndex(value, values) {
|
|
142
|
+
if (typeof value === 'number')
|
|
143
|
+
return value;
|
|
144
|
+
if (typeof value === 'boolean')
|
|
145
|
+
return value ? 1 : 0;
|
|
146
|
+
if (typeof value !== 'string' || value === '')
|
|
147
|
+
return undefined;
|
|
148
|
+
if (/^\d+$/u.test(value))
|
|
149
|
+
return Number(value);
|
|
150
|
+
const at = values?.indexOf(value) ?? -1;
|
|
151
|
+
return at >= 0 ? at : undefined;
|
|
152
|
+
}
|
|
153
|
+
/** `x.y.z` >= `major.minor`, as `linkHmIP_BLIND_VIRTUAL_RECEIVER.tcl` compares a firmware. */
|
|
154
|
+
function firmwareAtLeast(firmware, major, minor) {
|
|
155
|
+
const [a = 'x', b = 'x'] = (firmware ?? '').split('.');
|
|
156
|
+
const fwMajor = Number.parseInt(a, 10);
|
|
157
|
+
const fwMinor = Number.parseInt(b, 10);
|
|
158
|
+
if (Number.isNaN(fwMajor) || Number.isNaN(fwMinor))
|
|
159
|
+
return false;
|
|
160
|
+
return fwMajor > major || (fwMajor === major && fwMinor >= minor);
|
|
161
|
+
}
|
|
162
|
+
function channelNumber(address) {
|
|
163
|
+
return address.slice(address.lastIndexOf(':') + 1);
|
|
164
|
+
}
|
|
165
|
+
function deviceAddress(address) {
|
|
166
|
+
const at = address.lastIndexOf(':');
|
|
167
|
+
return at < 0 ? address : address.slice(0, at);
|
|
168
|
+
}
|
|
169
|
+
/** One MASTER read per address within one resolution. */
|
|
170
|
+
function cachedMaster(queries) {
|
|
171
|
+
const cache = new Map();
|
|
172
|
+
return (address) => {
|
|
173
|
+
let entry = cache.get(address);
|
|
174
|
+
if (!entry) {
|
|
175
|
+
entry = (queries.master?.(address) ?? Promise.resolve(undefined)).catch(() => undefined);
|
|
176
|
+
cache.set(address, entry);
|
|
177
|
+
}
|
|
178
|
+
return entry;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
async function masterEnum(master, address, param) {
|
|
182
|
+
const read = await master(address);
|
|
183
|
+
return enumValueIndex(read?.values[param], read?.description?.[param]?.VALUE_LIST);
|
|
184
|
+
}
|
|
185
|
+
async function ask(question, fallback) {
|
|
186
|
+
if (!question)
|
|
187
|
+
return fallback;
|
|
188
|
+
try {
|
|
189
|
+
return await question();
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return fallback;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/** `linkHmIP_<TYPE>.tcl`'s receiver part: the folder its profiles come from. */
|
|
196
|
+
async function hmipReceiver(receiver, queries, master) {
|
|
197
|
+
const { type, parentType } = receiver;
|
|
198
|
+
if (type === 'BLIND_VIRTUAL_RECEIVER') {
|
|
199
|
+
const wired = parentType.split('-')[0] === 'HmIPW' || parentType === 'HmIP-DRBLI4' || parentType === 'HmIP-FBL';
|
|
200
|
+
if (wired && firmwareAtLeast(receiver.firmware, 1, 6)) {
|
|
201
|
+
const mode = await ask(() => queries.channelMode?.(receiver.address) ?? Promise.resolve(''), '');
|
|
202
|
+
return mode === '' || mode === 'shutter' ? 'SHUTTER_VIRTUAL_RECEIVER' : 'BLIND_VIRTUAL_RECEIVER';
|
|
203
|
+
}
|
|
204
|
+
return type;
|
|
205
|
+
}
|
|
206
|
+
if (type === 'DIMMER_VIRTUAL_RECEIVER' && (parentType === 'HmIP-WUA' || parentType === 'ELV-SH-WUA')) {
|
|
207
|
+
return 'UNIVERSAL_ACTOR';
|
|
208
|
+
}
|
|
209
|
+
if (type === 'UNIVERSAL_LIGHT_RECEIVER') {
|
|
210
|
+
if (parentType === 'HmIP-RGBW') {
|
|
211
|
+
// 0 = RGBW, 1 = RGB, 2 = tunable white, 3 = PWM
|
|
212
|
+
const mode = await masterEnum(master, `${deviceAddress(receiver.address)}:0`, 'DEVICE_OPERATION_MODE');
|
|
213
|
+
if (mode === 0 || mode === 1)
|
|
214
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_RGB(W)';
|
|
215
|
+
if (mode === 2)
|
|
216
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_TW';
|
|
217
|
+
if (mode === 3)
|
|
218
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_PWM';
|
|
219
|
+
return type;
|
|
220
|
+
}
|
|
221
|
+
if (parentType === 'HmIP-DRG-DALI') {
|
|
222
|
+
// 0 = switch, 1 = dimmer (PWM), 2 = tunable white, 3/4 = RGB + tunable white
|
|
223
|
+
const mode = await masterEnum(master, receiver.address, 'UNIVERSAL_LIGHT_MAX_CAPABILITIES');
|
|
224
|
+
if (mode === 0)
|
|
225
|
+
return 'SWITCH_VIRTUAL_RECEIVER';
|
|
226
|
+
if (mode === 1)
|
|
227
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_PWM';
|
|
228
|
+
if (mode === 2)
|
|
229
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_TW';
|
|
230
|
+
if (mode === 3 || mode === 4)
|
|
231
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_RGBW_DALI';
|
|
232
|
+
return type;
|
|
233
|
+
}
|
|
234
|
+
if (parentType === 'HmIP-LSC')
|
|
235
|
+
return 'UNIVERSAL_LIGHT_RECEIVER_LSC';
|
|
236
|
+
return type;
|
|
237
|
+
}
|
|
238
|
+
if (type === 'OPTICAL_SIGNAL_RECEIVER')
|
|
239
|
+
return 'DIMMER_VIRTUAL_RECEIVER';
|
|
240
|
+
if (type === 'SWITCH_TRANSCEIVER')
|
|
241
|
+
return 'SWITCH_VIRTUAL_RECEIVER';
|
|
242
|
+
return type;
|
|
243
|
+
}
|
|
244
|
+
/** `linkHmIP_<TYPE>.tcl`'s sender part. */
|
|
245
|
+
async function hmipSender(receiver, sender, master) {
|
|
246
|
+
const rules = HMIP_LINK_FILES[receiver.type];
|
|
247
|
+
if (!rules)
|
|
248
|
+
return sender.type;
|
|
249
|
+
if (rules.modRc8 && sender.type === 'KEY_TRANSCEIVER' && sender.parentType === 'HmIP-MOD-RC8') {
|
|
250
|
+
const mode = await masterEnum(master, sender.address, 'CHANNEL_OPERATION_MODE');
|
|
251
|
+
if (mode === 2)
|
|
252
|
+
return 'SWITCH_TRANSCEIVER';
|
|
253
|
+
if (mode === 3)
|
|
254
|
+
return 'SHUTTER_CONTACT';
|
|
255
|
+
return sender.type;
|
|
256
|
+
}
|
|
257
|
+
return rules.levelCommand[sender.type] ?? sender.type;
|
|
258
|
+
}
|
|
259
|
+
/** A dispatcher file inside the receiver folder: the folder and sender file it sources. */
|
|
260
|
+
async function dispatch(folder, senderType, receiver, sender, master) {
|
|
261
|
+
const dispatcher = LINK_DISPATCHERS[folder]?.[senderType];
|
|
262
|
+
if (!dispatcher)
|
|
263
|
+
return { receiverType: folder, senderType };
|
|
264
|
+
if (dispatcher.by === 'channel') {
|
|
265
|
+
return { receiverType: dispatcher.folder, senderType: `${senderType}_${channelNumber(sender.address)}` };
|
|
266
|
+
}
|
|
267
|
+
const mode = await masterEnum(master, sender.address, 'CHANNEL_OPERATION_MODE');
|
|
268
|
+
if (mode === undefined)
|
|
269
|
+
return { receiverType: folder, senderType };
|
|
270
|
+
const variant = dispatcher.variant && receiver.parentType === dispatcher.variant.deviceType && mode === dispatcher.variant.mode
|
|
271
|
+
? dispatcher.variant.suffix
|
|
272
|
+
: '';
|
|
273
|
+
return { receiverType: dispatcher.folder, senderType: `${senderType}_${String(mode)}${variant}` };
|
|
274
|
+
}
|
|
275
|
+
async function bidcosTypes(receiver, sender, queries, master) {
|
|
276
|
+
const answer = await ask(() => queries.linkParamsetId?.(receiver.address) ?? Promise.resolve(''), '');
|
|
277
|
+
// the WebUI's getExistingParamId: the first id of the (Tcl) list it has a file for
|
|
278
|
+
const paramid = answer
|
|
279
|
+
.trim()
|
|
280
|
+
.split(/\s+/u)
|
|
281
|
+
.map((word) => (word.includes('=') ? (word.split('=')[1] ?? '') : word))
|
|
282
|
+
.find((id) => Object.prototype.hasOwnProperty.call(BIDCOS_LINK_FILES, id));
|
|
283
|
+
const rules = paramid === undefined ? undefined : BIDCOS_LINK_FILES[paramid];
|
|
284
|
+
if (!rules)
|
|
285
|
+
return { receiverType: receiver.type, senderType: sender.type };
|
|
286
|
+
let receiverType = receiver.type;
|
|
287
|
+
if (rules.receiver === 'HMW_')
|
|
288
|
+
receiverType = `HMW_${receiver.type}`;
|
|
289
|
+
else if (rules.receiver === 'M')
|
|
290
|
+
receiverType = `${receiver.type}M`;
|
|
291
|
+
else if (rules.receiver === 'DIMMER')
|
|
292
|
+
receiverType = 'DIMMER';
|
|
293
|
+
if (rules.virtualDimmer && receiver.type === 'VIRTUAL_DIMMER')
|
|
294
|
+
receiverType = rules.virtualDimmer;
|
|
295
|
+
let senderType = sender.type;
|
|
296
|
+
if (rules.senderSuffix && sender.parentType === rules.senderSuffix.deviceType) {
|
|
297
|
+
senderType += rules.senderSuffix.suffix;
|
|
298
|
+
}
|
|
299
|
+
if (rules.inputType) {
|
|
300
|
+
// `set IO "_1"` for a virtual key, `_$hmw(INPUT_TYPE)` where the sender has it
|
|
301
|
+
senderType += `_${String((await masterEnum(master, sender.address, 'INPUT_TYPE')) ?? 1)}`;
|
|
302
|
+
}
|
|
303
|
+
if (rules.pair && sender.group !== undefined && sender.group !== '') {
|
|
304
|
+
const group = sender.group;
|
|
305
|
+
const linked = await ask(() => queries.linked?.(group, receiver.address) ?? Promise.resolve(false), false);
|
|
306
|
+
if (linked)
|
|
307
|
+
senderType += '_PAIR';
|
|
308
|
+
}
|
|
309
|
+
return { receiverType, senderType };
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* The receiver folder and sender file the WebUI takes a link's profiles from. Without the reads a
|
|
313
|
+
* rule needs (a query missing, failing or answering nothing), the rule leaves the type as it is,
|
|
314
|
+
* which is what hmm did before.
|
|
315
|
+
*/
|
|
316
|
+
export async function linkProfileTypes(interfaceName, receiver, sender, queries = {}) {
|
|
317
|
+
const master = cachedMaster(queries);
|
|
318
|
+
if (!isHmipInterface(interfaceName)) {
|
|
319
|
+
return bidcosTypes(receiver, sender, queries, master);
|
|
320
|
+
}
|
|
321
|
+
const folder = await hmipReceiver(receiver, queries, master);
|
|
322
|
+
const senderType = await hmipSender(receiver, sender, master);
|
|
323
|
+
return dispatch(folder, senderType, receiver, sender, master);
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=linkTypes.js.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task 109: the forms the CCU's WebUI draws for the *sender* side of a link.
|
|
3
|
+
*
|
|
4
|
+
* `ic_setprofiles.cgi` sources `easymodes/<paramid>.tcl` for the sender part of a link, the id being
|
|
5
|
+
* `getParamsetId(<sender>, LINK)`. For almost every sender that file does not exist, or is only a
|
|
6
|
+
* receiver folder's dispatcher, and the sender's LINK parameters - where it has any - are shown raw.
|
|
7
|
+
* Three old BidCos sensors have a form of their own:
|
|
8
|
+
*
|
|
9
|
+
* - `ks550_ch_link` (KS550, HM-WDS100-C6-O) and `wds100_ch_link` (HM-WDS100-C6-O-2): the weather
|
|
10
|
+
* station's storm thresholds, a profile "Sturmschwelle" with the switch-on and switch-off threshold
|
|
11
|
+
* as a Beaufort scale; the HM-WDS100-C6-O-2 copies them into the receiver's `SHORT_COND_VALUE_HI` /
|
|
12
|
+
* `SHORT_COND_VALUE_LO`. Hidden when the receiver is a combination sensor (`WS_CS`).
|
|
13
|
+
* - `wa_od_ch_link` (HM-Sen-Wa-Od, the capacitive filling level sensor): no profile, the upper and
|
|
14
|
+
* lower fill level as a percentage (the raw value is twice it), each switchable off (255).
|
|
15
|
+
*
|
|
16
|
+
* The tables are the WebUI's (`www/config/easymodes`); `data/extracted/easymode_links.json`'s
|
|
17
|
+
* `senders` and `weatherTexts` are extracted from it by `data/scripts/easymode-links.mjs`, and
|
|
18
|
+
* `senderForms.test.ts` fails where this module differs from the extract.
|
|
19
|
+
*/
|
|
20
|
+
import type { Paramset, ParamsetValue } from '../rpc/values.js';
|
|
21
|
+
/** A localised text of the forms: German and English, as the WebUI has them. */
|
|
22
|
+
export interface SenderText {
|
|
23
|
+
readonly de: string;
|
|
24
|
+
readonly en: string;
|
|
25
|
+
}
|
|
26
|
+
/** One entry of a threshold select: the raw value and its Beaufort grade. */
|
|
27
|
+
export interface StormOption {
|
|
28
|
+
readonly value: number;
|
|
29
|
+
/** The Beaufort grade, 0-12 - the index into {@link WIND_FORCE} and {@link WIND_DESCRIPTION}. */
|
|
30
|
+
readonly force: number;
|
|
31
|
+
}
|
|
32
|
+
export interface StormForm {
|
|
33
|
+
readonly kind: 'storm';
|
|
34
|
+
readonly paramsetId: string;
|
|
35
|
+
/** The values the profile "Sturmschwelle" takes for both thresholds (`set range {…}`). */
|
|
36
|
+
readonly range: readonly number[];
|
|
37
|
+
/** What the selects offer, by device type (the HM-WDS100-C6-O-2 has 20 where the others have 25). */
|
|
38
|
+
readonly options: (senderDeviceType: string) => readonly StormOption[];
|
|
39
|
+
/** The receiver parameters the thresholds are copied into, for this sender device type. */
|
|
40
|
+
readonly mirrors: (senderDeviceType: string) => Readonly<Record<string, string>>;
|
|
41
|
+
}
|
|
42
|
+
export interface FillLevelForm {
|
|
43
|
+
readonly kind: 'fillLevel';
|
|
44
|
+
readonly paramsetId: string;
|
|
45
|
+
/** The raw value of a threshold that is switched off. */
|
|
46
|
+
readonly inactive: number;
|
|
47
|
+
/** Raw value per percent: the WebUI shows `100 / (200 / raw)`. */
|
|
48
|
+
readonly perPercent: number;
|
|
49
|
+
}
|
|
50
|
+
export type SenderForm = StormForm | FillLevelForm;
|
|
51
|
+
/** The profile ids of the storm form: the expert view and "Sturmschwelle". */
|
|
52
|
+
export declare const STORM_EXPERT = 0;
|
|
53
|
+
export declare const STORM_THRESHOLD = 1;
|
|
54
|
+
export declare const SENDER_FORMS: Readonly<Record<string, SenderForm>>;
|
|
55
|
+
/** Receivers for which the storm form hides itself ("bei Verknüpfung Wetterstation - Kombisensor sinnlos"). */
|
|
56
|
+
export declare const STORM_HIDDEN_FOR_RECEIVER = "WS_CS";
|
|
57
|
+
/**
|
|
58
|
+
* The sender form of a link: the one the sender's LINK paramset id names, unless that form hides
|
|
59
|
+
* itself for this receiver. `undefined` shows the sender's parameters raw, as before.
|
|
60
|
+
*/
|
|
61
|
+
export declare function senderFormFor(paramsetId: string, receiverType: string): SenderForm | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The profile of a storm form a link follows, as `get_cur_profile2` decides it: "Sturmschwelle"
|
|
64
|
+
* when both thresholds hold one of its values (`PEER_NEEDS_BURST` takes either), the expert view
|
|
65
|
+
* otherwise - a fresh link's thresholds are 0.
|
|
66
|
+
*/
|
|
67
|
+
export declare function stormProfile(form: StormForm, values: Paramset): number;
|
|
68
|
+
/**
|
|
69
|
+
* What choosing "Sturmschwelle" writes: the thresholds stay where they already hold a value of the
|
|
70
|
+
* profile, otherwise the first one (the WebUI's select starts on it).
|
|
71
|
+
*/
|
|
72
|
+
export declare function applyStormProfile(form: StormForm, values: Paramset): Record<string, number>;
|
|
73
|
+
/**
|
|
74
|
+
* The fill level of a raw threshold as the WebUI shows it: `100 / (200 / raw)` rounded to .0 or .5
|
|
75
|
+
* (`setDecimalPlaces`), and whether the threshold is on at all.
|
|
76
|
+
*/
|
|
77
|
+
export declare function fillLevelPercent(form: FillLevelForm, raw: ParamsetValue | undefined): {
|
|
78
|
+
percent: number;
|
|
79
|
+
active: boolean;
|
|
80
|
+
};
|
|
81
|
+
/** The raw threshold of a percentage (0-100, to .0 or .5), or the inactive value. */
|
|
82
|
+
export declare function fillLevelRaw(form: FillLevelForm, percent: number, active: boolean): number;
|
|
83
|
+
/**
|
|
84
|
+
* `isLowerGTUpper` of the WebUI's fill level form: the lower threshold stays 5 % below the upper
|
|
85
|
+
* one. A lower one at or above the upper pushes the upper up (unless that is off); an upper one at
|
|
86
|
+
* or below the lower pulls the lower down; the lower never below 0, the upper never above 100.
|
|
87
|
+
* Percentages; `undefined` for a threshold that is off.
|
|
88
|
+
*/
|
|
89
|
+
export declare function adjustFillLevels(changed: 'upper' | 'lower', upper: number | undefined, lower: number | undefined): {
|
|
90
|
+
upper: number | undefined;
|
|
91
|
+
lower: number | undefined;
|
|
92
|
+
};
|
|
93
|
+
/** The weather forms' texts (`WEATHER/localization/lang.js`). */
|
|
94
|
+
export declare const STORM_TEXTS: Readonly<Record<string, SenderText>>;
|
|
95
|
+
/** The names of the storm form's profiles (`PROFILES_MAP`): the expert view and "Sturmschwelle". */
|
|
96
|
+
export declare const STORM_PROFILE_NAMES: Readonly<Record<number, SenderText>>;
|
|
97
|
+
/** The Beaufort grades' names, 0-12. */
|
|
98
|
+
export declare const WIND_FORCE: readonly SenderText[];
|
|
99
|
+
/** What each grade looks like outside, 0-12. */
|
|
100
|
+
export declare const WIND_DESCRIPTION: readonly SenderText[];
|
|
101
|
+
//# sourceMappingURL=senderForms.d.ts.map
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task 109: the forms the CCU's WebUI draws for the *sender* side of a link.
|
|
3
|
+
*
|
|
4
|
+
* `ic_setprofiles.cgi` sources `easymodes/<paramid>.tcl` for the sender part of a link, the id being
|
|
5
|
+
* `getParamsetId(<sender>, LINK)`. For almost every sender that file does not exist, or is only a
|
|
6
|
+
* receiver folder's dispatcher, and the sender's LINK parameters - where it has any - are shown raw.
|
|
7
|
+
* Three old BidCos sensors have a form of their own:
|
|
8
|
+
*
|
|
9
|
+
* - `ks550_ch_link` (KS550, HM-WDS100-C6-O) and `wds100_ch_link` (HM-WDS100-C6-O-2): the weather
|
|
10
|
+
* station's storm thresholds, a profile "Sturmschwelle" with the switch-on and switch-off threshold
|
|
11
|
+
* as a Beaufort scale; the HM-WDS100-C6-O-2 copies them into the receiver's `SHORT_COND_VALUE_HI` /
|
|
12
|
+
* `SHORT_COND_VALUE_LO`. Hidden when the receiver is a combination sensor (`WS_CS`).
|
|
13
|
+
* - `wa_od_ch_link` (HM-Sen-Wa-Od, the capacitive filling level sensor): no profile, the upper and
|
|
14
|
+
* lower fill level as a percentage (the raw value is twice it), each switchable off (255).
|
|
15
|
+
*
|
|
16
|
+
* The tables are the WebUI's (`www/config/easymodes`); `data/extracted/easymode_links.json`'s
|
|
17
|
+
* `senders` and `weatherTexts` are extracted from it by `data/scripts/easymode-links.mjs`, and
|
|
18
|
+
* `senderForms.test.ts` fails where this module differs from the extract.
|
|
19
|
+
*/
|
|
20
|
+
/** The profile ids of the storm form: the expert view and "Sturmschwelle". */
|
|
21
|
+
export const STORM_EXPERT = 0;
|
|
22
|
+
export const STORM_THRESHOLD = 1;
|
|
23
|
+
const STORM_THRESHOLDS = ['STORM_UPPER_THRESHOLD', 'STORM_LOWER_THRESHOLD'];
|
|
24
|
+
/** The Beaufort options of the KS550 form: raw value -> grade. */
|
|
25
|
+
const KS550_OPTIONS = [
|
|
26
|
+
[1, 0],
|
|
27
|
+
[2, 1],
|
|
28
|
+
[5, 2],
|
|
29
|
+
[12, 3],
|
|
30
|
+
[25, 4],
|
|
31
|
+
[29, 5],
|
|
32
|
+
[39, 6],
|
|
33
|
+
[50, 7],
|
|
34
|
+
[62, 8],
|
|
35
|
+
[75, 9],
|
|
36
|
+
[89, 10],
|
|
37
|
+
[103, 11],
|
|
38
|
+
[118, 12],
|
|
39
|
+
].map(([value, force]) => ({ value: value ?? 0, force: force ?? 0 }));
|
|
40
|
+
const WDS100_2 = 'HM-WDS100-C6-O-2';
|
|
41
|
+
export const SENDER_FORMS = {
|
|
42
|
+
ks550_ch_link: {
|
|
43
|
+
kind: 'storm',
|
|
44
|
+
paramsetId: 'ks550_ch_link',
|
|
45
|
+
range: [1, 2, 5, 12, 15, 25, 29, 39, 50, 62, 75, 89, 103, 118],
|
|
46
|
+
options: () => KS550_OPTIONS,
|
|
47
|
+
mirrors: () => ({}),
|
|
48
|
+
},
|
|
49
|
+
wds100_ch_link: {
|
|
50
|
+
kind: 'storm',
|
|
51
|
+
paramsetId: 'wds100_ch_link',
|
|
52
|
+
range: [1, 2, 5, 12, 15, 20, 25, 29, 39, 50, 62, 75, 89, 103, 118],
|
|
53
|
+
// `[string first "HM-WDS100-C6-O-2" $SENDER] == 0`: grade 4 is 20 on that one, 25 otherwise
|
|
54
|
+
options: (deviceType) => deviceType.startsWith(WDS100_2)
|
|
55
|
+
? KS550_OPTIONS.map((option) => (option.value === 25 ? { value: 20, force: option.force } : option))
|
|
56
|
+
: KS550_OPTIONS,
|
|
57
|
+
mirrors: (deviceType) => deviceType === WDS100_2
|
|
58
|
+
? { STORM_UPPER_THRESHOLD: 'SHORT_COND_VALUE_HI', STORM_LOWER_THRESHOLD: 'SHORT_COND_VALUE_LO' }
|
|
59
|
+
: {},
|
|
60
|
+
},
|
|
61
|
+
wa_od_ch_link: { kind: 'fillLevel', paramsetId: 'wa_od_ch_link', inactive: 255, perPercent: 2 },
|
|
62
|
+
};
|
|
63
|
+
/** Receivers for which the storm form hides itself ("bei Verknüpfung Wetterstation - Kombisensor sinnlos"). */
|
|
64
|
+
export const STORM_HIDDEN_FOR_RECEIVER = 'WS_CS';
|
|
65
|
+
/**
|
|
66
|
+
* The sender form of a link: the one the sender's LINK paramset id names, unless that form hides
|
|
67
|
+
* itself for this receiver. `undefined` shows the sender's parameters raw, as before.
|
|
68
|
+
*/
|
|
69
|
+
export function senderFormFor(paramsetId, receiverType) {
|
|
70
|
+
const form = SENDER_FORMS[paramsetId];
|
|
71
|
+
if (form?.kind === 'storm' && receiverType === STORM_HIDDEN_FOR_RECEIVER) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
return form;
|
|
75
|
+
}
|
|
76
|
+
const asNumber = (value) => (typeof value === 'number' ? value : Number(value));
|
|
77
|
+
/**
|
|
78
|
+
* The profile of a storm form a link follows, as `get_cur_profile2` decides it: "Sturmschwelle"
|
|
79
|
+
* when both thresholds hold one of its values (`PEER_NEEDS_BURST` takes either), the expert view
|
|
80
|
+
* otherwise - a fresh link's thresholds are 0.
|
|
81
|
+
*/
|
|
82
|
+
export function stormProfile(form, values) {
|
|
83
|
+
const fits = STORM_THRESHOLDS.every((name) => form.range.includes(asNumber(values[name])));
|
|
84
|
+
return fits ? STORM_THRESHOLD : STORM_EXPERT;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* What choosing "Sturmschwelle" writes: the thresholds stay where they already hold a value of the
|
|
88
|
+
* profile, otherwise the first one (the WebUI's select starts on it).
|
|
89
|
+
*/
|
|
90
|
+
export function applyStormProfile(form, values) {
|
|
91
|
+
const result = {};
|
|
92
|
+
for (const name of STORM_THRESHOLDS) {
|
|
93
|
+
if (!(name in values))
|
|
94
|
+
continue;
|
|
95
|
+
const current = asNumber(values[name]);
|
|
96
|
+
result[name] = form.range.includes(current) ? current : (form.range[0] ?? 0);
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The fill level of a raw threshold as the WebUI shows it: `100 / (200 / raw)` rounded to .0 or .5
|
|
102
|
+
* (`setDecimalPlaces`), and whether the threshold is on at all.
|
|
103
|
+
*/
|
|
104
|
+
export function fillLevelPercent(form, raw) {
|
|
105
|
+
const value = asNumber(raw);
|
|
106
|
+
if (value === form.inactive) {
|
|
107
|
+
return { percent: 0, active: false };
|
|
108
|
+
}
|
|
109
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
110
|
+
return { percent: 0, active: true };
|
|
111
|
+
}
|
|
112
|
+
return { percent: roundHalf(value / form.perPercent), active: true };
|
|
113
|
+
}
|
|
114
|
+
/** The raw threshold of a percentage (0-100, to .0 or .5), or the inactive value. */
|
|
115
|
+
export function fillLevelRaw(form, percent, active) {
|
|
116
|
+
if (!active) {
|
|
117
|
+
return form.inactive;
|
|
118
|
+
}
|
|
119
|
+
const clamped = Math.min(100, Math.max(0, Number.isFinite(percent) ? percent : 0));
|
|
120
|
+
return Math.round(roundHalf(clamped) * form.perPercent);
|
|
121
|
+
}
|
|
122
|
+
/** `setDecimalPlaces`: one decimal, then .1-.2 down to .0, .3-.7 to .5, .8-.9 up to the next whole. */
|
|
123
|
+
function roundHalf(value) {
|
|
124
|
+
const tenths = Math.round(value * 10);
|
|
125
|
+
const whole = Math.floor(tenths / 10);
|
|
126
|
+
const decimal = tenths - whole * 10;
|
|
127
|
+
if (decimal === 0)
|
|
128
|
+
return whole;
|
|
129
|
+
if (decimal <= 2)
|
|
130
|
+
return whole;
|
|
131
|
+
if (decimal <= 7)
|
|
132
|
+
return whole + 0.5;
|
|
133
|
+
return whole + 1;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* `isLowerGTUpper` of the WebUI's fill level form: the lower threshold stays 5 % below the upper
|
|
137
|
+
* one. A lower one at or above the upper pushes the upper up (unless that is off); an upper one at
|
|
138
|
+
* or below the lower pulls the lower down; the lower never below 0, the upper never above 100.
|
|
139
|
+
* Percentages; `undefined` for a threshold that is off.
|
|
140
|
+
*/
|
|
141
|
+
export function adjustFillLevels(changed, upper, lower) {
|
|
142
|
+
let up = upper;
|
|
143
|
+
let low = lower;
|
|
144
|
+
if (changed === 'lower') {
|
|
145
|
+
if (low !== undefined && up !== undefined && low >= up) {
|
|
146
|
+
up = low + 5;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
if (up !== undefined && low !== undefined && up <= low) {
|
|
151
|
+
low = up - 5;
|
|
152
|
+
}
|
|
153
|
+
if (low !== undefined && low < 0) {
|
|
154
|
+
low = 0;
|
|
155
|
+
if (up !== undefined)
|
|
156
|
+
up = 5;
|
|
157
|
+
}
|
|
158
|
+
if (up !== undefined && up > 100) {
|
|
159
|
+
up = 100;
|
|
160
|
+
if (low !== undefined)
|
|
161
|
+
low = 95;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return { upper: up, lower: low };
|
|
165
|
+
}
|
|
166
|
+
/** The weather forms' texts (`WEATHER/localization/lang.js`). */
|
|
167
|
+
export const STORM_TEXTS = {
|
|
168
|
+
weatherProfile1: { de: 'Sturmschwelle', en: 'Storm threshold' },
|
|
169
|
+
windInBeaufort: { de: 'Windstärke in Beaufort', en: 'Wind strength in Beaufort scale' },
|
|
170
|
+
upperStormThreshold: { de: 'Einschaltschwelle', en: 'Switch-on threshold' },
|
|
171
|
+
lowerStormThreshold: { de: 'Ausschaltschwelle', en: 'Switch-off threshold' },
|
|
172
|
+
toolTip0: {
|
|
173
|
+
de: 'Schaltbefehl bei überschreiten der eingestellten Schaltschwelle',
|
|
174
|
+
en: 'Switching command on exceeding the set threshold',
|
|
175
|
+
},
|
|
176
|
+
toolTip1: {
|
|
177
|
+
de: 'Schaltbefehl bei Unterschreiten der eingestellten Schaltschwelle',
|
|
178
|
+
en: 'Switching command on fall below the set threshold',
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
/** The names of the storm form's profiles (`PROFILES_MAP`): the expert view and "Sturmschwelle". */
|
|
182
|
+
export const STORM_PROFILE_NAMES = {
|
|
183
|
+
[STORM_EXPERT]: { de: 'Experte', en: 'Expert' },
|
|
184
|
+
[STORM_THRESHOLD]: { de: 'Sturmschwelle', en: 'Storm threshold' },
|
|
185
|
+
};
|
|
186
|
+
/** The Beaufort grades' names, 0-12. */
|
|
187
|
+
export const WIND_FORCE = [
|
|
188
|
+
{ de: 'Windstärke 0 - Windstille', en: 'Wind strength 0 - Calm' },
|
|
189
|
+
{ de: 'Windstärke 1 - leiser Zug', en: 'Wind strength 1 - Light air' },
|
|
190
|
+
{ de: 'Windstärke 2 - leichte Brise', en: 'Wind strength 2 - Light breeze' },
|
|
191
|
+
{ de: 'Windstärke 3 - schwache Brise', en: 'Wind strength 3 - Gentle breeze' },
|
|
192
|
+
{ de: 'Windstärke 4 - mäßige Brise', en: 'Wind strength 4 - Moderate breeze' },
|
|
193
|
+
{ de: 'Windstärke 5 - frischer Wind', en: 'Wind strength 5 - Fresh breeze' },
|
|
194
|
+
{ de: 'Windstärke 6 - starker Wind', en: 'Wind strength 6 - Strong breeze' },
|
|
195
|
+
{ de: 'Windstärke 7 - steifer Wind', en: 'Wind strength 7 - High wind, moderate gale, near gale' },
|
|
196
|
+
{ de: 'Windstärke 8 - stürmischer Wind', en: 'Wind strength 8 - Gale, fresh gale' },
|
|
197
|
+
{ de: 'Windstärke 9 - Sturm', en: 'Wind strength 9 - Strong gale' },
|
|
198
|
+
{ de: 'Windstärke 10 - schwerer Sturm', en: 'Wind strength 10 - Strom, whole gale' },
|
|
199
|
+
{ de: 'Windstärke 11 - orkanartiger Sturm', en: 'Wind strength 11 - Violent storm' },
|
|
200
|
+
{ de: 'Windstärke 12 - Orkan', en: 'Wind strength 12 - Hurricane force' },
|
|
201
|
+
];
|
|
202
|
+
/** What each grade looks like outside, 0-12. */
|
|
203
|
+
export const WIND_DESCRIPTION = [
|
|
204
|
+
{ de: 'Keine Luftbewegung, Rauch steigt senkrecht empor.', en: 'Calm, smoke rises vertically.' },
|
|
205
|
+
{
|
|
206
|
+
de: 'Kaum merklich, Rauch treibt leicht ab, Windflügel und Windfahnen unbewegt.',
|
|
207
|
+
en: 'Smoke drift indicates wind direction, still wind vanes.',
|
|
208
|
+
},
|
|
209
|
+
{ de: 'Blätter rascheln, Wind im Gesicht spürbar.', en: 'Leaves rustle, wind felt on face.' },
|
|
210
|
+
{
|
|
211
|
+
de: 'Blätter und dünne Zweige bewegen sich, Wimpel werden gestreckt.',
|
|
212
|
+
en: 'Leaves and small twigs constantly moving, light flags extended',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
de: 'Zweige bewegen sich, loses Papier wird vom Boden gehoben.',
|
|
216
|
+
en: 'Leaves and loose paper lifted, small tree branches move',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
de: 'Größere Zweige und Bäume bewegen sich, Wind deutlich hörbar.',
|
|
220
|
+
en: 'Larger tree branches and trees begin to sway, wind noticeable',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
de: 'Dicke Äste bewegen sich, hörbares Pfeifen an Drahtseilen und Telefonleitungen.',
|
|
224
|
+
en: 'Larger tree branches moving, whistling in wires',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
de: 'Bäume schwanken, Widerstand beim Gehen gegen den Wind.',
|
|
228
|
+
en: 'Whole trees moving, resistance felt walking against wind',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
de: 'Grosse Bäume werden bewegt, Zweige brechen von Bäumen, erhebliche Behinderung beim Gehen.',
|
|
232
|
+
en: 'Larger tress moving, twigs breaking off trees, generally impedes progress',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
de: 'Äste brechen, kleinere Schäden an Häusern, Ziegel werden von Dächern abgehoben, Gartenmöbel werden umgeworfen und verweht.',
|
|
236
|
+
en: 'Branches breaking off trees, slight damages on houses, slate blows off roofs',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
de: 'Bäume werden entwurzelt, Baumstämme brechen, grössere Schäden an Häusern.',
|
|
240
|
+
en: 'Trees broken or uprooted, considerable damages on houses',
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
de: 'Heftige Böen, schwere Sturmschäden, schwere Waldschäden, Dächer werden abgedeckt, Autos werden aus der Spur geworfen. Selten im Landesinneren.',
|
|
244
|
+
en: 'Extreme destruction, forests flattened, shingles are blown off of roofs, devastation, cars thrown. Seldom experienced on inland',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
de: 'Schwerste Sturmschäden und Verwüstungen. Selten im Landesinneren.',
|
|
248
|
+
en: 'Heavy storm damages and destructions. Seldom experienced on inland',
|
|
249
|
+
},
|
|
250
|
+
];
|
|
251
|
+
//# sourceMappingURL=senderForms.js.map
|