iobroker.anthbot-genie 0.0.6 → 0.0.8

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/README.md CHANGED
@@ -1,37 +1,155 @@
1
- # Anthbot Genie ioBroker Adapter
1
+ # ioBroker.anthbot-genie
2
2
 
3
- Local scaffold for an unofficial Anthbot Genie ioBroker adapter.
3
+ ![Logo](admin/anthbot-genie.png)
4
+
5
+ ![Test and Release](https://github.com/reloxx13/ioBroker.anthbot-genie/workflows/Test%20and%20Release/badge.svg)
6
+ ![Automerge Dependabot](https://github.com/reloxx13/ioBroker.anthbot-genie/workflows/Automerge%20Dependabot/badge.svg)
7
+ [![NPM version](https://img.shields.io/npm/v/iobroker.anthbot-genie.svg)](https://www.npmjs.com/package/iobroker.anthbot-genie)
8
+ [![Downloads](https://img.shields.io/npm/dm/iobroker.anthbot-genie.svg)](https://www.npmjs.com/package/iobroker.anthbot-genie)
9
+ ![GitHub release](https://img.shields.io/github/v/release/reloxx13/ioBroker.anthbot-genie)
10
+ ![License](https://img.shields.io/github/license/reloxx13/ioBroker.anthbot-genie)
11
+ ![ioBroker phase](https://img.shields.io/badge/ioBroker%20phase-testing-yellow)
12
+ [![ioBroker forum](https://img.shields.io/badge/ioBroker-forum-blue)](https://forum.iobroker.net/topic/84392/test-adapter-anthbot-genie-v0.0.x-npm-github)
4
13
 
5
- Current scope:
14
+ [![NPM](https://nodei.co/npm/iobroker.anthbot-genie.png?downloads=true)](https://nodei.co/npm/iobroker.anthbot-genie/)
6
15
 
7
- - Anthbot cloud login
8
- - device discovery
9
- - region and IoT endpoint lookup
10
- - polling of mower property and service shadows
11
- - writable control states for the main mower commands
12
- - zone metadata and zone-start commands
16
+ Unofficial ioBroker adapter for [Anthbot Genie robotic lawn mowers](https://de.anthbot.com/products/genie-mahroboter).
17
+
18
+ The adapter connects to the Anthbot cloud account, discovers bound mowers, reads cloud and IoT shadow data, and exposes status, settings, mower commands, zone data, and raw diagnostic payloads in ioBroker.
19
+
20
+ This adapter is currently in testing. Please report feedback and test results in the [ioBroker forum Test Adapter anthbot-genie v0.0.x npm/GitHub thread](https://forum.iobroker.net/topic/84392/test-adapter-anthbot-genie-v0.0.x-npm-github).
21
+
22
+ An example ioBroker Blockly with conditions for mower automation is available in the [Blockly automation example](https://forum.iobroker.net/topic/84392/test-adapter-anthbot-genie-v0.0.x-npm-github/2?_=1777117406598).
13
23
 
14
- Exposed per mower:
24
+ ## Features
25
+
26
+ - Anthbot cloud login with encrypted password storage in ioBroker native config
27
+ - Automatic discovery of mowers bound to the configured Anthbot account
28
+ - Region and IoT endpoint lookup per mower
29
+ - Polling of property and service shadows
30
+ - Status states for connection, online state, battery, mower status, charging state, mowing time, mowing area, rain handling, cutting height, and voice volume
31
+ - Writable control states for cutting height, voice volume, custom mowing direction, and rain settings
32
+ - Command states for full mowing, stop, return to dock, refresh, manual zone mowing, and automatic zone mowing
33
+ - Manual and automatic zone metadata as JSON states
34
+ - Raw property, service, and area payloads for troubleshooting
35
+
36
+ ## Requirements
37
+
38
+ - ioBroker with js-controller `>= 6.0.11`
39
+ - ioBroker admin `>= 7.6.20`
40
+ - Node.js `>= 20`
41
+ - Anthbot account with at least one bound Genie mower
42
+ - Internet access from the ioBroker host to the Anthbot cloud and AWS IoT endpoint
15
43
 
16
- - `info.*`
17
- - `metrics.*`
18
- - `controls.*`
19
- - `commands.*`
20
- - `zones.*`
21
- - `raw.*`
44
+ ## Configuration
22
45
 
23
- ## Manual zone mowing
46
+ Open the adapter instance configuration in ioBroker Admin and set:
47
+
48
+ | Setting | Description | Default |
49
+ | --- | --- | --- |
50
+ | Anthbot account username | Username or email address of the Anthbot account | empty |
51
+ | Anthbot account password | Anthbot account password, stored encrypted by ioBroker | empty |
52
+ | Area code | Phone or account area code, for example `49` for Germany | `49` |
53
+ | API host | Anthbot cloud API host | `api.anthbot.com` |
54
+ | Poll interval in seconds | Polling interval for mower data. The adapter enforces at least 10 seconds. | `30` |
55
+
56
+ After saving the configuration, start or restart the adapter instance.
57
+
58
+ ## States
59
+
60
+ The adapter creates one device tree per mower serial number:
61
+
62
+ ```text
63
+ anthbot-genie.<instance>.<serial>.*
64
+ ```
65
+
66
+ ### Info
67
+
68
+ | State | Type | Description |
69
+ | --- | --- | --- |
70
+ | `info.connection` | boolean | Global adapter cloud connection state |
71
+ | `<serial>.info.alias` | string | Mower alias from Anthbot |
72
+ | `<serial>.info.model` | string | Mower model/category |
73
+ | `<serial>.info.region` | string | Anthbot/AWS IoT region |
74
+ | `<serial>.info.endpoint` | string | IoT endpoint used for shadow access |
75
+ | `<serial>.info.online` | boolean | Online state reported by the mower |
76
+ | `<serial>.info.charging` | boolean | Whether the mower is currently charging |
77
+ | `<serial>.info.lastServiceCommand` | string | Last reported service command |
78
+ | `<serial>.info.lastPoll` | string | ISO timestamp of the last successful poll |
79
+
80
+ ### Metrics
81
+
82
+ | State | Type | Unit | Description |
83
+ | --- | --- | --- | --- |
84
+ | `<serial>.metrics.batteryLevel` | number | `%` | Battery level |
85
+ | `<serial>.metrics.mowerStatus` | string | | Normalized mower status |
86
+ | `<serial>.metrics.robotStatusRaw` | string | | Raw robot status |
87
+ | `<serial>.metrics.cuttingHeight` | number | `mm` | Current cutting height |
88
+ | `<serial>.metrics.voiceVolume` | number | `%` | Current voice volume |
89
+ | `<serial>.metrics.mowingTime` | number | `s` | Reported mowing time |
90
+ | `<serial>.metrics.mowingArea` | number | `m2` | Reported mowing area |
91
+ | `<serial>.metrics.customMowingDirection` | number | `deg` | Custom mowing direction |
92
+ | `<serial>.metrics.customMowingDirectionEnabled` | boolean | | Custom mowing direction enabled |
93
+ | `<serial>.metrics.rainPerceptionEnabled` | boolean | | Rain perception enabled |
94
+ | `<serial>.metrics.rainContinueTime` | number | `s` | Delay before continuing after rain |
95
+
96
+ ### Controls
97
+
98
+ Writable control states update mower settings through the Anthbot IoT service shadow.
99
+
100
+ | State | Type | Range | Description |
101
+ | --- | --- | --- | --- |
102
+ | `<serial>.controls.mowHeight` | number | `30..70 mm`, 5 mm steps | Set cutting height |
103
+ | `<serial>.controls.voiceVolume` | number | `0..100 %` | Set voice volume |
104
+ | `<serial>.controls.customMowingDirection` | number | `0..180 deg` | Set custom mowing direction |
105
+ | `<serial>.controls.customMowingDirectionEnabled` | boolean | `true`/`false` | Enable or disable custom mowing direction |
106
+ | `<serial>.controls.rainPerceptionEnabled` | boolean | `true`/`false` | Enable or disable rain perception |
107
+ | `<serial>.controls.rainContinueTimeHours` | number | `0..8 h` | Set rain continue time in hours |
108
+
109
+ ### Commands
110
+
111
+ Command states are writable. Button states are reset to `false` after execution. Zone command states are reset to an empty string after execution.
112
+
113
+ | State | Type | Description |
114
+ | --- | --- | --- |
115
+ | `<serial>.commands.startFullMow` | boolean | Start full mowing |
116
+ | `<serial>.commands.stopMow` | boolean | Stop all mower tasks |
117
+ | `<serial>.commands.returnToDock` | boolean | Return to the charging dock |
118
+ | `<serial>.commands.requestRefresh` | boolean | Request all mower properties and refresh states |
119
+ | `<serial>.commands.zoneMow` | string | Start mowing one or more manual zones |
120
+ | `<serial>.commands.autoZoneMow` | string | Start mowing one or more automatic zones |
121
+
122
+ ### Zones
123
+
124
+ | State | Type | Description |
125
+ | --- | --- | --- |
126
+ | `<serial>.zones.manual` | JSON string | Known manual/custom zones |
127
+ | `<serial>.zones.auto` | JSON string | Known automatic/region zones |
128
+ | `<serial>.zones.activeManualIds` | JSON string | Currently active manual zone IDs |
129
+
130
+ ### Raw data
131
+
132
+ | State | Type | Description |
133
+ | --- | --- | --- |
134
+ | `<serial>.raw.property` | JSON string | Raw property shadow payload |
135
+ | `<serial>.raw.service` | JSON string | Raw service shadow payload |
136
+ | `<serial>.raw.areaDefinition` | JSON string | Raw area definition payload |
137
+
138
+ ## Zone Mowing
24
139
 
25
140
  The adapter exposes the mower's manual/custom zones in:
26
141
 
27
- - `<instance>.<serial>.zones.manual`
142
+ ```text
143
+ <instance>.<serial>.zones.manual
144
+ ```
28
145
 
29
- This state contains a JSON array with the known manual zones. Use the `id` or
30
- the exact `name` from that list to start mowing.
146
+ This state contains a JSON array with known zones. Use the `id` or the exact `name` from that list to start mowing.
31
147
 
32
148
  Write the selection to:
33
149
 
34
- - `<instance>.<serial>.commands.zoneMow`
150
+ ```text
151
+ <instance>.<serial>.commands.zoneMow
152
+ ```
35
153
 
36
154
  Accepted values:
37
155
 
@@ -40,18 +158,65 @@ Accepted values:
40
158
  - multiple zones as comma-separated IDs or names: `3,5,Back yard`
41
159
  - multiple zones as a JSON array: `[3,5,"Back yard"]`
42
160
 
43
- After a valid write, the adapter sends `custom_area_mow_start` with the matched
44
- manual zone IDs and clears `commands.zoneMow` again.
161
+ After a valid write, the adapter sends `custom_area_mow_start` with the matched manual zone IDs and clears `commands.zoneMow` again.
162
+
163
+ Automatic zones work similarly through:
164
+
165
+ ```text
166
+ <instance>.<serial>.zones.auto
167
+ <instance>.<serial>.commands.autoZoneMow
168
+ ```
169
+
170
+ For automatic zones, the adapter resolves the selected zone IDs or names to the zone coordinates and sends `region_mow_start`.
171
+
172
+ ## Troubleshooting
173
+
174
+ ### Adapter does not connect
175
+
176
+ - Check username, password, and area code.
177
+ - Confirm that the mower is visible in the Anthbot app with the same account.
178
+ - Increase the adapter log level to `debug` and restart the instance.
179
+ - Check `anthbot-genie.<instance>.info.connection`.
180
+
181
+ ### No mower objects are created
45
182
 
46
- Notes:
183
+ - The Anthbot account must have at least one bound mower.
184
+ - Check the adapter log for `No Anthbot devices found for this account`.
185
+ - Verify that the ioBroker host has internet access.
47
186
 
48
- - this is based on the public Home Assistant integration logic from `vincentjanv/anthbot_genie_ha`
49
- - this project is unofficial and not affiliated with or endorsed by Anthbot; see `NOTICE.md`
50
- - it is a local first version, not a published ioBroker adapter yet
51
- - the password is stored in encrypted native config
187
+ ### Commands do not work
188
+
189
+ - Check whether status polling works first.
190
+ - Verify that the target state is under the correct mower serial number.
191
+ - For zone commands, compare the written value with the IDs and names in `zones.manual` or `zones.auto`.
192
+ - Check `raw.service` and the adapter log for command errors.
193
+
194
+ ## Legal Notice
195
+
196
+ This project is unofficial and is not affiliated with, endorsed by, sponsored by, or approved by Anthbot.
197
+
198
+ Anthbot and Genie names, marks, and logos belong to their respective owners. See [NOTICE.md](NOTICE.md) for details.
199
+
200
+ ## Credits
201
+
202
+ Special credit to the Home Assistant Anthbot Genie project, which made the Anthbot cloud flow and command mapping much easier to understand:
203
+
204
+ - `vincentjanv/anthbot_genie_ha`
205
+ - <https://github.com/vincentjanv/anthbot_genie_ha>
206
+
207
+ This ioBroker adapter is an independent project, but it builds on public API research and implementation ideas from that Home Assistant integration.
52
208
 
53
209
  ## Changelog
54
210
 
211
+ ### 0.0.8
212
+
213
+ - Add consumable channels and values ​​to the adapter definition.
214
+
215
+ ### 0.0.7
216
+
217
+ - Add Dependabot automerge configuration.
218
+ - Update repository metadata for ioBroker checks.
219
+
55
220
  ### 0.0.6
56
221
 
57
222
  - Fix ioBroker repository checker issues.
@@ -77,18 +242,10 @@ Notes:
77
242
 
78
243
  - Initial local adapter scaffold for Anthbot Genie.
79
244
 
80
- ## Credits
81
-
82
- Special credit to the Home Assistant Anthbot Genie project that made the
83
- cloud flow and command mapping much easier to understand:
84
-
85
- - `vincentjanv/anthbot_genie_ha`
86
- - https://github.com/vincentjanv/anthbot_genie_ha
245
+ ## License
87
246
 
88
- This ioBroker adapter scaffold is an independent local project, but it
89
- directly builds on the public API research and implementation approach from
90
- that Home Assistant integration.
247
+ MIT License
91
248
 
92
- ## License
249
+ Copyright (c) 2026 reloxx13
93
250
 
94
- MIT License. See [LICENSE](LICENSE) for details.
251
+ See [LICENSE](LICENSE) for details.
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "anthbot-genie",
4
- "version": "0.0.6",
4
+ "version": "0.0.8",
5
5
  "news": {
6
+ "0.0.8":{
7
+ "en": "Add consumable channels and values to the adapter definition.",
8
+ "de": "Verbrauchskanäle und Werte zur Adapterdefinition hinzugefügt.",
9
+ "ru": "Добавлены каналы потребляемых материалов и значения в определение адаптера.",
10
+ "pt": "Adicionar canais de consumíveis e valores à definição do adaptador.",
11
+ "nl": "Consumable-kanalen en waarden toegevoegd aan de adapterdefinitie.",
12
+ "fr": "Ajouter des canaux de consommables et des valeurs à la définition de l'adaptateur.",
13
+ "it": "Aggiungi canali di consumo e valori alla definizione dell'adattatore.",
14
+ "es": "Agregar canales de consumibles y valores a la definición del adaptador.",
15
+ "pl": "Dodaj kanały materiałów eksploatacyjnych i wartości do definicji adaptera.",
16
+ "uk": "Додайте канали расходных материалов и значения в определение адаптера.",
17
+ "zh-cn": "将消耗品通道和值添加到适配器定义中。"
18
+ },
19
+ "0.0.7": {
20
+ "en": "Add Dependabot automerge configuration and update repository metadata.",
21
+ "de": "Dependabot-Automerge-Konfiguration hinzugefügt und Repository-Metadaten aktualisiert.",
22
+ "ru": "Добавлена конфигурация автоматического слияния Dependabot и обновлены метаданные репозитория.",
23
+ "pt": "Adicionada configuração de automerge do Dependabot e atualizados os metadados do repositório.",
24
+ "nl": "Dependabot-automergeconfiguratie toegevoegd en repositorymetadata bijgewerkt.",
25
+ "fr": "Ajout de la configuration d'automerge Dependabot et mise à jour des métadonnées du dépôt.",
26
+ "it": "Aggiunta la configurazione di automerge di Dependabot e aggiornati i metadati del repository.",
27
+ "es": "Se añadió la configuración de automerge de Dependabot y se actualizaron los metadatos del repositorio.",
28
+ "pl": "Dodano konfigurację automatycznego scalania Dependabot i zaktualizowano metadane repozytorium.",
29
+ "uk": "Додано конфігурацію автоматичного злиття Dependabot і оновлено метадані репозиторію.",
30
+ "zh-cn": "添加 Dependabot 自动合并配置并更新仓库元数据。"
31
+ },
6
32
  "0.0.6": {
7
33
  "en": "Fix repository checker issues and move admin config translations to i18n files.",
8
34
  "de": "Probleme der Repository-Prüfung behoben und Admin-Konfigurationsübersetzungen in i18n-Dateien verschoben.",
@@ -57,7 +83,7 @@
57
83
  "zh-cn": "用于控制 Anthbot Genie 割草机并轮询状态的非官方云适配器"
58
84
  },
59
85
  "authors": [
60
- "Nils"
86
+ "reloxx13"
61
87
  ],
62
88
  "licenseInformation": {
63
89
  "license": "MIT",
package/main.js CHANGED
@@ -228,6 +228,7 @@ class AnthbotGenieAdapter extends utils.Adapter {
228
228
  const definitions = [
229
229
  ["info", "channel", t("Info", "Informationen"), null],
230
230
  ["metrics", "channel", t("Metrics", "Messwerte"), null],
231
+ ["consumable", "channel", t("Consumable", "Verbrauchsmaterial"), null],
231
232
  ["controls", "channel", t("Controls", "Steuerung"), null],
232
233
  ["commands", "channel", t("Commands", "Befehle"), null],
233
234
  ["zones", "channel", t("Zones", "Zonen"), null],
@@ -251,6 +252,9 @@ class AnthbotGenieAdapter extends utils.Adapter {
251
252
  "info.charging": { type: "boolean", role: "indicator.working", read: true, write: false, name: t("Charging", "Lädt") },
252
253
  "info.lastServiceCommand": { type: "string", role: "text", read: true, write: false, name: t("Last service command", "Letzter Servicebefehl") },
253
254
  "info.lastPoll": { type: "string", role: "date", read: true, write: false, name: t("Last poll", "Letzte Abfrage") },
255
+ "consumable.station": { type: "number", role: "value.usage.station", unit: "%", read: true, write: false, name: t("Station lifetime", "Station Lebensdauer") },
256
+ "consumable.cameras": { type: "number", role: "value.usage.cameras", unit: "%", read: true, write: false, name: t("Cameras lifetime", "Kameras Lebensdauer") },
257
+ "consumable.blades": { type: "number", role: "value.usage.blades", unit: "%", read: true, write: false, name: t("Blades lifetime", "Klingen Lebensdauer") },
254
258
  "metrics.batteryLevel": { type: "number", role: "value.battery", unit: "%", read: true, write: false, name: t("Battery level", "Akkustand") },
255
259
  "metrics.mowerStatus": { type: "string", role: "value", read: true, write: false, name: t("Mower status", "Mäherstatus") },
256
260
  "metrics.robotStatusRaw": { type: "string", role: "text", read: true, write: false, name: t("Raw robot status", "Rohstatus des Roboters") },
@@ -353,6 +357,12 @@ class AnthbotGenieAdapter extends utils.Adapter {
353
357
  "info.charging": isCharging(data),
354
358
  "info.lastServiceCommand": serviceCommand,
355
359
  "info.lastPoll": new Date().toISOString(),
360
+
361
+ // 2026-04-26: The cloud API misspells "percent" as "pecent" in the robot_maintenance object, so we need to use the wrong spelling here to get the data until it's fixed upstream.
362
+ "consumable.station": typeof data.robot_maintenance?.ccp_pecent === "number" ? data.robot_maintenance.ccp_pecent : null,
363
+ "consumable.cameras": typeof data.robot_maintenance?.cl_pecent === "number" ? data.robot_maintenance.cl_pecent : null,
364
+ "consumable.blades": typeof data.robot_maintenance?.rc_pecent === "number" ? data.robot_maintenance.rc_pecent : null,
365
+
356
366
  "metrics.batteryLevel": typeof data.elec === "number" ? data.elec : null,
357
367
  "metrics.mowerStatus": generalMowerStatus(data),
358
368
  "metrics.robotStatusRaw": rawRobotStatus(data) || "",
@@ -364,15 +374,18 @@ class AnthbotGenieAdapter extends utils.Adapter {
364
374
  "metrics.customMowingDirectionEnabled": isCustomDirectionEnabled(data),
365
375
  "metrics.rainPerceptionEnabled": rainPerceptionEnabled,
366
376
  "metrics.rainContinueTime": rainContinueTime,
377
+
367
378
  "controls.mowHeight": cutterHeight,
368
379
  "controls.voiceVolume": typeof data.volume === "number" ? data.volume : null,
369
380
  "controls.customMowingDirection": customDirection,
370
381
  "controls.customMowingDirectionEnabled": isCustomDirectionEnabled(data),
371
382
  "controls.rainPerceptionEnabled": rainPerceptionEnabled,
372
383
  "controls.rainContinueTimeHours": typeof rainContinueTime === "number" ? Math.round(rainContinueTime / 3600) : null,
384
+
373
385
  "zones.manual": JSON.stringify(compactZonePayload(manualZoneList)),
374
386
  "zones.auto": JSON.stringify(compactZonePayload(autoZoneList)),
375
387
  "zones.activeManualIds": JSON.stringify(activeManualZoneIds(data)),
388
+
376
389
  "raw.property": JSON.stringify(context.lastReported || {}),
377
390
  "raw.service": JSON.stringify(context.lastService || {}),
378
391
  "raw.areaDefinition": JSON.stringify(context.areaDefinition || {}),
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "iobroker.anthbot-genie",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Unofficial ioBroker adapter for Anthbot Genie mowers",
5
- "author": "Nils",
5
+ "author": "reloxx13",
6
6
  "license": "MIT",
7
7
  "main": "main.js",
8
8
  "homepage": "https://github.com/reloxx13/ioBroker.anthbot-genie",