Ankündigung

Einklappen
Keine Ankündigung bisher.

Support Thread für das Zigbee2MQTT Plugin

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

    #16
    Das Plugin ist jetzt in develop, der branch in meinem privaten Repo ist damit weg

    Kommentar


      #17
      Guten Abend,

      mit dem "offiziellen" Plugin aus dem master-branch bin ich mit dem Standard "zigbee2mqtt" weiter gekommen (habe es in z2m geändert) und konnte nun im WebIF die an der Bridge angemeldeten Geräte sehen.

      Aus Neugierde habe ich mir nun dein Plugin aus dem develop gezogen und in meiner Installation den Ordner unter Plugin ersetzt. Dies klappt leider nicht ohne weiteres:

      Code:
      2023-12-12  22:00:32 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.9.5-master (646146a0f)   --------------------
      2023-12-12  22:00:32 NOTICE   lib.smarthome       Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
      2023-12-12  22:00:32 NOTICE   lib.smarthome        - operating system 'Raspbian GNU/Linux 11 (bullseye)' (pid=18702)
      2023-12-12  22:00:32 NOTICE   lib.smarthome        - on 'Raspberry Pi 4 v1.1, 4GB (Sony, UK)'
      2023-12-12  22:00:34 NOTICE   lib.smarthome        - Nutze Feiertage für Land 'DE', Provinz 'BE', 1 benutzerdefinierte(r) Feiertag(e) definiert
      2023-12-12  22:00:40 ERROR    lib.item.structs    struct 'priv_z2m.light_white_ambient_group' not found in structdefinitions (used in 'zigbee2mqtt.light_white_ambient')
      2023-12-12  22:00:40 ERROR    lib.item.structs    struct 'priv_z2m.light_white_ambient_group' not found in structdefinitions (used in 'zigbee2mqtt.light_rgb_group')
      2023-12-12  22:00:40 ERROR    lib.item.structs    struct 'priv_z2m.light_rgb_group' not found in structdefinitions (used in 'zigbee2mqtt.light_rgb')
      2023-12-12  22:00:41 ERROR    lib.item.item       Item env.core.version: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
      > Traceback (most recent call last):
      >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
      >     child = Item(smarthome, self, child_path, value)
      >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
      >     update = plugin.parse_item(self)
      >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 157, in parse_item
      >     if item.property.path == self._suspend_item_path:
      > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
      2023-12-12  22:00:41 ERROR    lib.item.item       Item env.core.start: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
      > Traceback (most recent call last):
      >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
      >     child = Item(smarthome, self, child_path, value)
      >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
      >     update = plugin.parse_item(self)
      >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 157, in parse_item
      >     if item.property.path == self._suspend_item_path:
      > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
      2023-12-12  22:00:41 ERROR    lib.item.item       Item env.core.memory: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
      > Traceback (most recent call last):
      >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
      >     child = Item(smarthome, self, child_path, value)
      >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
      >     update = plugin.parse_item(self)
      >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 157, in parse_item
      >     if item.property.path == self._suspend_item_path:
      > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path' zz0.gv5p1fxj7wuzz
      die geht noch Ewigkeiten so weiter für jedes item.
      Kann man die Plugins nicht einfach so austauschen?​

      Kommentar


        #18
        Du müsstest den core aktualisieren, im develop sind Änderungen am smartplugin, die gebraucht werden.

        Kommentar


          #19
          Morg Wäre es nicht sinnvoll, im Plugin eine min shng Version anzugeben (z.B. 1.9.5.6), damit Nutzer eine sinnvolle Meldung statt der Tracebacks bekommen?
          Viele Grüße
          Martin

          There is no cloud. It's only someone else's computer.

          Kommentar


            #20
            Zitat von Msinn Beitrag anzeigen
            Wäre es nicht sinnvoll, im Plugin eine min shng Version anzugeben (z.B. 1.9.5.6), damit Nutzer eine sinnvolle Meldung statt der Tracebacks bekommen?
            Macht vermutlich Sinn, wobei mein stürmischer Mix aus Master-Core und dev-Plugin vermutlich auch nicht üblich bzw. sinnvoll ist

            Den Core auch auf Dev zu setzen lasse ich lieber, da dies meine Prod-Installation von shNG ist.

            Dann warte ich noch etwas ab.

            Morg oder kann ich anderweitig dein neues Plugin testen & unterstützen, ohne meine Prod-Umgebung zu gefährden?

            Kommentar


              #21
              Ich habe meine Prod-Instanz dupliziert, die Admin-UI-Ports geändert und lade nur die PLugins, die ich haben will.

              Meine Prod-Instanz passe ich erst an, wenn das in der Testumgebung sauber läuft.

              Kommentar


                #22
                Gibts hier mittlerweile ein Beispiel wie man (Ikea-Trädfri-GU10-)RGBW-Leuchten einbindet?

                und am besten via KNX(-Taster) ansteuert?
                cu Yfkt5A
                DALI(ABB DG/S1.1), KODI Odroid, TrueNAS, Zehnder ComfoAir 200 L Luxe
                microk8s-Cluster: HomeAssistant, MusicAssistant, mosquitto, TVHeadend, jellyfin

                Kommentar


                  #23
                  Code:
                          
                  zigbee:
                    bridge:
                      struct: zigbee2mqtt.bridge
                  
                    leuchten:
                      bunte_lampe:
                        z2m_topic: bunte-lampe
                        struct: zigbee2mqtt.light_rgb
                  Den bridge-Teil brauchst du nicht unbedingt. Und da die KNX-Attribute zum Schalten einzubauen, überlasse ich dir selber Tipp: schau dir den struct an, oder die resultierene Item-Struktur...
                  Zuletzt geändert von Morg; 31.01.2024, 21:52.

                  Kommentar


                    #24
                    Danke für die Antwort Morg...

                    bei mir will das aber nicht, sobald ich das zigbee2mqtt-Addon aktiviere wirfts ohne Ende Fehler:
                    Code:
                    2024-01-31  21:14:43 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.9.5-master (manual)   --------------------
                    2024-01-31  21:14:43 NOTICE   lib.smarthome       Running in Python interpreter 'v3.9.18 final', from directory /usr/local/smarthome
                    2024-01-31  21:14:43 NOTICE   lib.smarthome        - operating system 'Debian GNU/Linux 12 (bookworm)' (pid=3435)
                    2024-01-31  21:14:44 NOTICE   lib.smarthome        - on 'Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz'
                    2024-01-31  21:14:44 WARNING  lib.smarthome       Using config dir /mnt/conf
                    2024-01-31  21:14:45 NOTICE   lib.smarthome        - Nutze Feiertage für Land 'DE', Provinz 'BY', 1 benutzerdefinierte(r) Feiertag(e) definiert
                    2024-01-31  21:14:48 ERROR    lib.item.structs    struct 'priv_z2m.light_white_ambient_group' not found in structdefinitions (used in 'zigbee2mqtt.light_white_ambient')
                    2024-01-31  21:14:48 ERROR    lib.item.structs    struct 'priv_z2m.light_white_ambient_group' not found in structdefinitions (used in 'zigbee2mqtt.light_rgb_group')
                    2024-01-31  21:14:48 ERROR    lib.item.structs    struct 'priv_z2m.light_rgb_group' not found in structdefinitions (used in 'zigbee2mqtt.light_rgb')
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.version: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.start: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.memory: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.threads: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.garbage: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.scheduler.worker_threads: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    2024-01-31  21:14:48 ERROR    lib.item.item       Item env.core.scheduler.idle_threads: problem creating: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'
                    > Traceback (most recent call last):
                    >   File "/usr/local/smarthome/lib/item/item.py", line 357, in __init__
                    >     child = Item(smarthome, self, child_path, value)
                    >   File "/usr/local/smarthome/lib/item/item.py", line 438, in __init__
                    >     update = plugin.parse_item(self)
                    >   File "/usr/local/smarthome/plugins/zigbee2mqtt/__init__.py", line 153, in parse_item
                    >     if item.property.path == self._suspend_item_path:
                    > AttributeError: 'Zigbee2Mqtt' object has no attribute '_suspend_item_path'​
                    Brauchts dafür eine spezielle Version(skombi)?

                    Bin noch auf 1.9.5, kann aber auch nicht einfach hoch weils soweit ich weiß keinen neueren Docker-Container gibt. zigbee2mqtt ist 2.0.0 vom 4.12.23, glaub das habe ich aus deinem Repo gezogen.
                    cu Yfkt5A
                    DALI(ABB DG/S1.1), KODI Odroid, TrueNAS, Zehnder ComfoAir 200 L Luxe
                    microk8s-Cluster: HomeAssistant, MusicAssistant, mosquitto, TVHeadend, jellyfin

                    Kommentar


                      #25
                      Du brauchst mindestens 1.9.5-develop bzw. jetzt 1.10.0-master im core. Du hast anscheinend schon das aktuelle Plugin...

                      Alternativ könntest du in der plugins/zigbee2mqtt/__init__.py in der `def __init__(...)`-Methode eine Zeile hinzufügen: `self._suspend_item_path = ''`

                      Kommentar


                        #26
                        Hallo zusammen,
                        ich bin heute auf shng 1.10 - und damit auch auch das Zigbee Plugin 2.0 umgestiegen.
                        Die Änderung der Items habe ich von zigbee2mqtt -> z2m durchgeführt. Trotzdem habe ich Probleme ... :-/

                        Das Plugin läuft, ich kann das Plugin WebIF sehen und auch die Devices und Items scheinen richtig definiert zu sein. Im log stehen keine Fehler oder Warnungen.
                        Wenn ich allerdings meine Zigbee Steckdosen schalten will, dann tut sich nichts.
                        Im Zigbee2MQTT WebIf kommt die Fehlermeldung:

                        "Publish 'set' 'state' to 'Plug_No_1' failed: 'Error: 'null' not allowed, choose between: toggle.off.on'

                        Mein Item dazu sieht folgenermaßen aus:
                        Code:
                        zigbee:
                            plug1:
                                online:
                                    type: bool
                                    z2m_topic: Plug_No_1
                                    z2m_attr: online
                                    visu_acl: rw
                                state:
                                    type: bool
                                    z2m_topic: Plug_No_1
                                    z2m_attr: state
                                    enforce_updates: true
                                    visu_acl: rw  
                                    struct: uzsu.child
                                quality:
                                    type: num
                                    z2m_topic: Plug_No_1
                                    z2m_attr: linkquality
                                    visu_acl: rw
                                power:
                                    type: num
                                    z2m_topic: Plug_No_1
                                    z2m_attr: power
                                    visu_acl: rw
                                    database: yes
                                    database_maxage: 365
                                    cache: True
                                energy:
                                    type: num
                                    z2m_topic: Plug_No_1
                                    z2m_attr: energy
                                    visu_acl: rw
                                    database: yes
                                    database_maxage: 365
                                    cache: True
                        Was mache ich falsch bzw. übersehe beim Umstieg auf 2.0??
                        Vorher hat alles einwandfrei funktioniert ...

                        Kommentar


                          #27
                          ok ... bin selbst glaube ich schon einen Schritt weiter gekommen ...
                          Ich habe im Item beim bool'schen State "z2m_bool_values" ergänzt:

                          Code:
                          zigbee:
                              plug1:
                                  state:
                                      type: bool
                                      z2m_topic: Plug_No_1
                                      z2m_attr: state
                                      z2m_bool_values: ['OFF', 'ON']
                                      visu_acl: rw  
                                      struct: uzsu.child
                          Damit kann ich zumindest wieder schalten.
                          Ich bekomme aber weiterhin Fehlermeldungen, wie z.B.:

                          Entity 'Plug_No_1/state​' is unknown​
                          Entity 'Plug_No_1/linkquality' is unknown​
                          Zuletzt geändert von ooUrmeloo; 17.02.2024, 22:42.

                          Kommentar


                            #28
                            Die bool_values sind leider zu unterschiedlich, um die pauschal vorzubelegen.

                            Du kannst versuchen, vorhandene structs zu nutzen; wenn "dein" Struct noch fehlt, nehme ich es gerne ins Plugin mit auf ich habe keine Steckdosen und kann die deshalb nicht testen.

                            Kannst du zu den Fehlermeldungen ein (ausführlicheres) Debug-Log posten?

                            Kommentar


                              #29
                              Zitat von Morg Beitrag anzeigen
                              Die bool_values sind leider zu unterschiedlich, um die pauschal vorzubelegen.
                              ok ... was mich dann aber wundert ... Warum hat's denn dann vorher funktioniert?

                              Ich habe nochmal länger drauf geschaut ... Die Lösung oben mit den bool_values scheint es doch behoben zu haben. Keine Fehlermeldungen mehr.
                              Debug-Log sieht jetzt doch unauffällig aus. Ich beoachte mal noch weiter.

                              Struct benutze ich bisher noch nicht ... sollte aber glaube ich kein großes Ding sein ...
                              Ich benutze nur einfache Steckdosen, Tür-Kontakte und Helligkeitssensoren ... Ich probier mal.

                              Kommentar


                                #30
                                Im alten Plugin war alles auf bekannte Geräte beschränkt; um ein neues Gerät einzubinden, musste man immer erst das Plugin anpassen, in Metadata und Code.

                                Das neue Plugin erlaubt alles, aber kennt nicht alles. "Bekannte" Geräte werden als struct implementiert, dann hat man alle relevanten Informationen in standardisierten Items verfügbar. Für neue Geräte muss man halt etwas probieren

                                Insofern wäre ich für deine Item-Definition dankbar, dann kann ich die für eine entsprechende Steckdose mit einbauen.

                                Kommentar

                                Lädt...
                                X