Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. RegEx Probleme

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    RegEx Probleme

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

      Hallo,

      ich bin dran den rpi Adapter umzuschreiben auf mein System (Debian VM) auf Synology Nas.

      "native": {
              "c_cpu": true,
              "c_raspberry": false,
              "c_memory": true,
              "c_network": true,
              "c_sdcard": true,
              "c_swap": true,
              "c_temperature": true,
              "c_uptime": true,
              "c_wlan": true,
              "interval": 60000,
              "cpu": {
                  "cpu_frequency": {
                      "command": "cat /proc/cpuinfo",
                      "regexp": "cpu\\sMHz\\s+:\\s(\\d+).\\d+",
                      "post": "$1"
                  },
                  "load1,load5,load15": {
                      "command": "cat /proc/loadavg",
                      "regexp": "^(\\S+)\\s(\\S+)\\s(\\S+)",
                      "post": ""
                  },
                  "scaling_governor": {
                      "command": "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor",
                      "regexp": "(.*)",
                      "post": ""
                  }
              },
      
      cat /proc/cpuinfo
      processor       : 0
      vendor_id       : GenuineIntel
      cpu family      : 6
      model           : 92
      model name      : Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
      stepping        : 9
      microcode       : 0x1
      cpu MHz         : 1497.610
      cache size      : 1024 KB
      physical id     : 0
      siblings        : 2
      core id         : 0
      cpu cores       : 2
      apicid          : 0
      initial apicid  : 0
      fpu             : yes
      fpu_exception   : yes
      cpuid level     : 13
      wp              : yes
      flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes rdrand hypervisor lahf_lm 3dnowprefetch tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust smep erms mpx rdseed smap clflushopt
      bugs            :
      bogomips        : 2995.22
      clflush size    : 64
      cache_alignment : 64
      address sizes   : 40 bits physical, 48 bits virtual
      power management:
      
      processor       : 1
      vendor_id       : GenuineIntel
      cpu family      : 6
      model           : 92
      model name      : Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
      stepping        : 9
      microcode       : 0x1
      cpu MHz         : 1497.610
      cache size      : 1024 KB
      physical id     : 0
      siblings        : 2
      core id         : 1
      cpu cores       : 2
      apicid          : 1
      initial apicid  : 1
      fpu             : yes
      fpu_exception   : yes
      cpuid level     : 13
      wp              : yes
      flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes rdrand hypervisor lahf_lm 3dnowprefetch tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust smep erms mpx rdseed smap clflushopt
      bugs            :
      bogomips        : 2995.22
      clflush size    : 64
      cache_alignment : 64
      address sizes   : 40 bits physical, 48 bits virtual
      power management:
      

      Im Broker kommt:

      rpi2.0 2017-12-15 10:49:48.010 error No Value found for cpu_frequency

      Wer hat eine Ahnung warum das nicht funktioniert?

      Im Regex Tester funtioniert es.

      Viele Grüße

      Marcel Jaud

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

        Ich habe mal den Code in Code-Tags gesetzt.

        Was bitte machst du da?

        und wie genau gehst du vor?

        Gruß

        Rainer

        1 Reply Last reply Reply Quote 0
        • J
          Jautze last edited by

          Hallo,

          Also oben der Code ist vom rpi2 json File.

          "cpu_frequency": {

          "command": "cat /proc/cpuinfo",

          "regexp": "cpu\sMHz\s+:\s(\d+).\d+",

          "post": "$1"

          }

          Da versuche ich die CPU Frequenz aus der cpuinfo auszulesen und per Regex zu bekommen.

          Aber ich bekomme ein Fehler in iobroker.

          Danke und viele Grüße

          Marcel Jaud

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

            Bei mir funktioniert die Abfrage mit dem RegExp (Debian 9, CSI nuk)

            Übrigens, ich habe den rpi-Adapter durch den Systeminfo-Adapter ersetzt, da kannst alles - und mehr abfragen!

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

            Support us

            ioBroker
            Community Adapters
            Donate

            784
            Online

            31.7k
            Users

            79.8k
            Topics

            1.3m
            Posts

            3
            4
            508
            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