Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. getIdByName gibt nach Update Dubletten zurück

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    getIdByName gibt nach Update Dubletten zurück

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

      Hi, ich habe letzte Woche alle Komponenten, inkl. NodeJS hochgezogen und nun habe ich das Verhalten, dass alle meine Skripte, in denen ich getIdByName immer ein Array zurückgeben, indem der Datenpunkt mehrfach vorkommt.
      Vor dem Update gab es immer nur ein Ergebnis, weil ich alle Objekte immer einzigartig benannt habe, sodass es keine Überschneidungen gibt.
      Bsp:

      var WerteKlima = getIdByName("Klimatisierung_Schlafzimmer");
      log("Werte Klima: " + WerteKlima.toString())
      

      Ergebnis:

      12:45:29.842	info	javascript.0 (7687) script.js.common.Test: Werte Klima: hm-rega.0.94755,hm-rega.0.94755,hm-rega.0.94755,hm-rega.0.94755
      

      Es ist genau dreimal die gleiche ID. Im Objektbaum gibt es auch nur ein Objekt unter dem Namen.

      Hat jemand auch ein solches Verhalten?
      JS-Controller: 5.0.12
      Javascript: 7.1.4

      paul53 Homoran 2 Replies Last reply Reply Quote 0
      • paul53
        paul53 @Watakan last edited by

        @watakan sagte: Hat jemand auch ein solches Verhalten?

        Kann ich bei mir nicht nachvollziehen (gleiche Versionen): Es wird ein String mit einer ID geliefert.

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

          @watakan bitte iob diag in der Langfassung

          1 Reply Last reply Reply Quote 0
          • W
            Watakan last edited by

            Hi, hier einmal die Langfassung:

            Skript v.2023-06-20
            
            *** BASE SYSTEM ***
            Hardware Vendor : Synology
            Kernel          : x86_64
            Userland        : amd64
            Docker          : v8.1.0
            Virtualization  : Docker
            Kernel          : x86_64
            Userland        : amd64
            
            Systemuptime and Load:
             13:58:26 up 88 days,  3:43,  0 users,  load average: 2.05, 2.66, 2.48
            CPU threads: 4
            
            
            *** Time and Time Zones ***
            Tue Sep 26 11:58:26 UTC 2023
            Tue Sep 26 13:58:26 CEST 2023
            CEST +0200
            Etc/UTC
            
            *** User and Groups ***
            root
            /root
            root
            
            *** X-Server-Setup ***
            X-Server:       false
            Desktop: 
            Terminal: 
            
            
            *** MEMORY ***
                           total        used        free      shared  buff/cache   available
            Mem:            9.8G        3.9G        182M        4.3G        5.8G        1.2G
            Swap:           7.9G        1.9G        6.1G
            Total:           17G        5.7G        6.3G
            
                     9806 M total memory
                     3861 M used memory
                     2023 M active memory
                     1844 M inactive memory
                      182 M free memory
                       10 M buffer memory
                     5752 M swap cache
                     7931 M total swap
                     1851 M used swap
                     6080 M free swap
            
            *** FILESYSTEM ***
            Filesystem             Type   Size  Used Avail Use% Mounted on
            /dev/mapper/cachedev_0 btrfs  2.7T  1.5T  1.3T  54% /
            tmpfs                  tmpfs   64M     0   64M   0% /dev
            tmpfs                  tmpfs  4.8G     0  4.8G   0% /sys/fs/cgroup
            shm                    tmpfs   64M     0   64M   0% /dev/shm
            /dev/mapper/cachedev_0 btrfs  2.7T  1.5T  1.3T  54% /opt/iobroker
            /dev/mapper/cachedev_0 btrfs  2.7T  1.5T  1.3T  54% /docker/ioBroker
            tmpfs                  tmpfs  4.8G     0  4.8G   0% /proc/acpi
            tmpfs                  tmpfs  4.8G     0  4.8G   0% /proc/scsi
            tmpfs                  tmpfs  4.8G     0  4.8G   0% /sys/firmware
            
            Messages concerning ext4 filesystem in dmesg:
            
            Show mounted filesystems (real ones only):
            TARGET             SOURCE                                                                                                                         FSTYPE OPTIONS
            /                  /dev/mapper/cachedev_0[/@syno/@docker/btrfs/subvolumes/911895b76fcdd0e31c692e23a9867c5f1cdd404358e0a6e7d27ae308023f1687]       btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=582,subvol=/@syno/@docker/btrfs/subvolumes/911895b76fcdd0e31c692e23a9867c5f1cdd404358e0a6e7d27ae308023f1687
            |-/opt/iobroker    /dev/mapper/cachedev_0[/@syno/@docker/volumes/626d188e8c2d99289fd84bc6fce66cdfcdeeae5fb6b338b2a6bcc2856776ffd0/_data]          btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=257,subvol=/@syno/@docker/volumes/626d188e8c2d99289fd84bc6fce66cdfcdeeae5fb6b338b2a6bcc2856776ffd0/_data
            |-/docker/ioBroker /dev/mapper/cachedev_0[/@syno/docker/IoBroker]                                                                                 btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=535,subvol=/@syno/docker/IoBroker
            |-/etc/resolv.conf /dev/mapper/cachedev_0[/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/resolv.conf] btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=257,subvol=/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/resolv.conf
            |-/etc/hostname    /dev/mapper/cachedev_0[/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/hostname]    btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=257,subvol=/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/hostname
            `-/etc/hosts       /dev/mapper/cachedev_0[/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/hosts]       btrfs  rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,syno_allocator,subvolid=257,subvol=/@syno/@docker/containers/a77a88330ef8364f6032e636b302bfbacd53b5bdbf4776722f5e1f23e7fb51db/hosts
            
            Files in neuralgic directories:
            
            /var:
            33M     /var/
            30M     /var/lib
            18M     /var/lib/apt/lists
            18M     /var/lib/apt
            13M     /var/lib/dpkg
            
            
            
            /opt/iobroker/backups:
            94M     /opt/iobroker/backups/
            
            /opt/iobroker/iobroker-data:
            220M    /opt/iobroker/iobroker-data/
            135M    /opt/iobroker/iobroker-data/files
            67M     /opt/iobroker/iobroker-data/backup-objects
            52M     /opt/iobroker/iobroker-data/files/javascript.admin
            34M     /opt/iobroker/iobroker-data/files/javascript.admin/static
            
            The five largest files in iobroker-data are:
            21M     /opt/iobroker/iobroker-data/files/web.admin/static/js/main.edf7552a.js.map
            18M     /opt/iobroker/iobroker-data/objects.jsonl
            8.3M    /opt/iobroker/iobroker-data/files/web.admin/static/js/main.edf7552a.js
            7.1M    /opt/iobroker/iobroker-data/files/javascript.admin/static/js/610.f22de4ab.chunk.js.map
            6.6M    /opt/iobroker/iobroker-data/files/modbus.admin/static/js/main.8083c40d.js.map
            
            *** NodeJS-Installation ***
            
            /usr/bin/nodejs         v18.17.1
            /usr/bin/node           v18.17.1
            /usr/bin/npm            9.6.7
            /usr/bin/npx            9.6.7
            
            
            nodejs:
              Installed: 18.17.1-deb-1nodesource1
              Candidate: 18.17.1-deb-1nodesource1
              Version table:
             *** 18.17.1-deb-1nodesource1 500
                    500 https://deb.nodesource.com/node_18.x bullseye/main amd64 Packages
                    100 /var/lib/dpkg/status
                 12.22.12~dfsg-1~deb11u4 500
                    500 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages
                 12.22.12~dfsg-1~deb11u3 500
                    500 http://deb.debian.org/debian bullseye/main amd64 Packages
            
            Temp directories causing npm8 problem: 0
            No problems detected
            
            Errors in npm tree: 0
            
            *** ioBroker-Installation ***
            
            ioBroker Status
            iobroker is running on this host.
            
            
            Objects type: jsonl
            States  type: jsonl
            
            No configuration change needed.
            
            
            Multihost discovery server: disabled
            Discovery authentication:   enabled
            Persistent activation:      disabled
            Objects:                    jsonl on 127.0.0.1
            States:                     jsonl on 127.0.0.1
            
            Core adapters versions
            js-controller:  5.0.12
            admin:          6.10.1
            javascript:     7.1.4
            
            Adapters from github:   2
            
            Adapter State
            + system.adapter.admin.0                  : admin                 : ioBroker                                 -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
            + system.adapter.backitup.0               : backitup              : ioBroker                                 -  enabled
            + system.adapter.daikin-cloud.0           : daikin-cloud          : ioBroker                                 -  enabled
            + system.adapter.discovery.0              : discovery             : ioBroker                                 -  enabled
            + system.adapter.hm-rega.0                : hm-rega               : ioBroker                                 -  enabled
            + system.adapter.hm-rpc.0                 : hm-rpc                : ioBroker                                 -  enabled, port: 0
            + system.adapter.javascript.0             : javascript            : ioBroker                                 -  enabled
              system.adapter.mihome-vacuum.0          : mihome-vacuum         : ioBroker                                 - disabled, port: 54321
              system.adapter.mihome-vacuum.1          : mihome-vacuum         : ioBroker                                 - disabled, port: 54321
            + system.adapter.mihome-vacuum.2          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.mihome-vacuum.3          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.mihome-vacuum.4          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.modbus.0                 : modbus                : ioBroker                                 -  enabled
            + system.adapter.philips-tv.0             : philips-tv            : ioBroker                                 -  enabled
            + system.adapter.pvforecast.0             : pvforecast            : ioBroker                                 -  enabled
              system.adapter.vis-materialdesign.0     : vis-materialdesign    : ioBroker                                 -  enabled
              system.adapter.vis.0                    : vis                   : ioBroker                                 -  enabled
            + system.adapter.web.0                    : web                   : ioBroker                                 -  enabled, port: 8085, bind: 0.0.0.0, run as: admin
            + system.adapter.worx.0                   : worx                  : ioBroker                                 -  enabled
            
            + instance is alive
            
            Enabled adapters with bindings
            + system.adapter.admin.0                  : admin                 : ioBroker                                 -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
            + system.adapter.hm-rpc.0                 : hm-rpc                : ioBroker                                 -  enabled, port: 0
            + system.adapter.mihome-vacuum.2          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.mihome-vacuum.3          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.mihome-vacuum.4          : mihome-vacuum         : ioBroker                                 -  enabled, port: 54321
            + system.adapter.web.0                    : web                   : ioBroker                                 -  enabled, port: 8085, bind: 0.0.0.0, run as: admin
            
            ioBroker-Repositories
            stable        : http://download.iobroker.net/sources-dist.json
            beta          : http://download.iobroker.net/sources-dist-latest.json
            
            Active repo(s): stable
            
            Installed ioBroker-Instances
            Used repository: stable
            Adapter    "admin"        : 6.10.1   , installed 6.10.1
            Adapter    "backitup"     : 2.8.1    , installed 2.8.1
            Adapter    "daikin-cloud" : 0.3.0    , installed 0.3.1
            Adapter    "discovery"    : 3.1.0    , installed 3.1.0
            Adapter    "hm-rega"      : 3.0.47   , installed 3.0.47
            Adapter    "hm-rpc"       : 1.15.19  , installed 1.15.19
            Adapter    "javascript"   : 7.1.4    , installed 7.1.4
            Controller "js-controller": 5.0.12   , installed 5.0.12
            Adapter    "mihome-vacuum": 4.0.0    , installed 4.0.0
            Adapter    "modbus"       : 5.0.11   , installed 5.0.11
            Adapter    "philips-tv"   : 0.5.3    , installed 0.5.3
            Adapter    "pvforecast"   : 2.7.1    , installed 2.7.1
            Adapter    "simple-api"   : 2.7.2    , installed 2.7.2
            Adapter    "socketio"     : 6.5.5    , installed 6.5.5
            Adapter    "vis"          : 1.4.16   , installed 1.4.16
            Adapter    "web"          : 6.1.2    , installed 6.1.2
            Adapter    "worx"         : 2.3.2    , installed 2.3.2
            Adapter    "ws"           : 2.5.5    , installed 2.5.5
            
            Objects and States
            Please stand by - This may take a while
            Objects:        3867
            States:         2747
            
            *** OS-Repositories and Updates ***
            Hit:1 http://deb.debian.org/debian bullseye InRelease
            Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
            Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
            Hit:4 https://deb.nodesource.com/node_18.x bullseye InRelease
            Reading package lists...
            Pending Updates: 5
            
            *** Listening Ports ***
            Active Internet connections (only servers)
            Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
            tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1000       1024175375 -                   
            tcp        0      0 127.0.0.1:9001          0.0.0.0:*               LISTEN      1000       1024175369 -                   
            tcp        0      0 0.0.0.0:2001            0.0.0.0:*               LISTEN      1000       1024175902 -                   
            tcp6       0      0 :::8081                 :::*                    LISTEN      1000       1024178589 -                   
            tcp6       0      0 :::8085                 :::*                    LISTEN      1000       1024186294 -                   
            udp        0      0 0.0.0.0:53423           0.0.0.0:*                           1000       1024175077 -                   
            udp        0      0 0.0.0.0:53424           0.0.0.0:*                           1000       1024181416 -                   
            udp        0      0 0.0.0.0:53425           0.0.0.0:*                           1000       1024183388 -                   
            
            *** Log File - Last 25 Lines ***
            
            2023-09-26 13:18:43.326  - info: javascript.0 (7687) script.js.Klima.Bewegung_Settings: hm-rega.0.94755
            2023-09-26 13:18:43.326  - info: javascript.0 (7687) script.js.Klima.Bewegung_Settings: Skip
            2023-09-26 13:18:53.326  - info: daikin-cloud.0 (7834) Send state change for 626f03cb-92f6-43e0-bdbe-2cec50d4e77f.climateControl.fanControl.operationModes.cooling.fanDirection.horizontal.currentMode with value=stop to climateControl : fanControl : /operationModes/cooling/fanDirection/horizontal/currentMode
            2023-09-26 13:18:53.334  - info: daikin-cloud.0 (7834) Send state change for 8a98847c-1f61-402c-8a22-c1c246c70df8.climateControl.fanControl.operationModes.cooling.fanDirection.horizontal.currentMode with value=stop to climateControl : fanControl : /operationModes/cooling/fanDirection/horizontal/currentMode
            2023-09-26 13:18:53.370  - info: daikin-cloud.0 (7834) Send state change for d1d2a426-3db7-4838-96f6-275361fd6d56.climateControl.fanControl.operationModes.cooling.fanDirection.horizontal.currentMode with value=stop to climateControl : fanControl : /operationModes/cooling/fanDirection/horizontal/currentMode
            2023-09-26 13:18:55.324  - info: daikin-cloud.0 (7834) Send state change for 648a3fbf-d6a5-439b-bb24-d48e3565c5ce.climateControl.fanControl.operationModes.cooling.fanDirection.vertical.currentMode with value=windNice to climateControl : fanControl : /operationModes/cooling/fanDirection/vertical/currentMode
            2023-09-26 13:18:55.329  - info: daikin-cloud.0 (7834) Send state change for 626f03cb-92f6-43e0-bdbe-2cec50d4e77f.climateControl.fanControl.operationModes.cooling.fanDirection.vertical.currentMode with value=windNice to climateControl : fanControl : /operationModes/cooling/fanDirection/vertical/currentMode
            2023-09-26 13:18:55.334  - info: daikin-cloud.0 (7834) Send state change for 8a98847c-1f61-402c-8a22-c1c246c70df8.climateControl.fanControl.operationModes.cooling.fanDirection.vertical.currentMode with value=windNice to climateControl : fanControl : /operationModes/cooling/fanDirection/vertical/currentMode
            2023-09-26 13:18:55.409  - info: daikin-cloud.0 (7834) Send state change for d1d2a426-3db7-4838-96f6-275361fd6d56.climateControl.fanControl.operationModes.cooling.fanDirection.vertical.currentMode with value=windNice to climateControl : fanControl : /operationModes/cooling/fanDirection/vertical/currentMode
            2023-09-26 13:18:57.324  - info: daikin-cloud.0 (7834) Send state change for 648a3fbf-d6a5-439b-bb24-d48e3565c5ce.climateControl.fanControl.operationModes.cooling.fanSpeed.currentMode with value=quiet to climateControl : fanControl : /operationModes/cooling/fanSpeed/currentMode
            2023-09-26 13:18:57.330  - info: daikin-cloud.0 (7834) Send state change for 626f03cb-92f6-43e0-bdbe-2cec50d4e77f.climateControl.fanControl.operationModes.cooling.fanSpeed.currentMode with value=quiet to climateControl : fanControl : /operationModes/cooling/fanSpeed/currentMode
            2023-09-26 13:18:57.336  - info: daikin-cloud.0 (7834) Send state change for 8a98847c-1f61-402c-8a22-c1c246c70df8.climateControl.fanControl.operationModes.cooling.fanSpeed.currentMode with value=quiet to climateControl : fanControl : /operationModes/cooling/fanSpeed/currentMode
            2023-09-26 13:18:57.408  - info: daikin-cloud.0 (7834) Send state change for d1d2a426-3db7-4838-96f6-275361fd6d56.climateControl.fanControl.operationModes.cooling.fanSpeed.currentMode with value=quiet to climateControl : fanControl : /operationModes/cooling/fanSpeed/currentMode
            2023-09-26 13:19:31.815  - info: javascript.0 (7687) script.js.PV_Anlage.Differenz_String_2: Array Reset
            2023-09-26 13:20:24.064  - info: javascript.0 (7687) script.js.PV_Anlage.Differenz_String_1: Array Reset
            2023-09-26 13:22:09.922  - info: admin.0 (7676) <== Disconnect system.user.admin from ::ffff:172.17.0.1 admin
            2023-09-26 13:30:13.372  - warn: hm-rega.0 (8317) State "hm-rega.0.132472" has no existing object, this might lead to an error in future versions
            2023-09-26 13:44:04.828  - info: admin.0 (7676) ==> Connected system.user.admin from ::ffff:172.17.0.1
            2023-09-26 13:44:32.161  - info: admin.0 (7676) <== Disconnect system.user.admin from ::ffff:172.17.0.1 admin
            2023-09-26 13:44:53.988  - info: worx.0 (7893) Refresh token for MQTT-Connection
            2023-09-26 13:44:54.204  - info: worx.0 (7893) Disconnected
            2023-09-26 13:44:54.978  - info: worx.0 (7893) MQTT connected to: iot.eu-west-1.landxcape-services.com
            2023-09-26 13:44:55.045  - info: worx.0 (7893) Request Counter: 105
            2023-09-26 13:45:32.365  - info: javascript.0 (7687) script.js.PV_Anlage.Differenz_String_2: Array Reset
            2023-09-26 13:46:24.524  - info: javascript.0 (7687) script.js.PV_Anlage.Differenz_String_1: Array Reset
            
            
            Homoran paul53 2 Replies Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @Watakan last edited by

              @watakan danke!

              ich hoffe

              @watakan sagte in getIdByName gibt nach Update Dubletten zurück:

              Docker : v8.1.0

              ist nicht die Ursache, damit kenne ich mich nicht aus

              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @Watakan last edited by

                @watakan sagte: Langfassung:

                Mir fällt der enorme RAM-Verbrauch auf: Trotz fast 10 GB RAM schon 1,9 GB Swap verwendet.

                W 1 Reply Last reply Reply Quote 0
                • W
                  Watakan @paul53 last edited by

                  @paul53
                  danke, kann man dem näher auf den Grund gehen?

                  @Homoran , danke schon Mal, schade.

                  Was mir gerade noch aufgefallen ist, ich dachte erst das mehrfache Vorkommen hängt am Adapter. Bei den Homematic Variablen kamen immer 4x die gleiche Rückmeldungen und bei den Daikin Adapter Objekten 12x die gleiche ID.

                  Nun habe ich aber entdeckt, dass das bei Homematic Variablen, welche ich erst vor ein paar Tagen angelegt habe, weiterhin nur 1x zurückkommt und nicht mehrfach.

                  Gefühlt scheint die Anzahl der IDs mit der Anzahl der Neuinstallation der jeweiligen Adapter übereinzustimmen.
                  Im Zuge der neuen Daikin Adapter Version und ein paar Fehlerbehebungen, habe ich den Adapter mehrfach gelöscht und neuinstalliert (via Git).
                  Den rega auch ein paar Mal aber wesentlich weniger.

                  Gibt es da eventuell Leichen oder was ähnliches? Falls ja komm ich da ran und hat das eventuell was mit dem vielen Ram zu tun?

                  Grüße

                  paul53 1 Reply Last reply Reply Quote 0
                  • paul53
                    paul53 @Watakan last edited by paul53

                    @watakan sagte: kann man dem näher auf den Grund gehen?

                    Mit "top" und dann mit "Shift m" (großes M) nach RAM-Verbrauch sortieren.

                    Tritt der Effekt nach Neustart der Javascript-Instanz weiterhin auf? Falls ja, auch nach ioBroker Neustart?

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

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    878
                    Online

                    31.8k
                    Users

                    79.9k
                    Topics

                    1.3m
                    Posts

                    3
                    8
                    335
                    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