Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [Problem] Zigbee Adapter & SONOFF SNZB-02

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    [Problem] Zigbee Adapter & SONOFF SNZB-02

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      st01 @Asgothian last edited by

      @asgothian
      Nein - mit früheren (älteren) Versionen : vor 2.0.5

      Asgothian 1 Reply Last reply Reply Quote 0
      • Asgothian
        Asgothian Developer @st01 last edited by

        @st01 weisst du mit welcher ?

        S 1 Reply Last reply Reply Quote 0
        • S
          st01 @Asgothian last edited by st01

          @asgothian
          Leider nein.
          Ich denke mal mit einer der letzten 1.x Version, da ich mit der 2.0.x noch gewartet habe.
          Da war doch was mit breaking change.

          Asgothian 2 Replies Last reply Reply Quote 0
          • Asgothian
            Asgothian Developer @st01 last edited by

            @st01 Dann gilt das was ich oben geschrieben habe auch schon. mit der letzten 1.10er version gab es ZHC20.58.0 - da war die Einbindung der SNZB-02 bereits so wie sie heute ist.

            A.

            1 Reply Last reply Reply Quote 0
            • Asgothian
              Asgothian Developer @st01 last edited by

              @st01 Mach mal bitte folgendes:

              • nimm den sensor den du als letzten neu angelernt hast
              • entfern die Batterie
              • drück 4 mal den kleinen Taster, um irgendwelche Kondensatoren zu entladen
              • versuch den zu konfigurieren

              Mich interessiert die Meldung die da kommt.

              Parallel bereite ich noch einen weiteren Test vor.

              A.

              Asgothian 1 Reply Last reply Reply Quote 0
              • Asgothian
                Asgothian Developer @Asgothian last edited by

                Hier die Daten für Test #2:

                • Nimm den Code der sich im Spoiler befindet
                • Speichere diesen als SNZB_TEST.JS im Datenverzeichnis des Adapters ab. (da wo auch die shepherd.db liegt)
                • halte den Adapter an
                • trage SNZB_TEST.JS bei den Externen Konvertern in der Konfiguration ein
                • starte den Adapter
                • prüfe im Log des Startups ob da Info- oder Warn- Meldungen (oder sogar Fehler) zu SNZB_TEST auftauchen.
                • versuche dann einen Sensor neu zu konfigurieren. Da müsste es eigentlich eine Meldung geben.

                A.

                import * as fz from "../converters/fromZigbee";
                import * as constants from "../lib/constants";
                import * as exposes from "../lib/exposes";
                import {logger} from "../lib/logger";
                import * as reporting from "../lib/reporting";
                
                const defaultResponseOptions = {disableDefaultResponse: false};
                const e = exposes.presets;
                const ea = exposes.access;
                
                const converters = [
                   {
                       fingerprint: [
                           // ModelID is from the button (SNZB-01) but this is SNZB-02, wrong modelID in firmware?
                           // https://github.com/Koenkk/zigbee2mqtt/issues/4338
                           {
                               type: "EndDevice",
                               manufacturerName: "eWeLink",
                               modelID: "WB01",
                               endpoints: [{ID: 1, profileID: 260, deviceID: 770, inputClusters: [0, 3, 1026, 1029, 1], outputClusters: [3]}],
                           },
                           {
                               type: "EndDevice",
                               manufacturerName: "eWeLink",
                               modelID: "66666",
                               endpoints: [{ID: 1, profileID: 260, deviceID: 770, inputClusters: [0, 3, 1026, 1029, 1], outputClusters: [3]}],
                           },
                           {
                               type: "EndDevice",
                               manufacturerName: "eWeLink",
                               modelID: "DS01",
                               endpoints: [{ID: 1, profileID: 260, deviceID: 770, inputClusters: [0, 3, 1026, 1029, 1], outputClusters: [3]}],
                           },
                           {
                               type: "EndDevice",
                               manufacturerName: "Zbeacon",
                               modelID: "TH01",
                           },
                       ],
                       zigbeeModel: ["TH01", "SNZB-02", "CK-TLSR8656-SS5-01(7014)"],
                       model: "SNZB-02",
                       vendor: "SONOFF",
                       whiteLabel: [
                           {vendor: "eWeLink", model: "RHK08"},
                           {
                               vendor: "eWeLink",
                               model: "SNZB-02_eWeLink",
                               fingerprint: [{modelID: "SNZB-02", manufacturerName: "eWeLink"}],
                           },
                           {
                               vendor: "eWeLink",
                               model: "CK-TLSR8656-SS5-01(7014)",
                               fingerprint: [{modelID: "CK-TLSR8656-SS5-01(7014)", manufacturerName: "eWeLink"}],
                           },
                           {
                               vendor: "Zbeacon",
                               model: "TH01",
                               fingerprint: [{modelID: "TH01", manufacturerName: "Zbeacon"}],
                           },
                       ],
                       description: "Temperature and humidity sensor 2",
                       exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
                       fromZigbee: [fz.SNZB02_temperature, fz.humidity, fz.battery],
                       toZigbee: [],
                       configure: async (device, coordinatorEndpoint) => {
                           device.powerSource = "Battery";
                           device.save();
                           try {
                               const endpoint = device.getEndpoint(1);
                               const bindClusters = ["msTemperatureMeasurement", "msRelativeHumidity", "genPowerCfg"];
                               await reporting.bind(endpoint, coordinatorEndpoint, bindClusters);
                               await reporting.temperature(endpoint, {min: 30, max: constants.repInterval.MINUTES_5, change: 20});
                               await reporting.humidity(endpoint, {min: 30, max: constants.repInterval.MINUTES_5, change: 100});
                               await reporting.batteryVoltage(endpoint, {min: 3600, max: 7200});
                               await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
                               const a = 0;
                               const b = a.ThrowAnError;
                           } catch (e) {
                               /* Not required for all: https://github.com/Koenkk/zigbee2mqtt/issues/5562 */
                               logger.error(`Configure failed: ${e}`, NS);
                           }
                       },
                   },
                ];
                
                module.exports converters;
                

                nvivekananth created this issue in Koenkk/zigbee2mqtt

                closed Sonoff SNZB-02 gets connected as SONOFF SNZB-01 #4338

                nanobra1n created this issue in Koenkk/zigbee2mqtt

                closed Failure to configure Sonoff SNZB-02 #5562

                S 1 Reply Last reply Reply Quote 0
                • S
                  st01 @Asgothian last edited by Homoran

                  @asgothian
                  Habe das versucht: Hat einen error log entry gegeben

                  zigbee.0
                  2025-09-09 17:07:13.333	error	Unable to apply converter from module: /opt/iobroker/iobroker-data/zigbee_0/SNZB_TEST.JS - the code does not run: SyntaxError: Unexpected identifier 'converters'
                  

                  MOD-EDIT: Code in code-tags gesetzt!

                  Sollte doch
                  module.exports = converters;
                  sein?

                  Habe es im SNZB_TEST.JS korrigiert

                  Asgothian 1 Reply Last reply Reply Quote 0
                  • Asgothian
                    Asgothian Developer @st01 last edited by

                    @st01 Ja - Schreibfehler. Ich kann das hier nicht wirklich testen.

                    Was kommt bei dem Test heraus ?

                    Auch: was passiert beim Test ohne Batterie ?

                    A

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      st01 @Asgothian last edited by st01

                      @asgothian

                      Beim "Reconfiger" & wenn keine Batterie in SNZB-02 ist gibts die Meldung:

                      • Error
                        0x00124b00292c269e TH01 Failed to configure. --> NS is not defined

                      Übrigens auch beim SNZB-02 mit Batterie (das nach dem neu inkludieren nicht mehr geht).

                      Mit dem SNZB_TEST.JS converter habe ich noch keinen Effekt gesehen. Müsste das log noch exportieren und filtern.
                      Müsste ein bestimmter log kommen?

                      log files:
                      iobroker-zigbee.0.log
                      das zuletzt manipulierte SNZB-02 ist 00124b00292c269e
                      iobroker-zigbee.0.00124b00292c269e.log

                      Asgothian 1 Reply Last reply Reply Quote 0
                      • Asgothian
                        Asgothian Developer @st01 last edited by

                        @st01 füg bitte dem Kopf des Konverters hinzu:

                        const NS = "zhc:sonoff";
                        
                        S 1 Reply Last reply Reply Quote 0
                        • S
                          st01 @Asgothian last edited by st01

                          @asgothian
                          Irgendwo ist noch etwas schräg:

                          zigbee.0
                          2025-09-09 18:00:18.491	warn	DeviceConfigure:0x00124b00292c269e TH01 Failed to configure. --> logger.error is not a function
                          

                          Diese Fehler Meldung gibts jetzt beim "Reconfigure".

                          Ich habe nochmals das SNZB-02 inkludiert:
                          interessant ist das pairing log:

                          Pairing time left: 60
                          Pairing time left: 61
                          Pairing time left: 62
                          Pairing time left: 63
                          Pairing time left: 64
                          Pairing time left: 65
                          Pairing time left: 66
                          Pairing time left: 67
                          Pairing time left: 68
                          Interview failed: 0x00124b00292c269e
                          Interview failed: 0x00124b00292c269e
                          Pairing time left: 69
                          Currently 14 devices are joined:
                          Unable to disable LED, unsupported function.
                          Network parameters: panID=XNXN channel=11 extendedPanID=XNXNXNXNXNXNXNXN
                          Zigbee-Herdsman started successfully with Coordinator firmware version: ZStack3x0 : 20220219 (2-1.2.7.1)
                          Pairing time left: 70
                          Pairing time left: 71
                          Pairing time left: 72
                          Pairing time left: 73
                          Starting zigbee-herdsman...
                          Pairing time left: 74
                          Pairing time left: 75
                          Pairing time left: 76
                          Pairing time left: 77
                          Pairing time left: 78
                          Pairing time left: 79
                          Pairing time left: 80
                          Pairing time left: 81
                          Pairing time left: 82
                          Pairing time left: 83
                          Pairing time left: 84
                          Pairing time left: 85
                          New device joined '0x00124b00292c269e' model SNZB-02
                          Pairing time left: 86
                          Device '0x00124b00292c269e' announced itself
                          Interview started: 0x00124b00292c269e
                          Pairing time left: 87
                          Pairing time left: 88
                          Pairing time left: 89
                          Pairing time left: 90
                          Pairing possible for 90 seconds
                          

                          (panID und extendedPanID masked)

                          iobroker-2-zigbee.log

                          iobroker-2-zigbee.0.00124b00292c269e.log

                          Asgothian 1 Reply Last reply Reply Quote 0
                          • Asgothian
                            Asgothian Developer @st01 last edited by Asgothian

                            @st01 Das ist schon gut - das bedeutet er versucht es zumindest. Die Zeile const b = a.ThrowAnError; dient nur dazu nachzuweisen das er da vorbei kommt und dann einen Fehler wirft. wenn du die raus nimmst sollte keine Meldung kommen.

                            Er versucht das Configure also so wie es drin steht

                            bitte die Zeile mal heraus nehmen, neu starten und dann nochmal das configure versuchen - einmal mit einem Gerät mit Batterie, einmal mit einem Ohne

                            A.

                            S 2 Replies Last reply Reply Quote 0
                            • S
                              st01 @Asgothian last edited by st01

                              @asgothian
                              "Reconfigure" ergibt bei beiden dasselbe (das mit Batterie ist wahrscheinlich auch offline)

                              zigbee.0
                              2025-09-09 18:21:08.793	warn	DeviceConfigure:0x00124b00292c269e TH01 Failed to configure. --> NS is not defined
                              
                              zigbee.0
                              2025-09-09 18:20:13.609	warn	DeviceConfigure:0x00124b002935c6dd TH01 Failed to configure. --> NS is not defined
                              

                              Nach nochmaligem Inkludieren funktioniert es auf einmal wieder!!!!
                              00124b002935c6dd : das ist das SNZB-02 das mit alter Adapter Version funktioniert hatte, dann bei aktueller Version nicht mehr.
                              Und jetzt - Halleluja - ich versteh es nicht. Ist das der Konverter?

                              Gleich nach dem Inkludieren funktioniert auch das "Reconfigure"!

                              Meine Vermutung: Es muss gleich nach dem Inkludieren ein "Reconfigure" gemacht werden damit der Sensor richtig funktioniert.

                              1 Reply Last reply Reply Quote 0
                              • S
                                st01 @Asgothian last edited by

                                @asgothian
                                Also wenn ich direkt nach Inkludieren ein "Reconfigure" mache dann funktioniert es und es werden die Properties nichtig updated.
                                z.B.

                                
                                zigbee.0
                                2025-09-09 18:51:11.710	debug	value generated '"{\"type\":\"attributeReport\",\"data\":{\"measuredValue\":2372},\"linkquality\":105,\"groupID\":0,\"cluster\":\"msTemperatureMeasurement\",\"meta\":{\"zclTransactionSequenceNumber\":9,\"frameControl\":{\"frameType\":0,\"manufacturerSpecific\":false,\"direction\":1,\"disableDefaultResponse\":true,\"reservedBits\":0}},\"endpoint_id\":1}"' from device 00124b00292fdf2b for 'Message from Zigbee'
                                

                                Wenn nicht ist der Sensor später nicht mehr erreichbare für "Reconfigure".

                                Geht da evt. nach dem Inkludieren etwas nicht automatisch richtig?

                                Asgothian 1 Reply Last reply Reply Quote 0
                                • Asgothian
                                  Asgothian Developer @st01 last edited by Asgothian

                                  @st01 sagte in [Problem] Zigbee Adapter & SONOFF SNZB-02:

                                  @asgothian
                                  Also wenn ich direkt nach Inkludieren ein "Reconfigure" mache dann funktioniert es und es werden die Properties nichtig updated.
                                  z.B.

                                  
                                  zigbee.0
                                  2025-09-09 18:51:11.710	debug	value generated '"{\"type\":\"attributeReport\",\"data\":{\"measuredValue\":2372},\"linkquality\":105,\"groupID\":0,\"cluster\":\"msTemperatureMeasurement\",\"meta\":{\"zclTransactionSequenceNumber\":9,\"frameControl\":{\"frameType\":0,\"manufacturerSpecific\":false,\"direction\":1,\"disableDefaultResponse\":true,\"reservedBits\":0}},\"endpoint_id\":1}"' from device 00124b00292fdf2b for 'Message from Zigbee'
                                  

                                  Wenn nicht ist der Sensor später nicht mehr erreichbare für "Reconfigure".

                                  Geht da evt. nach dem Inkludieren etwas nicht automatisch richtig?

                                  Weil er wahrscheinlich schläft - du musst den dann auch wach machen bevor du ihn konfigurieren willst. Das hatte ich als bekannt voraus gesetzt. Alles was eine Batterie hat sollte man immer aufwecken bevor man was damit machen will.

                                  A.
                                  p.s. ist wie bei Kindern. Wenn du deren Aufmerksamkeit nicht hast, bringt es nichts ihnen zu sagen was sie tun sollen 🙂

                                  pps: Seit dem Wechsel auf ZH 4.0 scheint das Interview so lange zu dauern das die Konfiguration nicht immer direkt im Anschluss durch kommt. Oder sie ist nicht mehr im Standard enthalten - das muss ich mir anschauen - wenn ich mit den Gruppen und Bindings fertig bin. Also nächsten Monat oder so.
                                  A.

                                  S 1 Reply Last reply Reply Quote 1
                                  • S
                                    st01 @Asgothian last edited by

                                    @asgothian Ja das mit dem wakeup ist eigentlich klar 😊

                                    Ist im SNZB_TEST Konverter nun schon eine Korrektur für etwas drin?

                                    Besten Dank für die Hilfe 👍
                                    Dann warte ich auch kommende Update Infos 😅 - beste Grüsse!

                                    Asgothian 1 Reply Last reply Reply Quote 0
                                    • Asgothian
                                      Asgothian Developer @st01 last edited by

                                      @st01 sagte in [Problem] Zigbee Adapter & SONOFF SNZB-02:

                                      @asgothian Ja das mit dem wakeup ist eigentlich klar 😊

                                      Ist im SNZB_TEST Konverter nun schon eine Korrektur für etwas drin?

                                      Besten Dank für die Hilfe 👍
                                      Dann warte ich auch kommende Update Infos 😅 - beste Grüsse!

                                      Nein - ich wollte damit nur sicherstellen das das Configure gemacht wird. Den kannst du wieder entfernen - der ist ansonsten genau so wie der eingebaute.

                                      A.

                                      arteck 1 Reply Last reply Reply Quote 0
                                      • arteck
                                        arteck Developer Most Active @Asgothian last edited by arteck

                                        @asgothian Axel die Firmware ist zu alt - 20220219

                                        @st01 mach bitte ein Firmware upadte auf den coordinator ..

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate
                                        FAQ Cloud / IOT
                                        HowTo: Node.js-Update
                                        HowTo: Backup/Restore
                                        Downloads
                                        BLOG

                                        761
                                        Online

                                        32.0k
                                        Users

                                        80.6k
                                        Topics

                                        1.3m
                                        Posts

                                        5
                                        36
                                        444
                                        Loading More Posts
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        Community
                                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                        The ioBroker Community 2014-2023
                                        logo