Ankündigung

Einklappen
Keine Ankündigung bisher.

Unterstützung bei der Entwicklung eines Landroid-Plugin

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Hi SMarcus ,

    da hat mir meine Eclipse-IDE wieder einmal einen Streich gespielt. Die ergänzt hin und wieder bei den Imports automatisch irgendwelchen Blödsinn.

    Lösche in der __init__.py die Zeilen 34+35 dann sollte alles gut sein.

    Gruss Andre

    Kommentar


      #17
      Hi Andre,

      in dem Fall kommt eine Fehlermeldung etwas später:

      Code:
      2022-01-20 13:25:30 ERROR lib.plugin Plugin 'landroid' exception in run() method: object bool can't be used in 'await' expression
      > Traceback (most recent call last):
      > File "/usr/local/smarthome/lib/plugin.py", line 675, in run
      > self.plugin.run()
      > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 119, in run
      > self.worx_init()
      > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 212, in worx_init
      > asyncio.get_event_loop().run_until_complete(self.l ogon())
      > File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
      > return future.result()
      > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 226, in logon
      > self.auth = await self.worx.initialize(self.user,self.pwd)
      > TypeError: object bool can't be used in 'await' expression

      Gruß
      Marcus

      Kommentar


        #18
        Hi SMarcus ,

        bist Du sicher das du

        Code:
        from _operator import or_
        from builtins import True
        gelöscht hast und nicht

        Code:
        import asyncio
        das sollte bleiben.
        Ansonsten muss ich mir das heute Abend nochmal anschauen.

        Gruss Andre

        Kommentar


          #19
          Jupp, ganz sicher....

          Code:
          from lib.model.smartplugin import *
          from lib.item import Items
          
          from .webif import WebInterface
          import sys
          
          # from _operator import or_
          # from builtins import True
          
          
          import asyncio
          import pyworxcloud
          import time
          Gruß,
          Marcus

          Kommentar


            #20
            Am Sonntag kann ich Mal die funktionierende init posten.

            Kommentar


              #21
              Hallo,

              henfri

              nach einigem hin und her überlegen denke ich das Problem gefunden zu haben.
              Wir (henfri und ich) haben pyworxcloud Version 1.3.0 (mit asyncio). Nachdem Marcus das plugin gezogen hat und die requirements installiert wurden hat
              er sicherlich den aktuellen Stand 14.11 (ohne asyncio). Die requirements sind mit Versionsangabe >= 1.3.0

              Das vielleicht nochmal gegen checken mit

              Code:
              pip show pyworxcloud
              Das sieht bei mir so aus :

              Code:
              Name: pyworxcloud
              Version: 1.3.0
              Summary: Worx Landroid API library
              Home-page: https://github.com/mtrab/pyworxcloud
              Author: Morten Trab
              Author-email: morten@trab.dk
              License: MIT
              Location: /home/smarthome/.local/lib/python3.8/site-packages
              Requires: paho-mqtt, pyOpenSSL
              Required-by:
              Für erste Versuche kann man eventuell die "alte" Version in der requirements.txt vorgeben.
              Falls dann die "alte" Version installiert wird sollte es funktionieren.

              Soll heißen :
              in der "requirements.txt" im plugin-Verzeichnis den Eintrag wie folgt ändern
              von
              Code:
              pyworxcloud >= 1.3.0
              auf
              Code:
              pyworxcloud = 1.3.0
              Aus meiner Sicht würde ich auf pyworxcloud komplett verzichten - das was pyworxcloud liefert kann man ohne Problem im Plugin einbauen.
              Leider musste ich schon zu oft feststellen, dass "tolle" Pakete nicht supported wurden und man am Ende doch alles selbst machen muss.
              Gerade bei solchen "Spezial-Paketen" würde ich eher darauf bauen es selbst zu machen.

              Gruss Andre

              Kommentar


                #22
                Ja, könnte hinkommen. Hier die pyworxcloud Version:

                Code:
                Name: pyworxcloud
                Version: 1.4.11
                Summary: Worx Landroid API library
                Home-page: https://github.com/mtrab/pyworxcloud
                Author: Morten Trab
                Author-email: morten@trab.dk
                License: MIT
                Location: /home/smarthome/.local/lib/python3.9/site-packages
                Requires: paho-mqtt, pyOpenSSL, ratelimit
                Required-by:
                Ich habe jetzt die "requirements.txt" im plugin-Verzeichnis geändert auf
                Code:
                pyworxcloud = 1.3.0
                Anschliessend SHNG service beendet und pyworxcloud (Version: 1.4.11) deinstalliert:
                Code:
                pip unistall pyworxcloud

                Und seit dem startet SHNG nicht mehr.....😭 Komplett tot. Help....



                Gruß
                Marcus

                Kommentar


                  #23
                  Uups,

                  shNG tot ? - irgendwelche Einträge in Log-Files

                  Code:
                  cat /usr/local/smarthome/var/log/smarthome-warnings.log
                  
                  oder
                  
                  sudo cat /var/log/syslog
                  Das ist schon sehr mysteriös ?

                  Gruss Andre

                  Kommentar


                    #24
                    Code:
                    2022-01-20 23:09:20 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.9.0.master (985af52b) --------------------
                    2022-01-20 23:09:20 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
                    2022-01-20 23:09:20 NOTICE lib.smarthome - on Linux-5.10.0-10-amd64-x86_64-with-glibc2.31 (pid=2409)
                    2022-01-20 23:09:20 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'!
                    2022-01-20 23:09:20 ERROR lib.shpypi test_requirements: 'pyworxcloud' not installed, any version needed
                    2022-01-20 23:09:20 WARNING lib.shpypi Installing plugin requirements for the current user, please wait...
                    2022-01-20 23:09:20 WARNING lib.shpypi > using PIP command: '/usr/bin/pip3'
                    2022-01-20 23:09:22 ERROR lib.shpypi ERROR: Invalid requirement: 'pyworxcloud= 1.3.0' (from line 56 of requirements/conf_all.txt)
                    Hint: = is not a valid operator. Did you mean == ?
                    
                    2022-01-20 23:09:22 CRITICAL lib.smarthome Python package requirements for configured plugins are not met and unable to install those requirements
                    2022-01-20 23:09:22 CRITICAL lib.smarthome Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml
                    2022-01-20 23:09:22 CRITICAL lib.smarthome Aborting
                    Hätte ich pip3 statt pip als Uninstall-Kommando verwenden sollen?


                    Code:
                    Jan 20 23:11:34 smartserver-2 systemd[1]: smarthome.service: Main process exited, code=exited, status=1/FAILURE
                    Jan 20 23:11:34 smartserver-2 systemd[1]: smarthome.service: Failed with result 'exit-code'.
                    Jan 20 23:11:34 smartserver-2 systemd[1]: smarthome.service: Consumed 4.763s CPU time.
                    Jan 20 23:11:34 smartserver-2 systemd[1]: smarthome.service: Scheduled restart job, restart counter is at 144.
                    Jan 20 23:11:34 smartserver-2 systemd[1]: Stopped SmartHomeNG daemon.
                    Jan 20 23:11:34 smartserver-2 systemd[1]: smarthome.service: Consumed 4.763s CPU time.
                    Jan 20 23:11:34 smartserver-2 systemd[1]: Starting SmartHomeNG daemon...
                    Jan 20 23:11:36 smartserver-2 python3[2924]: Daemon PID 2925
                    Jan 20 23:11:36 smartserver-2 systemd[1]: Started SmartHomeNG daemon.
                    Gruß
                    Marcus

                    Kommentar


                      #25
                      Ah, ich sehe es:
                      Code:
                      pyworxcloud == 1.3.0
                      Oder?

                      Kommentar


                        #26
                        Hi SMarcus ,

                        kurzer Nachtrag, ich kann Dein Problem nachstellen, der Eintrag in der requirements muss

                        Code:
                        pyworxcloud <= 1.3.0
                        lauten, ansonsten sucht sich PIP tot und verhindert den Neustart von shNG.
                        Allerdings schmeisst das Plugin dann andere Fehler, die ich im Moment nicht nachvollziehen kann.

                        Das wird mehr Zeit in Anspruch nehmen. Eventuell kann Hendrik hierzu was sagen

                        Gruss Andre

                        Nachtrag : Da war ich wohl zu langsam - "==" könnte das Problem auch heilen - dessen war ich mir nicht bewußt :-(
                        Zuletzt geändert von AndreK; 20.01.2022, 23:26.

                        Kommentar


                          #27
                          OK, damit startet SHNG wieder und das Plugin scheint zu laufen trotz einer Errormeldung. Alle Items (ausser die worx.visu items, aber der Mäher ist im Winterschlaf, muss ich morgen mal kurz aufwecken) werden erstmal gefüllt.

                          Error:

                          Code:
                          2022-01-20 23:16:55 ERROR lib.plugin Plugin 'landroid' exception in run() method: 'WorxCloud' object has no attribute 'serial'
                          > Traceback (most recent call last):
                          > File "/usr/local/smarthome/lib/plugin.py", line 675, in run
                          > self.plugin.run()
                          > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 127, in run
                          > self._get_weather()
                          > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 370, in _get_weather
                          > myUrl = "/product-items/{}/weather/current".format(self.worx.serial)
                          > AttributeError: 'WorxCloud' object has no attribute 'serial'
                          Etwas Sorge bereitet mir auch noch der Log nach dem neuen SHNG start - vielleicht kannst Du da mal eine Blick drauf werfen:

                          Code:
                          2022-01-20 23:15:38 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.9.0.master (985af52b) --------------------
                          2022-01-20 23:15:38 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
                          2022-01-20 23:15:38 NOTICE lib.smarthome - on Linux-5.10.0-10-amd64-x86_64-with-glibc2.31 (pid=3853)
                          2022-01-20 23:15:38 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'!
                          2022-01-20 23:15:39 ERROR lib.shpypi test_requirements: 'pyworxcloud' not installed. Minimum v1.3.0 needed
                          2022-01-20 23:15:39 WARNING lib.shpypi Installing plugin requirements for the current user, please wait...
                          2022-01-20 23:15:39 WARNING lib.shpypi > using PIP command: '/usr/bin/pip3'
                          2022-01-20 23:15:54 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.9.0.master (985af52b) --------------------
                          2022-01-20 23:15:54 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
                          2022-01-20 23:15:54 NOTICE lib.smarthome - on Linux-5.10.0-10-amd64-x86_64-with-glibc2.31 (pid=3879)
                          2022-01-20 23:15:54 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'!
                          2022-01-20 23:15:54 ERROR lib.shpypi test_requirements: 'pyworxcloud' not installed. Minimum v1.3.0 needed
                          2022-01-20 23:15:54 WARNING lib.shpypi Installing plugin requirements for the current user, please wait...
                          2022-01-20 23:15:54 WARNING lib.shpypi > using PIP command: '/usr/bin/pip3'
                          2022-01-20 23:15:58 [MARKIEREN]ERROR lib.shpypi WARNING: Ignoring invalid distribution -yopenssl (/home/smarthome/.local/lib/python3.9/site-packages)[/MARKIEREN]
                          WARNING: Ignoring invalid distribution -yopenssl (/home/smarthome/.local/lib/python3.9/site-packages)
                          WARNING: Ignoring invalid distribution -yopenssl (/home/smarthome/.local/lib/python3.9/site-packages)
                          WARNING: Ignoring invalid distribution -yopenssl (/home/smarthome/.local/lib/python3.9/site-packages)
                          WARNING: Ignoring invalid distribution -yopenssl (/home/smarthome/.local/lib/python3.9/site-packages)
                          
                          2022-01-20 23:15:58 [MARKIEREN]CRITICAL lib.smarthome Python package requirements for configured plugins are not met and unable to install those requirements[/MARKIEREN]
                          2022-01-20 23:15:58 CRITICAL lib.smarthome Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml
                          2022-01-20 23:15:58 CRITICAL lib.smarthome Aborting
                          2022-01-20 23:16:00 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.9.0.master (985af52b) --------------------
                          2022-01-20 23:16:00 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
                          2022-01-20 23:16:00 NOTICE lib.smarthome - on Linux-5.10.0-10-amd64-x86_64-with-glibc2.31 (pid=3895)
                          2022-01-20 23:16:00 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'!
                          2022-01-20 23:16:01 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'HE', state'', 1 benutzerdefinierte(r) Feiertag(e) definiert
                          2022-01-20 23:16:07 ERROR [MARKIEREN]lib.db Database [Database]: Could not connect to the database using 'sqlite3': unable to open database file[/MARKIEREN]
                          2022-01-20 23:16:07 CRITICAL plugins.database Database: Initialization failed: unable to open database file
                          2022-01-20 23:16:07 NOTICE lib.smarthome -------------------- SmartHomeNG restarting, initiated by SmartHomeNG (Database plugin stalled) --------------------
                          2022-01-20 23:16:20 NOTICE lib.smarthome -------------------- SmartHomeNG stopped --------------------
                          2022-01-20 23:16:20 ERROR asyncio Task was destroyed but it is pending!
                          task: <Task pending name='ws_server' coro=<Websocket.ws_server() running at /usr/local/smarthome/modules/websocket/__init__.py:263> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f429b5dab50>()]>>
                          2022-01-20 23:16:20 ERROR asyncio Task was destroyed but it is pending!
                          task: <Task pending name='update_visu' coro=<Websocket.update_visu() running at /usr/local/smarthome/modules/websocket/__init__.py:843> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f429b5cd970>()]>>
                          2022-01-20 23:16:20 ERROR asyncio Task was destroyed but it is pending!
                          task: <Task pending name='update_all_series' coro=<Websocket.update_all_series() running at /usr/local/smarthome/modules/websocket/__init__.py:705> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f429b5cdee0>()]>>
                          2022-01-20 23:16:22 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.9.0.master (985af52b) --------------------
                          2022-01-20 23:16:22 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
                          2022-01-20 23:16:22 NOTICE lib.smarthome - on Linux-5.10.0-10-amd64-x86_64-with-glibc2.31 (pid=3964)
                          2022-01-20 23:16:22 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'!
                          2022-01-20 23:16:23 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'HE', state'', 1 benutzerdefinierte(r) Feiertag(e) definiert
                          2022-01-20 23:16:52 NOTICE lib.smarthome -------------------- SmartHomeNG initialization finished --------------------
                          2022-01-20 23:16:52 ERROR plugins.alexarc4shng Login-State checked - Result: Logged OFF - try to login again
                          2022-01-20 23:16:53 WARNING plugins.landroid authentication was succesfull logged in
                          2022-01-20 23:16:54 WARNING plugins.landroid Starting to get Update from worx-Cloud
                          2022-01-20 23:16:55 WARNING plugins.landroid ended to get Update from worx-Cloud
                          2022-01-20 23:16:55 WARNING plugins.landroid Starting to get Status from worx-Cloud
                          2022-01-20 23:16:55 WARNING plugins.landroid ended to get Status from worx-Cloud
                          2022-01-20 23:16:55 WARNING plugins.landroid Starting to parse worx-Attributes
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _worx_mqtt_client_id with value android-ab6f77f8-7a3e-11ec-a81d-8439be65a506
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _worx_mqtt_endpoint with value a1optpg91s0ydf-ats.iot.eu-west-1.amazonaws.com
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _api with value <pyworxcloud.worxlandroidapi.WorxLandroidAPI object at 0x7f0538338130>
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _raw with value {}
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _auth_result with value True
                          2022-01-20 23:16:55 WARNING plugins.landroid Could not set item 'worx._auth_result' to 'True'
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _dev_id with value 0
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item id with value 27295
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item product_id with value 34
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item user_id with value 57892
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item serial_number with value 30173502170118040315
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mac_address with value F0FE6B2702D4
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item name with value RasiGrasi
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item locked with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item firmware_version with value 3.52
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item firmware_auto_upgrade with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item push_notifications with value True
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item sim with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item push_notifications_level with value warning
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item test with value 0
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item iot_registered with value True
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mqtt_registered with value True
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item pin_code with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item registered_at with value 2018-05-20 00:00:00
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item online with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item app_settings with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item accessories with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item features with value {'wifi_pairing': 'smartlink', 'provisioning_replaceable': True, 'mac_address': True, 'unrestricted_mowing_time': True, 'multi_zone': True, 'multi_zone_percentage': True, 'multi_zone_zones': 4, 'mqtt': True, 'display_type': 'led', 'input_type': 'keyboard_led', 'lock': True, 'rain_delay': True, 'chassis': 's_2017', 'wifi_connection': 'smartlink_no_display'}
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item pending_radio_link_validation with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mqtt_topics with value {'command_in': 'DB510/F0FE6B2702D4/commandIn', 'command_out': 'DB510/F0FE6B2702D4/commandOut'}
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item warranty_registered with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item purchased_at with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item warranty_expires_at with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item setup_location with value {'latitude': xxxxxx, 'longitude': yyyyyyy}
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item time_zone with value Europe/Berlin
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item lawn_size with value 110
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item lawn_perimeter with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item auto_schedule_settings with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item auto_schedule with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item distance_covered with value 752483
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mower_work_time with value 45949
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item blade_work_time with value 42597
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item blade_work_time_reset with value 28326
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item blade_work_time_reset_at with value 2020-08-10 10:30:53
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item battery_charge_cycles with value 4313
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item battery_charge_cycles_reset with value 0
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item battery_charge_cycles_reset_at with value None
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item messages_in with value 910
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item messages_out with value 123841
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item raw_messages_in with value 53241
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item raw_messages_out with value 123841
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item created_at with value 2017-03-13 19:29:43
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item updated_at with value 2021-10-04 19:53:38
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mqtt_out with value DB510/F0FE6B2702D4/commandOut
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mqtt_in with value DB510/F0FE6B2702D4/commandIn
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item mac with value F0FE6B2702D4
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item _mqtt with value <paho.mqtt.client.Client object at 0x7f0538338220>
                          2022-01-20 23:16:55 WARNING plugins.landroid Got item wait with value False
                          2022-01-20 23:16:55 WARNING plugins.landroid finished to parse worx-Attributes
                          2022-01-20 23:16:55 ERROR lib.plugin Plugin 'landroid' exception in run() method: 'WorxCloud' object has no attribute 'serial'
                          > Traceback (most recent call last):
                          > File "/usr/local/smarthome/lib/plugin.py", line 675, in run
                          > self.plugin.run()
                          > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 127, in run
                          > self._get_weather()
                          > File "/usr/local/smarthome/plugins/landroid/__init__.py", line 370, in _get_weather
                          > myUrl = "/product-items/{}/weather/current".format(self.worx.serial)
                          > AttributeError: 'WorxCloud' object has no attribute 'serial'
                          2022-01-20 23:17:09 WARNING plugins.landroid Starting to get Update from worx-Cloud
                          2022-01-20 23:17:09 WARNING plugins.landroid ended to get Update from worx-Cloud
                          2022-01-20 23:17:09 WARNING plugins.landroid Starting to get Status from worx-Cloud
                          2022-01-20 23:17:10 WARNING plugins.landroid ended to get Status from worx-Cloud
                          2022-01-20 23:17:10 WARNING plugins.landroid Starting to parse worx-Attributes
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _worx_mqtt_client_id with value android-ab6f77f8-7a3e-11ec-a81d-8439be65a506
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _worx_mqtt_endpoint with value a1optpg91s0ydf-ats.iot.eu-west-1.amazonaws.com
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _api with value <pyworxcloud.worxlandroidapi.WorxLandroidAPI object at 0x7f0538338130>
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _raw with value {}
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _auth_result with value True
                          2022-01-20 23:17:10 WARNING plugins.landroid Could not set item 'worx._auth_result' to 'True'
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _dev_id with value 0
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item id with value 27295
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item product_id with value 34
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item user_id with value 57892
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item serial_number with value 30173502170118040315
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mac_address with value F0FE6B2702D4
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item name with value RasiGrasi
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item locked with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item firmware_version with value 3.52
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item firmware_auto_upgrade with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item push_notifications with value True
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item sim with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item push_notifications_level with value warning
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item test with value 0
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item iot_registered with value True
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mqtt_registered with value True
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item pin_code with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item registered_at with value 2018-05-20 00:00:00
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item online with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item app_settings with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item accessories with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item features with value {'wifi_pairing': 'smartlink', 'provisioning_replaceable': True, 'mac_address': True, 'unrestricted_mowing_time': True, 'multi_zone': True, 'multi_zone_percentage': True, 'multi_zone_zones': 4, 'mqtt': True, 'display_type': 'led', 'input_type': 'keyboard_led', 'lock': True, 'rain_delay': True, 'chassis': 's_2017', 'wifi_connection': 'smartlink_no_display'}
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item pending_radio_link_validation with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mqtt_topics with value {'command_in': 'DB510/F0FE6B2702D4/commandIn', 'command_out': 'DB510/F0FE6B2702D4/commandOut'}
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item warranty_registered with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item purchased_at with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item warranty_expires_at with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item time_zone with value Europe/Berlin
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item lawn_size with value 110
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item lawn_perimeter with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item auto_schedule_settings with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item auto_schedule with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item distance_covered with value 752483
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mower_work_time with value 45949
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item blade_work_time with value 42597
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item blade_work_time_reset with value 28326
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item blade_work_time_reset_at with value 2020-08-10 10:30:53
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item battery_charge_cycles with value 4313
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item battery_charge_cycles_reset with value 0
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item battery_charge_cycles_reset_at with value None
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item messages_in with value 910
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item messages_out with value 123841
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item raw_messages_in with value 53241
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item raw_messages_out with value 123841
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item created_at with value 2017-03-13 19:29:43
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item updated_at with value 2021-10-04 19:53:38
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mqtt_out with value DB510/F0FE6B2702D4/commandOut
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mqtt_in with value DB510/F0FE6B2702D4/commandIn
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item mac with value F0FE6B2702D4
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item _mqtt with value <paho.mqtt.client.Client object at 0x7f0538338220>
                          2022-01-20 23:17:10 WARNING plugins.landroid Got item wait with value False
                          2022-01-20 23:17:10 WARNING plugins.landroid finished to parse worx-Attributes
                          Zuletzt geändert von SMarcus; 20.01.2022, 23:47. Grund: Geodaten entfernt

                          Kommentar


                            #28
                            OK, das sind Fehlermeldungen die ich auch habe.
                            Wieso kann ich im Moment nicht erklären, ich habe auch keinen "WORX" - ich darf noch auf den von Hendrik zugreifen :-)
                            Ich vermute aber das dieser auch im Winterschlaf ist.

                            Nachtrag: Das hängt mit dem Wetter zusammen - da kann es sein, dass sich was gegenüber dem Plugin-Stand geändert hat.

                            Alles weitere dann morgen

                            Gute Nacht,

                            Gruss Andre

                            Kommentar


                              #29
                              Hallo SMarcus ,

                              ich habe das ganze nochmal im Debugger betrachtet. Es ist auf jeden Fall so, dass keine Daten per mqtt kommen wenn der Mäher aus ist.
                              Über mqtt kommt normalerweis die "serial". Diese wird nicht gesetzt. Über die API kommt "serial_number" diese ist zwar identisch, das Wetter lässt sich
                              aber trotzdem nicht abrufen. Wenn Du in Zeile 369 in der __init__.py "serial" durch "serial_number" ersetzt ist der Fehler weg.

                              Code:
                              myUrl = "/product-items/{}/weather/current".format(self.worx.serial_number)
                              Wetter kommt aber auch keins

                              Man müsste das dann nochmal mit eingeschaltetem Mäher testen. Die nächste Saison kommt bestimmt .....

                              Vielleicht kannst Du Deinen Mäher mal kurz anschalten um zu prüfen ob dann wieder was kommt.

                              Viele Grüsse
                              Andre

                              Kommentar


                                #30
                                Manch ich. Werde ihn morgen ins Freigehege bringen und teste das Plugin (incl. der Änderung an der 'serial_number').

                                Ich plane auch die ganzen 'WARNING plugins.landroid Got item .....' auszukommentieren damit mir der log nicht volläuft. Ich denke die Meldungen sind gerade im moment nicht kritisch?

                                Frage noch zum Cycle: Ich weiß von anderen Foren, daß man von der Landroid API für 24h ausgesperrt wird, wenn man die Daten 'zu oft' abruft. Ich meine mich daran zu erinnern, daß etwa 10 Minuten das Limit waren. Hier im Plugin sind 2 Minuten vorgeschlagen - ging das damit bei Euch?

                                Gruß
                                Marcus

                                Kommentar

                                Lädt...
                                X