Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Adapter "log Parser" - Komma bereinigen

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Adapter "log Parser" - Komma bereinigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • bahnuhr
      bahnuhr Forum Testing Most Active last edited by

      dein oben geposteter sieht aber anders aus

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @bahnuhr last edited by Homoran

        @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

        dein oben geposteter sieht aber anders aus

        ja, hatte ihn anschließend noch was optimiert

        Aber jetzt: tus": {"(.+\s.+\s.+), "cl

        oder: tus": {"([\w\W]+), "cl

        1 Reply Last reply Reply Quote 0
        • bahnuhr
          bahnuhr Forum Testing Most Active last edited by

          @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

          tus": {"(.+\s.+\s.+), "cl

          Rainer,
          ich brauchs aber genau andersrum.
          gemacht werden muss:
          json = {"name": "Robo-Maeh", "id": "081603", "status":
          und
          , "clock": {"date": "2020-10-06", "time": "21:51:59", "unix": 1602021119}, "successful": true}

          Also der erste und letzte Teil, weil dies wird ja bereinigt.
          Stehen bleiben soll dann:
          {"status": 17, "distance": 0, "stopped": false, "dooropen": false, "duration": 182300, "mode": 2, "battery": 100, "hours": 6}, "timer": {"status": 0}, "blades": {"quality": 97, "hours": 6, "days": 6}, "wlan": {"signal": -74}, "health": {"temperature": 23, "humidity": 25}

          Gerne auch in 2 matches.
          kann man ja dann mit Komma getrennt eintragen.

          Homoran 1 Reply Last reply Reply Quote 0
          • bahnuhr
            bahnuhr Forum Testing Most Active last edited by bahnuhr

            @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

            json = {"name": "Robo-Maeh", "id": "081603", "status": {"status": 17, "distance": 0, "stopped": false, "dooropen": false,
            "duration": 182300, "mode": 2, "battery": 100, "hours": 6}, "timer": {"status": 0}, "blades": {"quality": 97,
            "hours": 6, "days": 6}, "wlan": {"signal": -74}, "health": {"temperature": 23, "humidity": 25}, "clock":
            {"date": "2020-10-06", "time": "21:51:59", "unix": 1602021119}, "successful": true}

            Der 1. Teil geht so:
            4cf2440b-72be-4de9-ab2b-9c80981296db-image.png

            Nur der 2. Teil geht nicht.

            1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @bahnuhr last edited by

              @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

              ich brauchs aber genau andersrum.

              Dan sach das doch 😉

              bahnuhr 1 Reply Last reply Reply Quote 0
              • bahnuhr
                bahnuhr Forum Testing Most Active last edited by

                Und der 2. Teil klappt in regex101 so:
                36610260-6b28-4e9a-a35b-e2016e22769b-image.png

                Jedoch nicht im Adapter.

                1 Reply Last reply Reply Quote 0
                • bahnuhr
                  bahnuhr Forum Testing Most Active @Homoran last edited by

                  @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

                  Dan sach das doch

                  Hab ich 😉

                  Homoran 1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @bahnuhr last edited by

                    @bahnuhr 2. Teoil: (, "cl[\w\W]+)

                    bahnuhr 1 Reply Last reply Reply Quote 0
                    • bahnuhr
                      bahnuhr Forum Testing Most Active @Homoran last edited by bahnuhr

                      @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

                      (, "cl[\w\W]+)

                      Ich sags ja.
                      In 101 funktioniert dies.

                      Im Adapter nicht !

                      Der Teil wird nicht entfernt!
                      Weiterhin:
                      json = {"name": "Robo-Maeh", "id": "081603", "status": {"status": 17, "distance": 0, "stopped": false, "dooropen": false, "duration": 243382, "mode": 2, "battery": 100, "hours": 6}, "timer": {"status": 0}, "blades": {"quality": 97, "hours": 6, "days": 6}, "wlan": {"signal": -75}, "health": {"temperature": 25, "humidity": 24}, "clock": {"date": "2020-10-07", "time": "14:49:59", "unix": 1602082199}, "successful": true}

                      Eingegeben ist:
                      9725c85b-9c6a-420d-a351-ce9bb2915b46-image.png

                      Homoran 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @bahnuhr last edited by

                        @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                        Im Adapter nicht !

                        auch nicht in dieser Schreibweise 😞

                        was steht denn im Editor?

                        bahnuhr 1 Reply Last reply Reply Quote 0
                        • bahnuhr
                          bahnuhr Forum Testing Most Active @Homoran last edited by

                          @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

                          was steht denn im Editor?

                          Lt. Anleitung sind regex im Adapter mit / ... / einzuschließen.

                          Was meinst du mit Editor ?

                          Homoran 1 Reply Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @bahnuhr last edited by Homoran

                            @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                            Was meinst du mit Editor ?

                            ich war beim normalen Parser-Adapter, da kann man im Editor (Bleistift) sehen was passiert
                            ich müsste wissen wo sich das RegEx im Adapter aufhängt.
                            sonst muss man sich schrittweise ranarbieten, z.B. Leerzeichen durch \s erstezen
                            (,\s\"cl[\w\W]+)

                            EDIT:
                            die beiden slashes sind ja hier auch:
                            Dieter008.png

                            EDIT2:

                            wenn der Adapter keine Kommata mag, dann kann ich mir nur noch helfen dieses zu escapen (hatten wir schon), oder wegzulassen und später wieder hinzuzufügen

                            bahnuhr 1 Reply Last reply Reply Quote 0
                            • bahnuhr
                              bahnuhr Forum Testing Most Active @Homoran last edited by

                              @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

                              oder wegzulassen und später wieder hinzuzufügen

                              was meinst du damit.

                              P.S.
                              \s
                              hat nichts gebracht; da bleibt wieder alles stehen.

                              Homoran 1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @bahnuhr last edited by

                                @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                                was meinst du damit.

                                das:
                                (\s\"cl[\w\W]+)

                                1 Reply Last reply Reply Quote 0
                                • bahnuhr
                                  bahnuhr Forum Testing Most Active last edited by

                                  Rainer,
                                  ich habs.

                                  Den 1.Teil mit:
                                  /json = {"name"[^] "status": /

                                  Den 2. Teil mit:
                                  / "clock[^*]*l": true}/

                                  Und dann steht ja am Ende noch ein Komma; und dies dann mit:
                                  /.{1}$/

                                  Da die einzelnen regex wohl nacheinander abgearbeitet werden, ist das Ergebnis dann korrekt.

                                  Eingetragen hab ich somit:
                                  /json = {"name"[^] "status": /,/ "clock[^*]*l": true}/,/.{1}$/

                                  mfg
                                  Dieter

                                  P.S.
                                  Danke für deine Hilfe.

                                  Homoran 2 Replies Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @bahnuhr last edited by

                                    @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                                    /,/

                                    das meinte ich damit 😉

                                    1 Reply Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators @bahnuhr last edited by

                                      @bahnuhr was bitte soll die [^*] bewirken?

                                      das bedeutet "enthält kein (beliebig viele)"

                                      • Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
                                      bahnuhr 1 Reply Last reply Reply Quote 0
                                      • bahnuhr
                                        bahnuhr Forum Testing Most Active @Homoran last edited by

                                        @Homoran sagte in Adapter "log Parser" - Komma bereinigen:

                                        @bahnuhr was bitte soll die [^*] bewirken?

                                        das bedeutet "enthält kein (beliebig viele)"

                                        • Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)

                                        Das ist zu hoch für mich.
                                        Hab ich irgendwo her.
                                        Es funktioniert aber.

                                        1 Reply Last reply Reply Quote 0
                                        • bahnuhr
                                          bahnuhr Forum Testing Most Active last edited by

                                          @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                                          / "clock[^*]*l": true}/

                                          In 101 steht doch für *
                                          8c7549ca-e97b-4620-a7b8-27a6807753a2-image.png

                                          also doch jedes zeichen; und dann der quantifier für beliebig viele.

                                          Homoran 1 Reply Last reply Reply Quote 0
                                          • Homoran
                                            Homoran Global Moderator Administrators @bahnuhr last edited by Homoran

                                            @bahnuhr sagte in Adapter "log Parser" - Komma bereinigen:

                                            In 101 steht doch für *

                                            du brauchst ne Brille 😉

                                            das ist ein Punkt, und genau der will nicht innerhalb []

                                            und selbst wenn, das ^ steht für NICHT

                                            also NICHT jedes beliebige Zeichen ???

                                            bahnuhr 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

                                            947
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            komma log parser
                                            3
                                            37
                                            841
                                            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