Skip to content

Commit e509c23

Browse files
committed
add vision multiZones
1 parent cfb55df commit e509c23

File tree

8 files changed

+89
-100
lines changed

8 files changed

+89
-100
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ The adapter can control the mower and you can change config params like mowtimes
5151
- (Lucky-ESA) Added Vision cut over slabs
5252
- (Lucky-ESA) Node 18 required
5353
- (Lucky-ESA) Catch aws_cer error and use old mqtt connection
54-
- (Lucky-ESA) Added rain wait countdown
5554
- (Lucky-ESA) Added Vision Multi Zone
5655

5756
### 2.3.4 (2023-10-19)

docs/de/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@
303303
- `multiZone.passages.passage_01.tagIdTo`: RFID id von z2 - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
304304
- `multiZone.passages.passage_01.zoneIdFrom`: Zone von (muss z1 < z2) - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
305305
- `multiZone.passages.passage_01.zoneIdTo`: Zone zu (muss z2 > z1) - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
306-
- `multiZone.zones.zone_1.borderDistance`: Kantenschnitt in mm - erlaubt 10mm, 15mm und 20mm - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
306+
- `multiZone.zones.zone_1.borderDistance`: Kantenschnitt in mm - erlaubt 50mm, 100mm, 150mm und 20mm - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
307307
- `multiZone.zones.zone_1.chargingStation`: 1 Wenn sich die Ladestation in diese Zone gefindet. 0 für keine Ladestation - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
308308
- `multiZone.zones.zone_1.cutOverBorder`: 1 zum Überfahren von Platten, wenn diese erkannt werden, ansonsten 0.Unterschiedliche Werte pro Zone sind nicht zulässig - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
309-
- `multiZone.zones.zone_1.zone_id`: Nummerierung - Start mit 1 - Mit Blockly ohne Verzögerung setzen - Änderung wird in `multiZone.multiZone` geschrieben (Vision/änderbar)
310-
- `multiZone.rfid`: Anzahl Zonen (nur lesen)
309+
- `multiZone.zones.zone_1.zone_id`: Nummerierung - Start mit 1 - geschrieben (Vision/nur lesen)
310+
- `multiZone.rfid`: Anzahl RF (nur lesen)
311311
- `multiZone.multiZone`: Multizone JSON (Vision/änderbar) [Beispiel](#beispiel-blockly-startsequence-vision)
312312
- `multiZone.sendMultiZoneJson`: Änderungen an Worx senden mit mit einer Verzögerung von 1,1 Sekunden (Vision/änderbar)
313313

docs/de/img/areas_vision.png

9.04 KB
Loading

docs/en/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@
303303
- `multiZone.passages.passage_01.tagIdTo`: RFID id of z2 - Set with Blockly without delay - Change is written to `multiZone.multiZone` (vision/changeable)
304304
- `multiZone.passages.passage_01.zoneIdFrom`: Zone from (must z1 < z2) - Set with Blockly without delay - Change is written to `multiZone.multiZone` (vision/changeable)
305305
- `multiZone.passages.passage_01.zoneIdTo`: Zone closed (must z2 > z1) - Set with Blockly without delay - Change is written to `multiZone.multiZone` (vision/changeable)
306-
- `multiZone.zones.zone_1.borderDistance`: Edge cut in mm - allowed 10mm, 15mm and 20mm - Set with Blockly without delay - Change is written in `multiZone.multiZone` (vision/changeable)
306+
- `multiZone.zones.zone_1.borderDistance`: Edge cut in mm - allowed 50mm, 100mm, 150mm and 20mm - Set with Blockly without delay - Change is written in `multiZone.multiZone` (vision/changeable)
307307
- `multiZone.zones.zone_1.chargingStation`: 1 If the charging station is found in this zone. 0 for no charging station - Set with Blockly without delay - Change is written to `multiZone.multiZone` (vision/changeable)
308308
- `multiZone.zones.zone_1.cutOverBorder`: 1 to drive over plates if they are detected, otherwise 0. Different values ​​per zone are not permitted - Set with Blockly without delay - Change is written to `multiZone.multiZone` (Vision /changeable)
309-
- `multiZone.zones.zone_1.zone_id`: Numbering - Start with 1 - Set with Blockly without delay - Change is written to `multiZone.multiZone` (vision/changeable)
310-
- `multiZone.rfid`: Total Areas (readonly)
309+
- `multiZone.zones.zone_1.zone_id`: Numbering - Start with 1 - (vision/readonly)
310+
- `multiZone.rfid`: Total RF (readonly)
311311
- `multiZone.multiZone`: Multizone JSON (Vision/changeable) [Example](#example-blockly-startsequence-vision)
312312
- `multiZone.sendMultiZoneJson`: Send changes to Worx with a delay of 1.1 seconds (vision/changeable)
313313

docs/en/img/areas_vision.png

-148 Bytes
Loading

lib/helper.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,10 @@ module.exports = {
405405
await this.createDataPoint(`${mower.serial_number}.${o._id}`, o.common, o.type, o.native);
406406
}
407407
for (const o of objects.zones_channel) {
408-
await this.createDataPoint(`${mower.serial_number}.multiZone.${o._id}`, o.common, o.type, o.native);
408+
await this.createDataPoint(`${mower.serial_number}.multiZonen.${o._id}`, o.common, o.type, o.native);
409409
}
410410
for (const o of objects.passage_channel) {
411-
await this.createDataPoint(`${mower.serial_number}.multiZone.${o._id}`, o.common, o.type, o.native);
411+
await this.createDataPoint(`${mower.serial_number}.multiZonen.${o._id}`, o.common, o.type, o.native);
412412
}
413413
await this.evaluateVisionMultiZone(mower, true);
414414
states_cmd = {
@@ -439,7 +439,7 @@ module.exports = {
439439
def: 0,
440440
desc: `Mowing zone detection`,
441441
};
442-
await this.createDataPoint(`${mower.serial_number}.multiZone.rfid`, common, "state");
442+
await this.createDataPoint(`${mower.serial_number}.multiZonen.rfid`, common, "state");
443443
common = {
444444
name: {
445445
en: "Add new mowing time",
@@ -551,7 +551,7 @@ module.exports = {
551551
read: true,
552552
write: true,
553553
};
554-
await this.createDataPoint(`${mower.serial_number}.multiZone.multiZone`, common, "state");
554+
await this.createDataPoint(`${mower.serial_number}.multiZonen.multiZonen`, common, "state");
555555
common = {
556556
type: "boolean",
557557
role: "button",
@@ -573,7 +573,7 @@ module.exports = {
573573
write: true,
574574
def: false,
575575
};
576-
await this.createDataPoint(`${mower.serial_number}.multiZone.sendMultiZoneJson`, common, "state");
576+
await this.createDataPoint(`${mower.serial_number}.multiZonen.sendmultiZonenJson`, common, "state");
577577
} else {
578578
common = {
579579
name: {
@@ -1778,7 +1778,7 @@ module.exports = {
17781778
data.cfg.sc.slots = await this.evaluateVisionCalendar(mower, data.cfg.sc.slots);
17791779
}
17801780
if (data.dat && data.dat.rfid) {
1781-
await this.setStateAsync(`${mower.serial_number}.multiZone.rfid`, {
1781+
await this.setStateAsync(`${mower.serial_number}.multiZonen.rfid`, {
17821782
val: data.dat.rfid.status,
17831783
ack: true,
17841784
});
@@ -1839,7 +1839,7 @@ module.exports = {
18391839
});
18401840
}
18411841
if (data.cfg.mz != null) {
1842-
await this.setStateAsync(`${mower.serial_number}.multiZone.multiZone`, {
1842+
await this.setStateAsync(`${mower.serial_number}.multiZonen.multiZonen`, {
18431843
val: JSON.stringify(data.cfg.mz),
18441844
ack: true,
18451845
});

lib/objects.js

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
module.exports = {
22
multiZones: [
33
{
4-
_id: "multiZone",
4+
_id: "multiZonen",
55
type: "channel",
66
common: {
77
name: {
8-
en: "Multizone",
9-
de: "Multizone",
10-
ru: "Мультизон",
11-
pt: "Multizona",
12-
nl: "Multizone",
8+
en: "Multizonen",
9+
de: "Multizonen",
10+
ru: "Multizonen",
11+
pt: "Multizonas",
12+
nl: "Multizonen",
1313
fr: "Multizone",
14-
it: "Multizona",
15-
es: "Multizona",
16-
pl: "Multizon",
17-
uk: "Мультизон",
14+
it: "Multizonen",
15+
es: "Multizonen",
16+
pl: "Multizonen",
17+
uk: "Мультизонні",
1818
"zh-cn": "多区",
1919
},
2020
},
@@ -86,17 +86,9 @@ module.exports = {
8686
type: "number",
8787
role: "value",
8888
read: true,
89-
write: true,
90-
min: 1,
91-
max: 4,
89+
write: false,
9290
def: 1,
9391
desc: "Zonen ID",
94-
states: {
95-
1: "Zone 1",
96-
2: "Zone 2",
97-
3: "Zone 3",
98-
4: "Zone 4",
99-
},
10092
},
10193
native: {},
10294
},
@@ -153,11 +145,17 @@ module.exports = {
153145
role: "value",
154146
read: true,
155147
write: true,
156-
min: 5,
157-
max: 600,
148+
min: 50,
149+
max: 200,
158150
unit: "mm",
159151
def: 50,
160152
desc: "Border Distance in mm",
153+
states: {
154+
50: "50 mm",
155+
100: "100 mm",
156+
150: "150 mm",
157+
200: "200 mm",
158+
},
161159
},
162160
native: {},
163161
},
@@ -260,16 +258,8 @@ module.exports = {
260258
role: "value",
261259
read: true,
262260
write: true,
263-
min: 1,
264-
max: 4,
265-
def: 0,
261+
def: 1,
266262
desc: "The mower cut border today",
267-
states: {
268-
1: "Zone 1",
269-
2: "Zone 2",
270-
3: "Zone 3",
271-
4: "Zone 4",
272-
},
273263
},
274264
native: {},
275265
},
@@ -294,16 +284,8 @@ module.exports = {
294284
role: "value",
295285
read: true,
296286
write: true,
297-
min: 1,
298-
max: 4,
299-
def: 0,
287+
def: 2,
300288
desc: "Zone Id to",
301-
states: {
302-
1: "Zone 1",
303-
2: "Zone 2",
304-
3: "Zone 3",
305-
4: "Zone 4",
306-
},
307289
},
308290
native: {},
309291
},

0 commit comments

Comments
 (0)