So wie ich das sehe, müsste an der Dokumentation noch einiges nachgezogen werden, beispielsweise in der plugin.yaml die erlaubten Schlüsselwörte bei "husky_state".
Vielleicht passiert das ja noch nach und nach oder jemand bereitet einen PR dazu vor.
Ich würde in der Zwischenzeit mir die struct "basic" mal ansehen die enthalten ist ob die vielleicht out of the box funktioniert.
X
-
Deshalb gibt es hier im SmartHomeNG Forum diesen Thread, der oben angepinnt istZitat von manhartm Beitrag anzeigenHabe mich leider nicht mehr an den Trick zum Einfügen von solchen Daten in diesem Forum erinnert.
Einen Kommentar schreiben:
-
Habe mich leider nicht mehr an den Trick zum Einfügen von solchen Daten in diesem Forum erinnert. Hier nochmals:
Code:husky_plugin: mower: name: Maehroboter info: name: Mower information (not implemented yet) device: husky_info: NAME type: str visu_acl: ro model: husky_info: MODEL type: str visu_acl: ro id: husky_info: ID type: str visu_acl: ro state: name: State information activity: husky_state: activity type: str visu_acl: ro message: husky_state: message type: str visu_acl: ro color: name: Color for the message, e.g 38761D husky_state: color type: str visu_acl: ro batterypercent: name: Battery Level 0..100 husky_state: batterypercent type: num visu_acl: ro battery255: name: Battery Level 0..255 type: num visu_acl: ro eval: int(value * 255 / 100) eval_trigger: ..batterypercent control: name: Steuerbefehle start: name: Start husky_control: START type: bool visu_acl: rw enforce_updates: True start_3h: name: Start (Override 3h) husky_control: START_3H type: bool visu_acl: rw enforce_updates: True stop: name: Stop husky_control: STOP type: bool visu_acl: rw enforce_updates: True park: name: Park husky_control: PARK type: bool visu_acl: rw enforce_updates: True park: name: Park until next Timer husky_control: PARK_TIMER type: bool visu_acl: rw enforce_updates: True
Einen Kommentar schreiben:
-
In den Item Definitionen, die Du gepostet hast, stimmen zumindest die Einrückungen nicht.
Einen Kommentar schreiben:
-
Ich installiere gerade smarthomeNG neu auf einem Raspberry Pi 4 und möchte auch das Husky2 Plugin mit unserem 435X nutzen. Ich kopierte die Datei items.yaml mit neuem Dateinamen in mein items-Verzeichnis und bekam beim Start diese Fehlermeldungen:
In dieser Datei items.yaml findet sich diese Konfiguration (Beispiel):Code:2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.info.device', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.info.model', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.info.id', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.state.activity', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.state.message', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.state.color', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 ERROR plugins.husky2 value 'color' invalid, use one of ['message', 'state', 'activity', 'mode', 'errormessage', 'batterypercent', 'connection', 'longitude', 'latitude'] 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.state.batterypercent', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 WARNING lib.metadata Item 'husky_plugin.mower.state.battery255', attribute 'visu_acl': Invalid value 'r' for attribute 'visu_acl' -> using 'rw' instead (defined in am.yaml) 2022-05-28 08:07:23 ERROR plugins.husky2 command 'start' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight'] 2022-05-28 08:07:23 ERROR plugins.husky2 command 'start_3h' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight'] 2022-05-28 08:07:23 ERROR plugins.husky2 command 'stop' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight']
Die Anweisung "visu_acl:r" ist nicht korrekt und müsste "visu_acl:ro" lauten. Damit reduzieren sich die Fehlermeldungen auf:Code:husky_plugin: mower: name: Maehroboter info: name: Mower information (not implemented yet) device: husky_info: NAME type: str visu_acl: r
Hier komme ich nun nicht mehr weiter. Die Items sehen wie folgt aus (1:1 übernommen aus items.yaml aus dem Plugin-Verzeichnis):Code:2022-05-28 08:15:25 ERROR plugins.husky2 value 'color' invalid, use one of ['message', 'state', 'activity', 'mode', 'errormessage', 'batterypercent', 'connection', 'longitude', 'latitude'] 2022-05-28 08:15:25 ERROR plugins.husky2 command 'start' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight'] 2022-05-28 08:15:25 ERROR plugins.husky2 command 'start_3h' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight'] 2022-05-28 08:15:25 ERROR plugins.husky2 command 'stop' invalid, use one of ['starttime', 'park', 'park_timer', 'starttime', 'pause', 'parkpermanent', 'parktime', 'parknext', 'resume', 'cuttingheight', 'headlight']
Wie müssen hier genau die Eingaben angepasst werden ?Code:husky_plugin: mower: state: color: name: Color for the message, e.g 38761D husky_state: color type: str visu_acl: ro control: start: name: Start husky_control: START type: bool visu_acl: rw enforce_updates: True start_3h: name: Start (Override 3h) husky_control: START_3H type: bool visu_acl: rw enforce_updates: True stop: name: Stop husky_control: STOP type: bool visu_acl: rw enforce_updates: True
Ich bin sowohl bei smarthomeNG wie auch bei den Plugins auf "develop".
Einen Kommentar schreiben:
-
Hallo Matthias.
Falls du dem Key in der Cloud
die "Authentication API" zugewiesen hast und es dennoch nicht funktioniert, wird es ein Fehler im Code sein. Kannst du das bitte nochmal prüfen und mir bestätigen, dass die Zuweisung soweit passt?
Ps.
Scaramangas ich hab dich nicht vergessen. Ich habs nur zeitlich noch nicht geschaft das zubeheben. Sorry dafür.
Bin grade sehr beschäftigt. Ich schaue mir beide Probleme nächste Woche genauer an.
Lg
Einen Kommentar schreiben:
-
Hallo,
vielen Dank führ Eure Mühe. Wollte ich doch gleich mal testen und bei mir einbinden.
Habe nach meiner Einschätzung alles nach Anleitung durchgeführt.
In der Husqvarna-Cloud angezeigte Link zum Test des Token funktioniert auch.
Dennoch erhalte ich im Log folgende Fehlermeldung. Was könnte noch falsch sein?
2022-05-24 13:17:49 ERROR lib.plugin Plugin 'husky2' exception in run() method: module 'aioautomower' has no attribute 'AutomowerSession'
> Traceback (most recent call last):
> File "/usr/local/smarthome/lib/plugin.py", line 676, in run
> self.plugin.run()
> File "/usr/local/smarthome/plugins/husky2/__init__.py", line 260, in run
> asyncio.run(self.worker())
> File "/usr/local/lib/python3.8/asyncio/runners.py", line 43, in run
> return loop.run_until_complete(main)
> File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
> return future.result()
> File "/usr/local/smarthome/plugins/husky2/__init__.py", line 490, in worker
> self.apiSession = aioautomower.AutomowerSession(self.apikey, token=None)
> AttributeError: module 'aioautomower' has no attribute 'AutomowerSession'
Gruß Matthias
Einen Kommentar schreiben:
-
Hallo,
zwei Sachen sind mir noch aufgefallen:
Das Item "husky.state.inoperation" wird bei mir nicht aktualisiert.Code:WARNING lib.item.item Item husky.info.serial: value "170710538" does not match type str. Via husky2 None
Grüße Tom
Einen Kommentar schreiben:
-
Halllo,
wenn du unter https://developer.husqvarnagroup.cloud/apps deine zuvor erstellte Applikation beim Buntstift bearbeitest, siehst du im Bearbeitungsfenster ganz unten den Abschnitt Connected APIs. Dort musst du mit +Connect new API die "Authentication API" und die "Automower Connect API" deinem Key zuweisen. Ohne diese Zuweisung hat der API-Key quasi keine Funktion.
LG
Einen Kommentar schreiben:
-
Moin moin,
ich wollte gerade das neue Plugin testen. Was ist mit: "Nicht vergessen der Applikation dann noch die "Authentication API"und die "Automower Connect API" zu zuweisen." gemeint?
Gruß Manuel
Einen Kommentar schreiben:
-
Support Thread für das Husky2 Plugin
Dieser Thread dient als Supportforum für von mir aufgesetzte Husky2 Plugin.
Alle Anregungen und Mängel gerne hier rein schreiben. Weiters ist die Anwenderdokumentation später unter https://www.smarthomeng.de/user/plug.../user_doc.html verfügbar.
Ab SHNG 1.9.2 ist das Plugin im Master verfügbar.
Wer sich das ganze vorab schon mal anschauen möchte oder mich beim testen unterstützen möchte, kann inzwischen gerne meinen Fork ( https://github.com/gruberth/plugins/tree/master/husky2 ) benutzen.
Beste Grüße


Einen Kommentar schreiben: