Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. ioBroker Allgemein
  4. [Log Parser Adapter] Fragen zu Regex und Filterregeln

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.2k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.5k

[Log Parser Adapter] Fragen zu Regex und Filterregeln

Scheduled Pinned Locked Moved ioBroker Allgemein
adapterlogparserfilterregexparser
40 Posts 9 Posters 6.2k Views 13 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MicM Offline
    MicM Offline
    Mic
    Developer
    wrote on last edited by Mic
    #4

    @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

    [Alexa-Log-Script], Alexa_Laura_Volume

    Ich kann es nicht reproduzieren, bei mir geht das wunderbar.
    Mach mal bitte folgendes:

    1. Setze im Adapter bei Alexa-Filter: "Whitelist ODER": [Alexa-Log-Script], Alexa_Test_1 (Rest so lassen)

    2. Erstelle mal ein neues JavaScript im JS-Adapter, Name Alexa_Test_1

    3. In diesem Script führst du aus: log('-+-Laura Volume 30 07:32 Uhr-+-');

    NegaleinN 1 Reply Last reply
    0
    • MicM Mic

      @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

      [Alexa-Log-Script], Alexa_Laura_Volume

      Ich kann es nicht reproduzieren, bei mir geht das wunderbar.
      Mach mal bitte folgendes:

      1. Setze im Adapter bei Alexa-Filter: "Whitelist ODER": [Alexa-Log-Script], Alexa_Test_1 (Rest so lassen)

      2. Erstelle mal ein neues JavaScript im JS-Adapter, Name Alexa_Test_1

      3. In diesem Script führst du aus: log('-+-Laura Volume 30 07:32 Uhr-+-');

      NegaleinN Offline
      NegaleinN Offline
      Negalein
      Global Moderator
      wrote on last edited by
      #5

      @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

      Mach mal bitte folgendes:

      Sehr komisch das ganze!

      in 1.) funktioniert es, in 2.) nicht.
      Da wird dann aber durch 2.) auch nichts von [Alexa-Log-Script] reingeschrieben.
      instances - ioBroker (7).png
      log.gif

      ° Node.js: 20.17.0 NPM: 10.8.2
      ° Proxmox, Ubuntu 22.04.3 LTS
      ° Fixer ---> iob fix

      MicM 1 Reply Last reply
      0
      • NegaleinN Negalein

        @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

        Mach mal bitte folgendes:

        Sehr komisch das ganze!

        in 1.) funktioniert es, in 2.) nicht.
        Da wird dann aber durch 2.) auch nichts von [Alexa-Log-Script] reingeschrieben.
        instances - ioBroker (7).png
        log.gif

        MicM Offline
        MicM Offline
        Mic
        Developer
        wrote on last edited by
        #6

        @Negalein
        Ich kann es leider nicht reproduzieren, da es bei mir geht.

        • Aktuelle Adapter-Version nutzt du? War bis vor 30 Minuten noch die Version 0.4.5 (jetzt mit der 0.4.6 hat sich da aber nichts geändert)
        • node.js Version auch keine alte vermutlich, oder?
        • Du hast mit log('-+-Laura Volume 30 07:32 Uhr-+-'); getestet, richtig? Das JavaScript heißt "Alexa_Test_1"?
        NegaleinN 1 Reply Last reply
        0
        • MicM Mic

          @Negalein
          Ich kann es leider nicht reproduzieren, da es bei mir geht.

          • Aktuelle Adapter-Version nutzt du? War bis vor 30 Minuten noch die Version 0.4.5 (jetzt mit der 0.4.6 hat sich da aber nichts geändert)
          • node.js Version auch keine alte vermutlich, oder?
          • Du hast mit log('-+-Laura Volume 30 07:32 Uhr-+-'); getestet, richtig? Das JavaScript heißt "Alexa_Test_1"?
          NegaleinN Offline
          NegaleinN Offline
          Negalein
          Global Moderator
          wrote on last edited by
          #7

          @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

          Ich kann es leider nicht reproduzieren, da es bei mir geht.

          Ich verstehs auch nicht.

          Aktuelle Adapter-Version nutzt du? War bis vor 30 Minuten noch die Version 0.4.5 (jetzt mit der 0.4.6 hat sich da aber nichts geändert)

          Ja, vor einer halben Stunde upgedatet.

          node.js Version auch keine alte vermutlich, oder?

          Nö
          Node.js: 10.17.0 NPM: 6.11.3

          Du hast mit log('-+-Laura Volume 30 07:32 Uhr-+-'); getestet, richtig? Das JavaScript heißt "Alexa_Test_1"?

          Richtig

          Das komische ist, mach ich es getrennt, funktioniert es.

                {
                  "active": true,
                  "name": "Laura-Volume",
                  "whitelistAnd": "-+-",
                  "whitelistOr": "",
                  "blacklist": "/##\\{\\s?\\\".*\\\"\\s?\\}##/",
                  "debug": false,
                  "info": true,
                  "warn": false,
                  "error": false,
                  "clean": "/script.js.[^:]*: /, -+-",
                  "maxLength": "",
                  "merge": false,
                  "dateformat": "#DD.MM.# hh:mm"
                },
                {
                  "active": true,
                  "name": "Alexa",
                  "whitelistAnd": "[Alexa-Log-Script]",
                  "whitelistOr": "",
                  "blacklist": "",
                  "debug": false,
                  "info": true,
                  "warn": false,
                  "error": false,
                  "clean": "/script\.js\.[^:]*: \[Alexa-Log-Script\]/",
                  "maxLength": "",
                  "merge": false,
                  "dateformat": "#DD.MM.# hh:mm"
                },
          

          Mach ich beides in einem funktioniert [Alexa-Log-Script] auch nicht.

                {
                  "active": false,
                  "name": "Alexa",
                  "whitelistAnd": "*",
                  "whitelistOr": "[Alexa-Log-Script], Alexa_Test_1",
                  "blacklist": "",
                  "debug": false,
                  "info": true,
                  "warn": false,
                  "error": false,
                  "clean": "-+-, /script\.js\.[^:]*: \[Alexa-Log-Script\]/",
                  "maxLength": "",
                  "merge": false,
                  "dateformat": "#DD.MM.# hh:mm"
                }
          

          ° Node.js: 20.17.0 NPM: 10.8.2
          ° Proxmox, Ubuntu 22.04.3 LTS
          ° Fixer ---> iob fix

          MicM 1 Reply Last reply
          0
          • NegaleinN Negalein

            @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

            Ich kann es leider nicht reproduzieren, da es bei mir geht.

            Ich verstehs auch nicht.

            Aktuelle Adapter-Version nutzt du? War bis vor 30 Minuten noch die Version 0.4.5 (jetzt mit der 0.4.6 hat sich da aber nichts geändert)

            Ja, vor einer halben Stunde upgedatet.

            node.js Version auch keine alte vermutlich, oder?

            Nö
            Node.js: 10.17.0 NPM: 6.11.3

            Du hast mit log('-+-Laura Volume 30 07:32 Uhr-+-'); getestet, richtig? Das JavaScript heißt "Alexa_Test_1"?

            Richtig

            Das komische ist, mach ich es getrennt, funktioniert es.

                  {
                    "active": true,
                    "name": "Laura-Volume",
                    "whitelistAnd": "-+-",
                    "whitelistOr": "",
                    "blacklist": "/##\\{\\s?\\\".*\\\"\\s?\\}##/",
                    "debug": false,
                    "info": true,
                    "warn": false,
                    "error": false,
                    "clean": "/script.js.[^:]*: /, -+-",
                    "maxLength": "",
                    "merge": false,
                    "dateformat": "#DD.MM.# hh:mm"
                  },
                  {
                    "active": true,
                    "name": "Alexa",
                    "whitelistAnd": "[Alexa-Log-Script]",
                    "whitelistOr": "",
                    "blacklist": "",
                    "debug": false,
                    "info": true,
                    "warn": false,
                    "error": false,
                    "clean": "/script\.js\.[^:]*: \[Alexa-Log-Script\]/",
                    "maxLength": "",
                    "merge": false,
                    "dateformat": "#DD.MM.# hh:mm"
                  },
            

            Mach ich beides in einem funktioniert [Alexa-Log-Script] auch nicht.

                  {
                    "active": false,
                    "name": "Alexa",
                    "whitelistAnd": "*",
                    "whitelistOr": "[Alexa-Log-Script], Alexa_Test_1",
                    "blacklist": "",
                    "debug": false,
                    "info": true,
                    "warn": false,
                    "error": false,
                    "clean": "-+-, /script\.js\.[^:]*: \[Alexa-Log-Script\]/",
                    "maxLength": "",
                    "merge": false,
                    "dateformat": "#DD.MM.# hh:mm"
                  }
            
            MicM Offline
            MicM Offline
            Mic
            Developer
            wrote on last edited by
            #8

            @Negalein
            Gibts ja nicht...
            Noch ein Versuch:
            Ersetze mal unter "Whitelist ODER" [Alexa-Log-Script], Alexa_Test_1 durch [Alexa-Log-Script], -+-

            NegaleinN 1 Reply Last reply
            0
            • MicM Mic

              @Negalein
              Gibts ja nicht...
              Noch ein Versuch:
              Ersetze mal unter "Whitelist ODER" [Alexa-Log-Script], Alexa_Test_1 durch [Alexa-Log-Script], -+-

              NegaleinN Offline
              NegaleinN Offline
              Negalein
              Global Moderator
              wrote on last edited by
              #9

              @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

              Noch ein Versuch:

              Fehlerbild bleibt

              Es wird nichts von [Alexa-Log-Script] und auch nichts von -+- angezeigt.

              ° Node.js: 20.17.0 NPM: 10.8.2
              ° Proxmox, Ubuntu 22.04.3 LTS
              ° Fixer ---> iob fix

              MicM 1 Reply Last reply
              0
              • NegaleinN Negalein

                @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                Noch ein Versuch:

                Fehlerbild bleibt

                Es wird nichts von [Alexa-Log-Script] und auch nichts von -+- angezeigt.

                MicM Offline
                MicM Offline
                Mic
                Developer
                wrote on last edited by Mic
                #10

                @Negalein
                Verstehe ich nicht.
                Ich setze z.B. folgenden Filter:
                f1.png

                Dann setze ich folgendes in einem beliebigen JavaScript ab:

                log('TEST A: [Alexa-Log-Script] Test');
                log('TEST B: -+- Test');
                

                Dann kommt alles schön an (Datenpunkt logparser.0.filters.Test.json)

                [
                	{
                		"date": "Heute 14:40",
                		"severity": "<span class='logInfo'>info</span>",
                		"from": "javascript.0",
                		"message": "script.js.Test_1: TEST B: -+- Test",
                		"ts": 1586781652664
                	},
                	{
                		"date": "Heute 14:40",
                		"severity": "<span class='logInfo'>info</span>",
                		"from": "javascript.0",
                		"message": "script.js.Test_1: TEST A: [Alexa-Log-Script] Test",
                		"ts": 1586781652664
                	}
                ]
                
                NegaleinN 1 Reply Last reply
                0
                • MicM Mic

                  @Negalein
                  Verstehe ich nicht.
                  Ich setze z.B. folgenden Filter:
                  f1.png

                  Dann setze ich folgendes in einem beliebigen JavaScript ab:

                  log('TEST A: [Alexa-Log-Script] Test');
                  log('TEST B: -+- Test');
                  

                  Dann kommt alles schön an (Datenpunkt logparser.0.filters.Test.json)

                  [
                  	{
                  		"date": "Heute 14:40",
                  		"severity": "<span class='logInfo'>info</span>",
                  		"from": "javascript.0",
                  		"message": "script.js.Test_1: TEST B: -+- Test",
                  		"ts": 1586781652664
                  	},
                  	{
                  		"date": "Heute 14:40",
                  		"severity": "<span class='logInfo'>info</span>",
                  		"from": "javascript.0",
                  		"message": "script.js.Test_1: TEST A: [Alexa-Log-Script] Test",
                  		"ts": 1586781652664
                  	}
                  ]
                  
                  NegaleinN Offline
                  NegaleinN Offline
                  Negalein
                  Global Moderator
                  wrote on last edited by Negalein
                  #11

                  @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                  Verstehe ich nicht.

                  Ich hab jetzt mal komplett neu erstellt.
                  instances - ioBroker (9).png
                  Da funktioniert es. Nur der Regex in Bereinigen will nicht ganz.
                  -+-, /script\.js\.[^:]*: \[Alexa-Log-Script]/
                  vis (21).png

                  ° Node.js: 20.17.0 NPM: 10.8.2
                  ° Proxmox, Ubuntu 22.04.3 LTS
                  ° Fixer ---> iob fix

                  MicM 1 Reply Last reply
                  0
                  • NegaleinN Negalein

                    @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                    Verstehe ich nicht.

                    Ich hab jetzt mal komplett neu erstellt.
                    instances - ioBroker (9).png
                    Da funktioniert es. Nur der Regex in Bereinigen will nicht ganz.
                    -+-, /script\.js\.[^:]*: \[Alexa-Log-Script]/
                    vis (21).png

                    MicM Offline
                    MicM Offline
                    Mic
                    Developer
                    wrote on last edited by
                    #12

                    @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                    Da funktioniert es.

                    Ok, super.

                    Nur der Regex in Bereinigen will nicht ganz.

                    Trag da mal ein: /script\.js\.[^:]*: /, [Alexa-Log-Script], -+-

                    NegaleinN 1 Reply Last reply
                    0
                    • MicM Mic

                      @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                      Da funktioniert es.

                      Ok, super.

                      Nur der Regex in Bereinigen will nicht ganz.

                      Trag da mal ein: /script\.js\.[^:]*: /, [Alexa-Log-Script], -+-

                      NegaleinN Offline
                      NegaleinN Offline
                      Negalein
                      Global Moderator
                      wrote on last edited by
                      #13

                      @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                      Ok, super.
                      Trag da mal ein: /script.js.[^:]*: /, [Alexa-Log-Script], -+-

                      Perfekt, es läuft!
                      War eine schwere Geburt! ;)
                      Hast du eine Kaffeekassa?

                      vis (22).png

                      ° Node.js: 20.17.0 NPM: 10.8.2
                      ° Proxmox, Ubuntu 22.04.3 LTS
                      ° Fixer ---> iob fix

                      MicM 1 Reply Last reply
                      0
                      • NegaleinN Negalein

                        @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                        Ok, super.
                        Trag da mal ein: /script.js.[^:]*: /, [Alexa-Log-Script], -+-

                        Perfekt, es läuft!
                        War eine schwere Geburt! ;)
                        Hast du eine Kaffeekassa?

                        vis (22).png

                        MicM Offline
                        MicM Offline
                        Mic
                        Developer
                        wrote on last edited by
                        #14

                        @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                        Perfekt, es läuft!
                        War eine schwere Geburt! ;)
                        Hast du eine Kaffeekassa?

                        Das war's wirklich :-)
                        Danke, noch nicht, sollte ich vielleicht mal bei Gelegenheit einrichten...
                        Aber ich helfe gerne und danke dir fürs Testen, will den Adapter möglichst bald ins Latest bekommen, und da brauche ich euer Feedback...

                        @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                        /script\.js\.[^:]*: /

                        Das wäre evtl. auch was als globale Option im Adapter, also dass bei JavaScript-Logs grundsätzlich optional der ganze erste Teil script.js.Script-Pfad.Script-Name: rausgeschnitten wird.

                        NegaleinN GlasfaserG 2 Replies Last reply
                        1
                        • MicM Mic

                          @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                          Perfekt, es läuft!
                          War eine schwere Geburt! ;)
                          Hast du eine Kaffeekassa?

                          Das war's wirklich :-)
                          Danke, noch nicht, sollte ich vielleicht mal bei Gelegenheit einrichten...
                          Aber ich helfe gerne und danke dir fürs Testen, will den Adapter möglichst bald ins Latest bekommen, und da brauche ich euer Feedback...

                          @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                          /script\.js\.[^:]*: /

                          Das wäre evtl. auch was als globale Option im Adapter, also dass bei JavaScript-Logs grundsätzlich optional der ganze erste Teil script.js.Script-Pfad.Script-Name: rausgeschnitten wird.

                          NegaleinN Offline
                          NegaleinN Offline
                          Negalein
                          Global Moderator
                          wrote on last edited by
                          #15

                          @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                          Danke, noch nicht, sollte ich vielleicht mal bei Gelegenheit einrichten...

                          schick mir per Chat mal deine Paypal :)

                          Aber ich helfe gerne und danke dir fürs Testen

                          Jetzt teste ich noch, dass ich die 2 derzeit deaktivierten "Alexa" und "Laura-Volume" im Adapter lösche, die beiden DP lösche und dann wieder im Adapter "Test" zu "Alexa" umbenenne.

                          ° Node.js: 20.17.0 NPM: 10.8.2
                          ° Proxmox, Ubuntu 22.04.3 LTS
                          ° Fixer ---> iob fix

                          1 Reply Last reply
                          0
                          • MicM Mic

                            @Negalein sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                            Perfekt, es läuft!
                            War eine schwere Geburt! ;)
                            Hast du eine Kaffeekassa?

                            Das war's wirklich :-)
                            Danke, noch nicht, sollte ich vielleicht mal bei Gelegenheit einrichten...
                            Aber ich helfe gerne und danke dir fürs Testen, will den Adapter möglichst bald ins Latest bekommen, und da brauche ich euer Feedback...

                            @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                            /script\.js\.[^:]*: /

                            Das wäre evtl. auch was als globale Option im Adapter, also dass bei JavaScript-Logs grundsätzlich optional der ganze erste Teil script.js.Script-Pfad.Script-Name: rausgeschnitten wird.

                            GlasfaserG Offline
                            GlasfaserG Offline
                            Glasfaser
                            wrote on last edited by Glasfaser
                            #16

                            @Mic sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                            Das wäre evtl. auch was als globale Option im Adapter,

                            Dann ist das Filterfeld ( Bereinigen ) auch nicht so vollgepackt :+1:

                            ... bei dem Platzbedarf im Feld Bereinigen :sunglasses:

                            Synology 918+ 16GB - ioBroker in Docker v9 , VISO auf Trekstor Primebook C13 13,3" , Hikvision Domkameras mit Surveillance Station .. CCU RaspberryMatic in Synology VM .. Zigbee CC2538+CC2592 .. Sonoff .. KNX .. Modbus ..

                            1 Reply Last reply
                            0
                            • IccubeI Offline
                              IccubeI Offline
                              Iccube
                              wrote on last edited by
                              #17

                              Hallo,
                              habe mal ne frage zu den Filterregeln Globale Blacklist verstehe das noch nicht so ganz.
                              Habe das in Globale Blacklist eingetragen :

                              /instance system\.adapter\.[^\s]*  Terminated (NO_ERROR): Without reason/
                              

                              Wird aber Trozdem unter Info angezeigt
                              log pareser.png
                              log pareser_1.png

                              MicM 1 Reply Last reply
                              0
                              • IccubeI Iccube

                                Hallo,
                                habe mal ne frage zu den Filterregeln Globale Blacklist verstehe das noch nicht so ganz.
                                Habe das in Globale Blacklist eingetragen :

                                /instance system\.adapter\.[^\s]*  Terminated (NO_ERROR): Without reason/
                                

                                Wird aber Trozdem unter Info angezeigt
                                log pareser.png
                                log pareser_1.png

                                MicM Offline
                                MicM Offline
                                Mic
                                Developer
                                wrote on last edited by
                                #18

                                @Iccube
                                Gehe mal im ioBroker Admin links auf "Log", dann oben "LOG HERUNTERLADEN" und da dann die entsprechende Logzeile komplett kopieren und hier in Code-Tags einfügen.

                                IccubeI BBTownB 2 Replies Last reply
                                0
                                • MicM Mic

                                  @Iccube
                                  Gehe mal im ioBroker Admin links auf "Log", dann oben "LOG HERUNTERLADEN" und da dann die entsprechende Logzeile komplett kopieren und hier in Code-Tags einfügen.

                                  IccubeI Offline
                                  IccubeI Offline
                                  Iccube
                                  wrote on last edited by
                                  #19

                                  @Mic

                                  2020-04-27 19:20:00.021 - info: host.iobroker instance system.adapter.dwd.0 started with pid 4722
                                  2020-04-27 19:20:00.623 - info: dwd.0 (4722) starting. Version 2.4.7 in /opt/iobroker/node_modules/iobroker.dwd, node: v12.16.2, js-controller: 3.0.19
                                  2020-04-27 19:20:01.376 - info: dwd.0 (4722) Terminated (NO_ERROR): Without reason
                                  2020-04-27 19:20:01.880 - info: host.iobroker instance system.adapter.dwd.0 terminated with code 0 (NO_ERROR)
                                  
                                  MicM 1 Reply Last reply
                                  0
                                  • MicM Mic

                                    @Iccube
                                    Gehe mal im ioBroker Admin links auf "Log", dann oben "LOG HERUNTERLADEN" und da dann die entsprechende Logzeile komplett kopieren und hier in Code-Tags einfügen.

                                    BBTownB Offline
                                    BBTownB Offline
                                    BBTown
                                    wrote on last edited by
                                    #20

                                    @Mic

                                    Hast Du eine Idee für mich weshalb die Angaben von alexa2.0.History.json nicht in logparser.0.filters.Alexa.json landen?
                                    c64c8188-8eca-4d19-a3df-dff05fed42cb-grafik.png

                                    ede76d40-bc16-424f-8ff9-274274561e38-grafik.png

                                    /******************************************************************************************************
                                    * JavaScript Adapter Script for Log-Parser-Adapter: https://github.com/Mic-M/ioBroker.logparser
                                    * --------------------------------------------------------------
                                    * Purpose: Get the history of all spoken Alexa commands into the log
                                    *          Required: Alexa adapter - https://github.com/Apollon77/ioBroker.alexa2
                                    * Source:  https://github.com/Mic-M/ioBroker.logparser
                                    * Autor:   Mic-M (Github) | Mic (ioBroker)
                                    * --------------------------------------------------------------------------------------
                                    * Change Log:
                                    *  1.0.0  Mic-M   * Adoption to Log Parser Adapter
                                    *  0.1.0  Mic-M   * Initial release (for Log Script - https://github.com/Mic-M/iobroker.logfile-script).
                                    ******************************************************************************************************/
                                    
                                    /******************************************************************************************************
                                    * Script Settings
                                    ******************************************************************************************************/
                                    
                                    // **Capitalize First Letters**
                                    // The spoken command to Alexa is being returned in lowercase, like "turn on kitchen light". 
                                    // With this option set to true, the output will be "Turn On Kitchen Light" (so capitalized first letter of each word)
                                    const g_capFirstLetters = true;
                                    
                                    
                                    /******************************************************************************************************
                                    * End of Script Settings. Please do not change anything below here.
                                    ******************************************************************************************************/
                                    
                                    main();
                                    function main() {
                                       // All Alexa adapter instances, so alexa2.0.History.json, alexa2.1.History.json, alexa2.2.History.json, etc.
                                       on({id: /^alexa2\.\d\.History\.json$/, change:'any'}, function(obj) {
                                    
                                           // obj.state.val: JSON string of object.
                                           // Like: {"name":"Alexa Flur","serialNumber":"xxxxxxxxxx","summary":"Wohnlicht an","creationTime":1582843794820, ... }
                                           let objHistory = JSON.parse(obj.state.val); 
                                    
                                           // ignore alexa keywords or empty value.
                                           if(! (['', 'alexa','echo','computer'].includes(objHistory['summary']) )) {
                                               // ignore "sprich mir nach"
                                               if (!(objHistory['summary'].includes('sprich mir nach '))) {
                                                   log('[Alexa-Log-Script] ##{"message":"' + formatAlexaSummary(objHistory['summary']) + '", "from":"' + objHistory['name'] + '"}##');
                                               }
                                           }
                                       });
                                    }
                                    
                                    /**
                                    * Formats the Alexa summary text accordingly.
                                    * @param {string} summaryText   The summary text
                                    * @return {string} the formatted summary
                                    */
                                    function formatAlexaSummary(summaryText) {
                                       if (g_capFirstLetters) summaryText = summaryText.replace(/(^|\s)\S/g, l => l.toUpperCase()); // Capitalize if set. https://stackoverflow.com/questions/2332811/
                                       return summaryText;
                                    }
                                    


                                    8d5bc591-942f-4ecd-8d6f-613fa684b2db-grafik.png

                                    ioBroker auf NUC (VM debian v13 (Trixie ), node v22.21.0 npm v10.9.4, js-controller v7.1.0 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

                                    MicM 1 Reply Last reply
                                    0
                                    • IccubeI Iccube

                                      @Mic

                                      2020-04-27 19:20:00.021 - info: host.iobroker instance system.adapter.dwd.0 started with pid 4722
                                      2020-04-27 19:20:00.623 - info: dwd.0 (4722) starting. Version 2.4.7 in /opt/iobroker/node_modules/iobroker.dwd, node: v12.16.2, js-controller: 3.0.19
                                      2020-04-27 19:20:01.376 - info: dwd.0 (4722) Terminated (NO_ERROR): Without reason
                                      2020-04-27 19:20:01.880 - info: host.iobroker instance system.adapter.dwd.0 terminated with code 0 (NO_ERROR)
                                      
                                      MicM Offline
                                      MicM Offline
                                      Mic
                                      Developer
                                      wrote on last edited by
                                      #21

                                      @Iccube
                                      /instance system\.adapter\.[^\s]* Terminated (NO_ERROR): Without reason/ würde eine Logzeile wie diese hier erwarten:

                                      host.ctioBroker instance system.adapter.dwd.0 Terminated (NO_ERROR): Without reason
                                      

                                      Bei dir ist die Logausgabe aber anders.
                                      Mache einfach mal das hier in der Global Blacklist: Terminated (NO_ERROR): Without reason
                                      Das brauchst du wohl bei anderen Adaptern auch nicht, daher generisch.

                                      IccubeI 1 Reply Last reply
                                      0
                                      • BBTownB BBTown

                                        @Mic

                                        Hast Du eine Idee für mich weshalb die Angaben von alexa2.0.History.json nicht in logparser.0.filters.Alexa.json landen?
                                        c64c8188-8eca-4d19-a3df-dff05fed42cb-grafik.png

                                        ede76d40-bc16-424f-8ff9-274274561e38-grafik.png

                                        /******************************************************************************************************
                                        * JavaScript Adapter Script for Log-Parser-Adapter: https://github.com/Mic-M/ioBroker.logparser
                                        * --------------------------------------------------------------
                                        * Purpose: Get the history of all spoken Alexa commands into the log
                                        *          Required: Alexa adapter - https://github.com/Apollon77/ioBroker.alexa2
                                        * Source:  https://github.com/Mic-M/ioBroker.logparser
                                        * Autor:   Mic-M (Github) | Mic (ioBroker)
                                        * --------------------------------------------------------------------------------------
                                        * Change Log:
                                        *  1.0.0  Mic-M   * Adoption to Log Parser Adapter
                                        *  0.1.0  Mic-M   * Initial release (for Log Script - https://github.com/Mic-M/iobroker.logfile-script).
                                        ******************************************************************************************************/
                                        
                                        /******************************************************************************************************
                                        * Script Settings
                                        ******************************************************************************************************/
                                        
                                        // **Capitalize First Letters**
                                        // The spoken command to Alexa is being returned in lowercase, like "turn on kitchen light". 
                                        // With this option set to true, the output will be "Turn On Kitchen Light" (so capitalized first letter of each word)
                                        const g_capFirstLetters = true;
                                        
                                        
                                        /******************************************************************************************************
                                        * End of Script Settings. Please do not change anything below here.
                                        ******************************************************************************************************/
                                        
                                        main();
                                        function main() {
                                           // All Alexa adapter instances, so alexa2.0.History.json, alexa2.1.History.json, alexa2.2.History.json, etc.
                                           on({id: /^alexa2\.\d\.History\.json$/, change:'any'}, function(obj) {
                                        
                                               // obj.state.val: JSON string of object.
                                               // Like: {"name":"Alexa Flur","serialNumber":"xxxxxxxxxx","summary":"Wohnlicht an","creationTime":1582843794820, ... }
                                               let objHistory = JSON.parse(obj.state.val); 
                                        
                                               // ignore alexa keywords or empty value.
                                               if(! (['', 'alexa','echo','computer'].includes(objHistory['summary']) )) {
                                                   // ignore "sprich mir nach"
                                                   if (!(objHistory['summary'].includes('sprich mir nach '))) {
                                                       log('[Alexa-Log-Script] ##{"message":"' + formatAlexaSummary(objHistory['summary']) + '", "from":"' + objHistory['name'] + '"}##');
                                                   }
                                               }
                                           });
                                        }
                                        
                                        /**
                                        * Formats the Alexa summary text accordingly.
                                        * @param {string} summaryText   The summary text
                                        * @return {string} the formatted summary
                                        */
                                        function formatAlexaSummary(summaryText) {
                                           if (g_capFirstLetters) summaryText = summaryText.replace(/(^|\s)\S/g, l => l.toUpperCase()); // Capitalize if set. https://stackoverflow.com/questions/2332811/
                                           return summaryText;
                                        }
                                        


                                        8d5bc591-942f-4ecd-8d6f-613fa684b2db-grafik.png

                                        MicM Offline
                                        MicM Offline
                                        Mic
                                        Developer
                                        wrote on last edited by
                                        #22

                                        @BBTown sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                                        @Mic

                                        Hast Du eine Idee für mich weshalb die Angaben von alexa2.0.History.json nicht in logparser.0.filters.Alexa.json landen?
                                        c64c8188-8eca-4d19-a3df-dff05fed42cb-grafik.png

                                        ede76d40-bc16-424f-8ff9-274274561e38-grafik.png

                                        /******************************************************************************************************
                                        * JavaScript Adapter Script for Log-Parser-Adapter: https://github.com/Mic-M/ioBroker.logparser
                                        * --------------------------------------------------------------
                                        * Purpose: Get the history of all spoken Alexa commands into the log
                                        *          Required: Alexa adapter - https://github.com/Apollon77/ioBroker.alexa2
                                        * Source:  https://github.com/Mic-M/ioBroker.logparser
                                        * Autor:   Mic-M (Github) | Mic (ioBroker)
                                        * --------------------------------------------------------------------------------------
                                        * Change Log:
                                        *  1.0.0  Mic-M   * Adoption to Log Parser Adapter
                                        *  0.1.0  Mic-M   * Initial release (for Log Script - https://github.com/Mic-M/iobroker.logfile-script).
                                        ******************************************************************************************************/
                                        
                                        /******************************************************************************************************
                                        * Script Settings
                                        ******************************************************************************************************/
                                        
                                        // **Capitalize First Letters**
                                        // The spoken command to Alexa is being returned in lowercase, like "turn on kitchen light". 
                                        // With this option set to true, the output will be "Turn On Kitchen Light" (so capitalized first letter of each word)
                                        const g_capFirstLetters = true;
                                        
                                        
                                        /******************************************************************************************************
                                        * End of Script Settings. Please do not change anything below here.
                                        ******************************************************************************************************/
                                        
                                        main();
                                        function main() {
                                           // All Alexa adapter instances, so alexa2.0.History.json, alexa2.1.History.json, alexa2.2.History.json, etc.
                                           on({id: /^alexa2\.\d\.History\.json$/, change:'any'}, function(obj) {
                                        
                                               // obj.state.val: JSON string of object.
                                               // Like: {"name":"Alexa Flur","serialNumber":"xxxxxxxxxx","summary":"Wohnlicht an","creationTime":1582843794820, ... }
                                               let objHistory = JSON.parse(obj.state.val); 
                                        
                                               // ignore alexa keywords or empty value.
                                               if(! (['', 'alexa','echo','computer'].includes(objHistory['summary']) )) {
                                                   // ignore "sprich mir nach"
                                                   if (!(objHistory['summary'].includes('sprich mir nach '))) {
                                                       log('[Alexa-Log-Script] ##{"message":"' + formatAlexaSummary(objHistory['summary']) + '", "from":"' + objHistory['name'] + '"}##');
                                                   }
                                               }
                                           });
                                        }
                                        
                                        /**
                                        * Formats the Alexa summary text accordingly.
                                        * @param {string} summaryText   The summary text
                                        * @return {string} the formatted summary
                                        */
                                        function formatAlexaSummary(summaryText) {
                                           if (g_capFirstLetters) summaryText = summaryText.replace(/(^|\s)\S/g, l => l.toUpperCase()); // Capitalize if set. https://stackoverflow.com/questions/2332811/
                                           return summaryText;
                                        }
                                        


                                        8d5bc591-942f-4ecd-8d6f-613fa684b2db-grafik.png

                                        1. Ist das von dir gepostete Script identisch mit https://github.com/Mic-M/ioBroker.logparser/blob/master/accessories/alexa-history.js ?
                                        2. Sichergestellt, dass das Script läuft?
                                        3. Was steht genau in "Whitelist UND"? Nur das hier: [Alexa-Log-Script] - ohne Leerzeichen?
                                        4. Adapterversion ist frisch von Github installiert?
                                        5. Getestet mit neuem Alexa-Kommando, nachdem Script und Logparser-Adapter gestartet und ein paar Sekunden gewartet wurde?
                                        BBTownB 1 Reply Last reply
                                        0
                                        • MicM Mic

                                          @BBTown sagte in [Log Parser Adapter] Fragen zu Regex und Filterregeln:

                                          @Mic

                                          Hast Du eine Idee für mich weshalb die Angaben von alexa2.0.History.json nicht in logparser.0.filters.Alexa.json landen?
                                          c64c8188-8eca-4d19-a3df-dff05fed42cb-grafik.png

                                          ede76d40-bc16-424f-8ff9-274274561e38-grafik.png

                                          /******************************************************************************************************
                                          * JavaScript Adapter Script for Log-Parser-Adapter: https://github.com/Mic-M/ioBroker.logparser
                                          * --------------------------------------------------------------
                                          * Purpose: Get the history of all spoken Alexa commands into the log
                                          *          Required: Alexa adapter - https://github.com/Apollon77/ioBroker.alexa2
                                          * Source:  https://github.com/Mic-M/ioBroker.logparser
                                          * Autor:   Mic-M (Github) | Mic (ioBroker)
                                          * --------------------------------------------------------------------------------------
                                          * Change Log:
                                          *  1.0.0  Mic-M   * Adoption to Log Parser Adapter
                                          *  0.1.0  Mic-M   * Initial release (for Log Script - https://github.com/Mic-M/iobroker.logfile-script).
                                          ******************************************************************************************************/
                                          
                                          /******************************************************************************************************
                                          * Script Settings
                                          ******************************************************************************************************/
                                          
                                          // **Capitalize First Letters**
                                          // The spoken command to Alexa is being returned in lowercase, like "turn on kitchen light". 
                                          // With this option set to true, the output will be "Turn On Kitchen Light" (so capitalized first letter of each word)
                                          const g_capFirstLetters = true;
                                          
                                          
                                          /******************************************************************************************************
                                          * End of Script Settings. Please do not change anything below here.
                                          ******************************************************************************************************/
                                          
                                          main();
                                          function main() {
                                             // All Alexa adapter instances, so alexa2.0.History.json, alexa2.1.History.json, alexa2.2.History.json, etc.
                                             on({id: /^alexa2\.\d\.History\.json$/, change:'any'}, function(obj) {
                                          
                                                 // obj.state.val: JSON string of object.
                                                 // Like: {"name":"Alexa Flur","serialNumber":"xxxxxxxxxx","summary":"Wohnlicht an","creationTime":1582843794820, ... }
                                                 let objHistory = JSON.parse(obj.state.val); 
                                          
                                                 // ignore alexa keywords or empty value.
                                                 if(! (['', 'alexa','echo','computer'].includes(objHistory['summary']) )) {
                                                     // ignore "sprich mir nach"
                                                     if (!(objHistory['summary'].includes('sprich mir nach '))) {
                                                         log('[Alexa-Log-Script] ##{"message":"' + formatAlexaSummary(objHistory['summary']) + '", "from":"' + objHistory['name'] + '"}##');
                                                     }
                                                 }
                                             });
                                          }
                                          
                                          /**
                                          * Formats the Alexa summary text accordingly.
                                          * @param {string} summaryText   The summary text
                                          * @return {string} the formatted summary
                                          */
                                          function formatAlexaSummary(summaryText) {
                                             if (g_capFirstLetters) summaryText = summaryText.replace(/(^|\s)\S/g, l => l.toUpperCase()); // Capitalize if set. https://stackoverflow.com/questions/2332811/
                                             return summaryText;
                                          }
                                          


                                          8d5bc591-942f-4ecd-8d6f-613fa684b2db-grafik.png

                                          1. Ist das von dir gepostete Script identisch mit https://github.com/Mic-M/ioBroker.logparser/blob/master/accessories/alexa-history.js ?
                                          2. Sichergestellt, dass das Script läuft?
                                          3. Was steht genau in "Whitelist UND"? Nur das hier: [Alexa-Log-Script] - ohne Leerzeichen?
                                          4. Adapterversion ist frisch von Github installiert?
                                          5. Getestet mit neuem Alexa-Kommando, nachdem Script und Logparser-Adapter gestartet und ein paar Sekunden gewartet wurde?
                                          BBTownB Offline
                                          BBTownB Offline
                                          BBTown
                                          wrote on last edited by BBTown
                                          #23

                                          @Mic

                                          Ist das von dir gepostete Script identisch mit https://github.com/Mic-M/ioBroker.logparser/blob/master/accessories/alexa-history.js ?
                                          Sichergestellt, dass das Script läuft?
                                          Was steht genau in "Whitelist UND"? Nur das hier: [Alexa-Log-Script] - ohne Leerzeichen?
                                          Adapterversion ist frisch von Github installiert?
                                          Getestet mit neuem Alexa-Kommando, nachdem Script und Logparser-Adapter gestartet und ein paar Sekunden gewartet wurde?

                                          Ich kann alles mit "Ja" beantworten, daher meine Verwunderung
                                          Es passieren ja nicht wirklich komplizierte Dinge.
                                          Das Script ist auch relativ simple und klar

                                          a257db2f-3a11-4a72-90f0-a4ac168eca77-grafik.png

                                          ioBroker auf NUC (VM debian v13 (Trixie ), node v22.21.0 npm v10.9.4, js-controller v7.1.0 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

                                          MicM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

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

                                          755

                                          Online

                                          32.5k

                                          Users

                                          81.7k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe