Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Parse of � not possible

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Parse of � not possible

    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      homecineplexx last edited by

      Hallo

      Ab und zu bekomm ich folgende Messages:

      
      mqtt.0
      2024-02-21 09:54:19.795	error	Client [ESPAltherma-dev] Cannot parse "espaltherma/ATTR": {"Kältemittel Typ 1":"Conv 801 not avail.","Kältemittel Typ 2":"Conv 405 not avail.","Kältemittel Typ 3":"Conv 802 not avail.","Anzahl - Sensoren":13,"Anzahl - Inverterverdichter":1,"Anzahl – Standardverdichter":0,"Anzahl - Außengerätelüfter":1,"Anzahl - Expansionsventile":2,"Anzahl - 4 Wege Ventile":1,"Anzahl - Ölsumpfheizungen":0,"Anzahl – Magnetventile":2,"Maximal anschließbare Innengerätezahl":4,"Erkannte Innengerätezahl (max 59 anzeigbar)":1,"O/U MPU ID (xx)":154,"O/U MPU ID (yy)":0,"Außengerät Leistung (kW)":0,"NextDataGrid":"Conv 995 not avail.","NextDataGrid":"Conv 995 not avail.","In-Out separator":"Conv 998 not avail.","Aktuelle Betriebsart":"Heating","Thermostat EIN/AUS":"ON","Wiederanlaufverzögerung":"OFF","Anlaufregelung":"OFF","Abtauung":"OFF","Ölrückführung":"OFF","Druckausgleichvorgang":"OFF","Lastabwurf":"OFF","Schallreduzierter Betrieb":"OFF","Betrieb/Störung":"Normal","Störcode":" 0","Zielverdampfung in °C":"---","Zielverflüssigung in °C":36.5625,"Verdichtungsendtemperatur Schutz aktiv":"OFF","Verdichtungsendtempperatur Schutz retry":"Conv 310 not avail.","Verdichterüberstromschutz aktiv":"OFF","Verdichterüberstromschutz retry":"Conv 311 not avail.","Hochdruckschutz aktiv":"OFF","Hochdruckschutz retry":"Conv 310 not avail.","Niederdruckschutz aktiv":"OFF","Niederdruckschutz retry":"Conv 311 not avail.","Inverterplatinentemperatur Schutz aktiv":"OFF","Inverterplatinentemperatur Schutz retry":"Conv 310 not avail.","Sonstiger Schutzmodus":"OFF","Nicht im Einsatz 1":"Conv 311 not avail.","O/U EEPROM (1_Ziffer)":"{0:X}{1:X}","O/U EEPROM (3_4_Ziffer)":"{0:X}{1:X}","O/U EEPROM (5_6_Ziffer)":"{0:X}{1:X}","O/U EEPROM (7_8_Ziffer)":"{0:X}{1:X}","O/U EEPROM (10_Ziffer)":"{0:X}{1:X}","O/U EEPROM (11_Ziffer)":"Conv 214 not avail.","Außenlufttemperatur(R1T)":9.3,"O/U Wärmetauscher Temperatur":5.5,"Ablassleitungstemperatur":52,"Ansaugleitungstemperatur":2.9,"Wärmetauscher Mitteltemperatur":5.2,"Flüssigkeitsleitungstemperatur (R6T)":31.8,"Kühlkörpertemperatur":22.6,"Druck":8,"Druck(T)":"Conv 405 not avail.","Nicht im Einsatz 2":1100.9,"Nicht im Einsatz 3":0,"INV Primärstrom (A)":1.8,"Stromaufnahme INV-Verdichter (A)":3.5,"Spannung (N-Phase) (V)":316,"Frostschutz Fluss Schalter":"OFF","Nicht im Einsatz 4":"OFF","Nicht im Einsatz 5":"OFF","Nicht im Einsatz 6":"OFF","Nicht im Einsatz 7":"OFF","Nicht im Einsatz 8":"OFF","Nicht im Einsatz 9":"OFF","Nicht im Einsatz 10":"OFF","Frostschutz Einlasstemperatur":0,"Frostschutz Auslasstemperatur":0,"Kühltemperatur Verdampfer Ein":-1126.4,"Kühltemperatur Verdampfer Aus":0,"Nicht im Einsatz 11":0,"Nicht im Einsatz 12":7,"Nicht im Einsatz 13":0,"Nicht im Einsatz 14":0,"Drehzahl Verdichter (U/Sek)":26,"INV Frequenz 2 (U/s)":8,"Verdichter (STD1)":"OFF","Verdichter (STD2)":"OFF","Ventilator 1 (stufe)":26,"Ventilator 2 (stufe)":8,"Expansionsventils1 (pls)":2074,"Y1E-Expansionsventil Mitteldruck_Unterkühler":51968,"Expansionsventils3 (pls)":0,"Expansionsventils4 (pls)":0,"Expansionsventils5 (pls)":0,"4-Wege-Ventil 1":"OFF","4-Wege-Ventil 2":"OFF","4-Wege-Ventil 3":"OFF","4-Wege-Ventil 4":"ON","4-Wege-Ventil 5":"ON","Ölsumpfheizung 1":"OFF","Ölsumpfheizung 2":"OFF","Ölsumpfheizung 3":"OFF","Ölsumpfheizung 4":"ON","SV1 (Heißgas)":"OFF","SV2 (BPH)":"OFF","Magnetventil 3":"OFF","Magnetventil 4":"ON","Magnetventil 5":"ON","Daten Aktivieren/Deaktivieren":"OFF","Adresse des Innengeräts":0,"I/U betriebsart":"Heating","Thermostat EIN/AUS":"ON","Frostschutz"�0+espaltherma/logQuerying register 0x00... 0Wespaltherma/log0x40 0x00 0x0c 0x0d 0x01 0x00 0x01 0x02 0x01 0x00 0x02 0x04 0x01 0x9a 0+espaltherma/logQuerying register 0x10... 0uespaltherma/log0x40 0x10 0x12 0x01 0x80 0x00 0x00 0x00 0x00 0x00 0x80 0xa8 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0xf1 0+espaltherma/logQuerying register 0x11... 0Cespaltherma/log0x40 0x11 0x08 0x01 0xb7 0x04 0x00 0x00 0x00 0xea 0+espaltherma/logQuerying register 0x20... 0zespaltherma/log0x40 0x20 0x13 0x5e 0x00 0x37 0x00 0x07 0x02 0x1e 0x00 0x30 0x00 0x38 0x01 0xe2 0x00 0x50 0x00 0x01 0x34 0+espaltherma/logQuerying register 0x21... 0uespaltherma/log0x40 0x21 0x12 0x12 0x00 0x23 0x00 0x36 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0xd4 0x00 0x00 0x00 0x4c 0+espaltherma/logQuerying register 0x30... 0pespaltherma/log0x40 0x30 0x11 0x1a 0x08 0x00 0xcb 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40 0x00 0xd1 0+espaltherma/logQuerying register 0x60... 0zespaltherma/log0x40 0x60 0x13 0x80 0x00 0x18 0x00 0x00 0x00 0x50 0xfe 0x01 0x3e 0x01 0x60 0x02 0x33 0x93 0x07 0x00 0xf7 0+espaltherma/logQuerying register 0x61... 0uespaltherma/log0x40 0x61 0x12 0x80 0x00 0x77 0x01 0x78 0x01 0x36 0x01 0x31 0x01 0xe7 0x01 0xf8 0x00 0x00 0x00 0x92 0+espaltherma/logQuerying register 0x62... 0zespaltherma/log0x40 0x62 0x13 0x80 0x00 0x08 0x77 0x01 0xf5 0x00 0x40 0x21 0x47 0x00 0x0b 0x49 0x00 0x00 0xbb 0xff 0x9f 0+espaltherma/logQuerying register 0x63... 0zespaltherma/log0x40 0x63 0x13 0x80 0x00 0x01 0x70 0x88 0x73 0x35 0x03 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x24 0+espaltherma/logQuerying register 0x64... 0uespaltherma/log0x40 0x64 0x12 0x80 0x00 0x02 0x00 0x00 0x00 0x00 0x77 0x01 0x06 0x36 0x01 0xee 0x01 0x0a 0x05 0x14 0�4espaltherma/ATTR{"Kältemittel Typ 1":"Conv 801 not avail.","Kältemittel Typ 2":"Conv 405 not avail.","Kältemittel Typ 3":"Conv 802 not avail.","Anzahl - Sensoren":13,"Anzahl - Inverterverdichter":1,"Anzahl – Standardverdichter":0,"Anzahl - Außengerätelüfter":1,"Anzahl - Expansionsventile":2,"Anzahl - 4 Wege Ventile":1,"Anzahl - Ölsumpfheizungen":0,"Anzahl – Magnetventile":2,"Maximal anschließbare Innengerätezahl":4,"Erkannte Innengerätezahl (max 59 anzeigbar)":1,"O/U MPU ID (xx)":154,"O/U MPU ID (yy)":0,"Außengerät Leistung (kW)":0,"NextDataGrid":"Conv 995 not avail.","NextDataGrid":"Conv 995 not avail.","In-Out separator":"Conv 998 not avail.","Aktuelle Betriebsart":"Heating","Thermostat EIN/AUS":"ON","Wiederanlaufverzögerung":"OFF","Anlaufregelung":"OFF","Abtauung":"OFF","Ölrückführung":"OFF","Druckausgleichvorgang":"OFF","Lastabwurf":"OFF","Schallreduzierter Betrieb":"OFF","Betrieb/Störung":"Normal","Störcode":" 0","Zielverdampfung in °C":"---","Zielverflüssigung in °C":36.5625,"Verdichtungsendtemperatur Schutz aktiv":"OFF","Verdichtungsendtempperatur Schutz retry":"Conv 310 not avail.","Verdichterüberstromschutz aktiv":"OFF","Verdichterüberstromschutz retry":"Conv 311 not avail.","Hochdruckschutz aktiv":"OFF","Hochdruckschutz retry":"Conv 310 not avail.","Niederdruckschutz aktiv":"OFF","Niederdruckschutz retry":"Conv 311 not avail.","Inverterplatinentemperatur Schutz aktiv":"OFF","Inverterplatinentemperatur Schutz retry":"Conv 310 no
      

      oder hier:

      sonoff.0
      2024-02-21 09:53:53.124	warn	Cannot parse data "SENSOR": _{"Time":"2024-02-21T09:53:31","ENERGY":{"TotalStartTime":"2020-12-27T18:58:12","Total":0.058,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"Apparent0�tele/DVES_655B31/STATE0�tele/DVES_655B31/STATE{"Time":"2024-02-2_ - SyntaxError: Unexpected token  in JSON at position 157
      

      Stellt sich für mich die Frage, woher kommt das � und warum kommt das und was macht man dagegen?

      Danke

      Homoran haus-automatisierung Codierknecht 3 Replies Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @homecineplexx last edited by Homoran

        @homecineplexx sagte in Parse of � not possible:

        Apparent0�tele/DVES_655B31/STATE0�tele/DVES_655B31/STATE{"

        was steht denn da im Original drin?
        Anscheinend nicht lesbare Sonderzeichen.
        Hinter dem ? sind noch zwei davon. kann ich nicht darstellen

        hab das mal verschoben
        Hat nichts mit dem englischen Forum und nichts mit Javascript zu tun

        H 1 Reply Last reply Reply Quote 0
        • H
          homecineplexx @Homoran last edited by

          @homoran wie seh ich das Original? das ist das, was mir ioBroker über den Log ausgibt!

          Warums im Englischen Forum ist, weiss ich nicht, Javascript hab ich angegeben, weil ich danach damit mitn Parsen Probleme hab

          1 Reply Last reply Reply Quote 0
          • haus-automatisierung
            haus-automatisierung Developer Most Active @homecineplexx last edited by

            @homecineplexx sagte in Parse of � not possible:

            Stellt sich für mich die Frage, woher kommt das �

            Sieht so aus, als wären da Unicode Zeichen enthalten und eine Seite kommt mit Unicode nicht so richtig klar.

            1 Reply Last reply Reply Quote 0
            • Codierknecht
              Codierknecht Developer Most Active @homecineplexx last edited by Codierknecht

              @homecineplexx

              https://en.wikipedia.org/wiki/Specials_(Unicode_block)

              Da wird offenbar etwas verwendet, was sich nicht sauber darstellen bzw. per MQTT übertragen lässt.
              Taucht sowas dann im JSON auf, lässt sich das (logischerweise) nicht mehr parsen.

              Was sind das für Geräte?
              Beim zweiten vielleicht ein ESP für den Stromzähler? Wie sieht da das SML aus?

              H 1 Reply Last reply Reply Quote 0
              • haus-automatisierung
                haus-automatisierung Developer Most Active last edited by haus-automatisierung

                @codierknecht sagte in Parse of � not possible:

                was sich nicht sauber darstellen bzw. per MQTT übertragen lässt.

                MQTT ist erstmal egal was übertragen wird. Das sind einfach nur Binärdaten für das Protokoll. Der Sonoff-Adapter macht aus allem UTF8:

                https://github.com/ioBroker/ioBroker.sonoff/blob/1dca3ee4f916e372d4617766c46d623577a11bbe/lib/server.js#L1164-L1165

                Also muss das Problem eher bei Tasmota liegen. Wie sind denn da die Topics konfiguriert und welche Tasmota-Version läuft da? Selbst gebaut oder fertiges Image?

                Hier wurde ein ähnliches Thema diskutiert: https://github.com/arendst/Tasmota/discussions/15970

                crunchip 1 Reply Last reply Reply Quote 0
                • H
                  homecineplexx @Codierknecht last edited by homecineplexx

                  @codierknecht also ja, das eine ist ein ESP32 der ESPAltherma drauf hat, für meine Wärmepumpe und das andere ist ein Sonoff Pow mit Tasmota.

                  Es kommt ja auch nicht immer...das kommt alle heiligen Zeiten Mal

                  Also das sind natürlich fertige Images. Welche ist jetzt die Frage, das lässt sich aus dem Log nicht sagen, weil ich nicht weiß welches Device das gerade war

                  Codierknecht haus-automatisierung 3 Replies Last reply Reply Quote 0
                  • Codierknecht
                    Codierknecht Developer Most Active @homecineplexx last edited by

                    @homecineplexx

                    Dann zeig mal, wie das in Tasmota aussieht.

                    @haus-automatisierung sagte in Parse of � not possible:

                    Wie sind denn da die Topics konfiguriert und welche Tasmota-Version läuft da?

                    H 1 Reply Last reply Reply Quote 0
                    • haus-automatisierung
                      haus-automatisierung Developer Most Active @homecineplexx last edited by

                      @homecineplexx sagte in Parse of � not possible:

                      Es kommt ja auch nicht immer...das kommt alle heiligen Zeiten Mal

                      Laut Diskussion auf GitHub kann das passieren, wenn die Last auf den ESP8266 zu hoch wird. TasmoAdmin fragt z.B. wohl alle paar Sekunden den Status ab und das mögen die wohl nicht.

                      1 Reply Last reply Reply Quote 0
                      • H
                        homecineplexx @Codierknecht last edited by

                        @Codierknecht
                        Übrigens so sieht das dann im Log direkt am ioBroker aus:

                        2024-02-21 09:53:53.124  - ESC[33mwarnESC[39m: sonoff.0 (104658) Cannot parse data "SENSOR": _{"Time":"2024-02-21T09:53:31","ENERGY":{"TotalStartTime":"2020-12-27T18:58:12","Total":0.058,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"Apparent0<EF><BF><BD>^B^@^Vtele/DVES_655B31/STATE0<EF><BF><BD>^B^@^Vtele/DVES_655B31/STATE{"Time":"2024-02-2_ - SyntaxError: Unexpected token ^B in JSON at position 157
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • Codierknecht
                          Codierknecht Developer Most Active @homecineplexx last edited by

                          @homecineplexx sagte in Parse of � not possible:

                          weil ich nicht weiß welches Device das gerade war

                          Steht ja drin

                          DVES_655B31
                          
                          H 1 Reply Last reply Reply Quote 0
                          • H
                            homecineplexx @Codierknecht last edited by

                            @codierknecht sorry, vor lauter Fehlermeldung hab ich das nicht gesehen.
                            so schauen die Topics aus. Ist eigentlich standard, da ich nichts in die Richtung geändert habe:

                            6e1ce86b-09d0-4a90-9001-f83a73a9dea1-image.png

                            1 Reply Last reply Reply Quote 0
                            • crunchip
                              crunchip Forum Testing Most Active @haus-automatisierung last edited by

                              @haus-automatisierung sagte in Parse of � not possible:

                              Also muss das Problem eher bei Tasmota liegen.

                              also ich habe das auch hin und wieder und das passiert wenn das Gerät nicht online/erreichbar ist

                              H 1 Reply Last reply Reply Quote 0
                              • H
                                homecineplexx @crunchip last edited by

                                @crunchip said in Parse of � not possible:

                                ch hin und wieder und das passiert wenn das Gerät nicht online/erreichbar ist

                                das versteh ich nicht, denn wenns nicht Online ist, schickt es ja auch keine Daten

                                crunchip 1 Reply Last reply Reply Quote 0
                                • crunchip
                                  crunchip Forum Testing Most Active @homecineplexx last edited by crunchip

                                  @homecineplexx hier ein Beispiel von mir

                                  2024-02-18 10:58:30.941 - warn: sonoff.0 (1491007) Cannot parse data "SENSOR": _{"Time":"2024-02-18T10:58:14","ENERGY":{"TotalStartTime":"2023-12-21T23:19:40","Total":44.983,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":0,"ApparentPowe0�tele/tasmota/STATE{"Time":"2024-02-18T10:58:24","Uptime":"58T13_ - SyntaxError: Unexpected token  in JSON at position 162
                                  

                                  0a7dae88-632a-4104-acc0-68c02c78bb65-image.png
                                  da hat scheinbar das Gerät mal die Verbindung verloren
                                  Gerät ist aber auch aktuell über den Winter gar nicht an

                                  1 Reply Last reply Reply Quote 0
                                  • PapaSpike
                                    PapaSpike last edited by

                                    Ich hatte das gleiche Problem und dazu im Git für den mqtt Adapter mal angefragt ob man das nicht filtern könnte, weil es mir auch das Log voll gemacht hat. Hatte dafür extra vom Sonoff zum mqtt gewechselt.

                                    https://github.com/ioBroker/ioBroker.mqtt/issues/353

                                    Lösung war: Stell sicher das der Client die richtigen Daten schickt 🙂

                                    Da ich die Daten im JS Adapter weiterverarbeite, hab ich mich dazu entschieden den String danach abzuschneiden und lesbar wiederherzustellen. Seit dem hab ich nur noch den Fehler im MQTT...

                                         if (typeof strStateValue === 'string') {
                                            // Findet die Position des ersten nicht druckbaren Zeichens
                                            const indexOfNonPrintable = strStateValue.search(/[^\x20-\x7E]/);
                                            // Findet das letzte Komma vor dem nicht druckbaren Zeichen, falls vorhanden
                                            const lastCommaIndex = indexOfNonPrintable >= 0 ? strStateValue.lastIndexOf(',', indexOfNonPrintable) : -1;
                                            // Entfernt den Teil des Strings nach dem nicht druckbaren Zeichen und stellt den JSON-String wieder her
                                            if (lastCommaIndex >= 0) {
                                                strStateValue = strStateValue.substring(0, lastCommaIndex) + '}';
                                            }
                                    

                                    Geht bestimmt eleganter, war für ich aber die einfachste Lösung am Ende. Vlt hilft dir das ja.

                                    Beste Grüße

                                    OliverIO 1 Reply Last reply Reply Quote 0
                                    • OliverIO
                                      OliverIO @PapaSpike last edited by

                                      @papaspike

                                      das will message feld hat keine formatvorgabe.
                                      daher würde ich da nur binär voraussetzen.
                                      https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

                                      daher wäre es schon erlaubt da auch nicht druckbare zeichen zu senden.
                                      wenn da von einem gerät nur ein bestimmtes format erwartet wird, dann muss das der eigene code abfangen, bevor da angefangen wird irgendwas zur parsen. alternativ eine try/catch klammer drum rum machen, mit einer entsprechenden protokollausgabe bei catch

                                      Codierknecht PapaSpike 2 Replies Last reply Reply Quote 0
                                      • Codierknecht
                                        Codierknecht Developer Most Active @OliverIO last edited by

                                        @oliverio

                                        Das hat Matthias ja auch schon so geschrieben.

                                        @haus-automatisierung sagte in Parse of � not possible:

                                        Das sind einfach nur Binärdaten für das Protokoll

                                        Ich würde dann auch eher dazu plädieren, das auf der ioBroker-Seite beim Parsen entsprechend zu berücksichtigen.
                                        Wenn da außer JSON auch mal etwas anders kommen könnte, muss das entweder berücksichtigt oder durch eine geeignete Fehlerbehandlung abgefangen werden.

                                        Wenn Binärdaten da im Protokoll zulässig sind, darf man halt nicht einfach davon ausgehen, dass auch immer ein korrektes JSON kommt.

                                        PapaSpike 1 Reply Last reply Reply Quote 1
                                        • PapaSpike
                                          PapaSpike @Codierknecht last edited by

                                          @codierknecht Danke bin ich auch der Meinung.

                                          1 Reply Last reply Reply Quote 0
                                          • PapaSpike
                                            PapaSpike @OliverIO last edited by

                                            @oliverio Ich hab es am Ende ja auch bei mir berücksichtigt. Wäre dennoch eleganter aus meiner Sicht im MQTT Adapter zu sagen, verwerfe solche Nachrichten oder bearbeite solche Nachrichten aber dann ohne Fehlermeldung oder oder gibt ja mehre Möglichkeiten wie man mit sowas umgehen könnte.
                                            Natürlich wäre es besser das der Absender es richtig macht, aber wo ist das halt garantiert 😉

                                            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

                                            694
                                            Online

                                            32.0k
                                            Users

                                            80.4k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript
                                            7
                                            20
                                            612
                                            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