Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst]Fehler im NSPanel Script

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst]Fehler im NSPanel Script

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

      Habe jetzt meine Panels updaten können mit Tasmota 12.2 und 12.5 jeweils mithilfe "https://github.com/arendst/Tasmota/raw/eb3de9c73a23e5559123dd85df70f844aaa46f33/tasmota/berry/modules/Partition_Wizard.tapp"
      aus dem Thread: https://github.com/arendst/Tasmota/discussions/19050
      Jedwede andere Partition Wizard tapp hatte nicht funktioniert.

      habs nur der vollständigkeits hier erwähnt.

      1 Reply Last reply Reply Quote 1
      • GregorS
        GregorS @TT-Tom last edited by GregorS

        @tt-tom

        Ich habe mich mal an das neue Script V4.4.0.1 nach der o.g. Anleitung gehalten.

        Bei Schritt 5 war schon Ende.
        Jede Menge Fehler:

        javascript.0	16:04:48.825	error	script.js.NSPanel_1_V4_4_0_1: Error: Cannot find module 'dayjs'
        javascript.0	16:04:48.829	error	script.js.NSPanel_1_V4_4_0_1: Error: Cannot find module 'dayjs'
        ....
        

        Jetzt stehe ich erst mal wieder auf dem Schlauch 😞
        Hier die Einstellungen für javascript.0
        Screenshot 2024-08-17 160837.png

        In der Konsole:

        pi@Promox-ioBroker:~$ cd /opt/iobroker/node_modules/@iobroker-javascript.0/dayjs
        pi@Promox-ioBroker:/opt/iobroker/node_modules/@iobroker-javascript.0/dayjs$ ls -la
        insgesamt 152
        drwxrwxr-x+ 5 iobroker iobroker  4096 17. Aug 16:04 .
        drwxrwxr-x+ 7 iobroker iobroker  4096 17. Aug 16:04 ..
        -rw-rw-r--+ 1 iobroker iobroker 79810 17. Aug 16:04 CHANGELOG.md
        -rw-rw-r--+ 1 iobroker iobroker  7160 17. Aug 16:04 dayjs.min.js
        -rw-rw-r--+ 1 iobroker iobroker    94 17. Aug 16:04 .editorconfig
        drwxrwxr-x+ 4 iobroker iobroker  4096 17. Aug 16:04 esm
        -rw-rw-r--+ 1 iobroker iobroker 13872 17. Aug 16:04 index.d.ts
        -rw-rw-r--+ 1 iobroker iobroker  1072 17. Aug 16:04 LICENSE
        drwxrwxr-x+ 2 iobroker iobroker  4096 17. Aug 16:04 locale
        -rw-rw-r--+ 1 iobroker iobroker  5033 17. Aug 16:04 locale.json
        -rw-rw-r--+ 1 iobroker iobroker  2526 17. Aug 16:04 package.json
        drwxrwxr-x+ 2 iobroker iobroker  4096 17. Aug 16:04 plugin
        -rw-rw-r--+ 1 iobroker iobroker  7411 17. Aug 16:04 README.md
        pi@Promox-ioBroker:/opt/iobroker/node_modules/@iobroker-javascript.0/dayjs$
        

        ioB diag:
        ======================= SUMMARY =======================
        v.2024-05-22

        Static hostname: Promox-ioBroker
        Icon name: computer-vm
        Chassis: vm
        Virtualization: kvm
        Operating System: Debian GNU/Linux 11 (bullseye)
        Kernel: Linux 5.10.0-31-amd64
        Architecture: x86-64

        Installation: kvm
        Kernel: x86_64
        Userland: 64 bit
        Timezone: Europe/Berlin (CEST, +0200)
        User-ID: 1000
        Display-Server: false
        Boot Target: graphical.target

        Pending OS-Updates: 2
        Pending iob updates: 0

        Nodejs-Installation:
        /usr/bin/nodejs v18.20.4
        /usr/bin/node v18.20.4
        /usr/bin/npm 10.7.0
        /usr/bin/npx 10.7.0
        /usr/bin/corepack 0.28.0

        Recommended versions are nodejs 20.16.0 and npm 10.8.1
        Your nodejs installation is correct

        MEMORY:
        total used free shared buff/cache available
        Mem: 15G 7.3G 6.0G 0.0K 2.6G 8.5G
        Swap: 974M 0B 974M
        Total: 16G 7.3G 7.0G

        Active iob-Instances: 50
        Upgrade policy: none

        ioBroker Core: js-controller 6.0.9
        admin 7.0.22

        ioBroker Status: iobroker is running on this host.

        Objects type: jsonl
        States type: redis

        Status admin and web instance:

        • system.adapter.admin.0 : admin : Promox-ioBroker - enabled, port: 8081, bind: 0.0.0.0, run as: admin
        • system.adapter.web.0 : web : Promox-ioBroker - enabled, port: 8082, bind: 0.0.0.0, run as: admin

        Objects: 29576
        States: 22152

        Size of iob-Database:

        86M /opt/iobroker/iobroker-data/objects.jsonl
        7.2M /opt/iobroker/iobroker-data/states.jsonl

        =================== END OF SUMMARY ====================

        Armilar 1 Reply Last reply Reply Quote 0
        • Armilar
          Armilar Most Active Forum Testing @GregorS last edited by

          @gregors

          Sende mal die Fehler…

          Alles wo dayjs drin steht ist ein anderes Thema und hindert den Start nicht…

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

            @armilar
            Habe jetzt alles weg bekommen.
            Wenn ich das Script starte, kommt nur noch ein Fehler:

            script.js.NSPanel_1_V4_4_0_1: TypeScript compilation failed: let Unlock_Service = <PageUnlock>{ ^ ERROR: Cannot redeclare block-scoped variable 'Unlock_Service'. let Unlock_Service: PageType = { ^ ERROR: Cannot redeclare block-scoped variable 'Unlock_Service'. ScreensaverEntityDateFormat: 'hh:mm', // like DD.MM or DD.MM.YY or YYYY/MM/DD or hh:mm ^ ERROR: Type 'string' has no properties in common with type 'DateTimeFormatOptions'. pages: [ ^ ERROR: An object literal cannot have multiple properties with the same name. subPages: [ ^ ERROR: An object literal cannot have multiple properties with the same name. 
            

            Allerdings habe ich keine Verbindung vom NSPanel zu ioB. Waiting for Content

            Armilar 1 Reply Last reply Reply Quote 0
            • Armilar
              Armilar Most Active Forum Testing @GregorS last edited by

              @gregors

              Suche mal nach der Seitenvariable

              let Unlock_Service = <PageUnlock>
              

              die scheint im Script doppelt zu sein... Evtl auch andere checken...

              GregorS 1 Reply Last reply Reply Quote 0
              • GregorS
                GregorS @Armilar last edited by

                @armilar

                Gibt es tatsächlich nur einmal

                T 1 Reply Last reply Reply Quote 0
                • T
                  TT-Tom @GregorS last edited by

                  @gregors

                  Zeige bitte mal die komplette Seiten Config. Da ist was doppelt oder ein paar Klammern fehlen.

                  GregorS Armilar 2 Replies Last reply Reply Quote 0
                  • GregorS
                    GregorS @TT-Tom last edited by GregorS

                    @tt-tom

                    let Unlock_Service = <PageUnlock>
                    {
                        'type': 'cardUnlock',
                        'heading': 'Service Pages',
                        'useColor': true,
                        'items': [<PageItem>{ id: 'alias.0.NSPanel.Unlock', targetPage: 'NSPanel_Service' }]
                    };
                    

                    Oder brauchst du das ganze Script?
                    Habe den Teil von meinem alten Script kopiert

                    1 Reply Last reply Reply Quote 0
                    • Armilar
                      Armilar Most Active Forum Testing @TT-Tom last edited by Armilar

                      @GregorS

                      War gestern nur halb bei der Sache, da auch unterwegs... Die Seitenvariablen sind falsch definiert...

                      let Unlock_Service = <PageUnlock>
                      

                      ist jetzt

                      let Unlock_Service: PageType =
                      

                      wäre dir also nicht bei einem leeren Script passiert.

                      Und in @TT-Tom Anleitung steht es im Punkt 10 auch nochmal explizit.

                      https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Starthilfe-FAQ#hilfe-bei-update--upgrade
                      2c5b7f17-9194-4072-b4a1-f417544a17be-image.png

                      Alle Variablen also nach dem Schema

                      1 Reply Last reply Reply Quote 1
                      • GregorS
                        GregorS last edited by

                        @armilar

                        Danke, hab ich jetzt angepasst.
                        Verbindung wird aufgebaut, Screensaver und Buttons sind ok, aber meine eigenen
                        Seiten kann ich nicht aufrufen.

                        //-- Anfang für eigene Seiten -- z.T. selbstdefinierte Aliase erforderlich ----------------
                        //-- Start for your own pages -- some self-defined aliases required ----------------
                        
                        let Radiosender: PageType =
                        {
                            'type': 'cardGrid',
                            'heading': 'Internetradio',
                            'useColor': true,
                            'items': [
                                { id: "alias.0.NSPanel.1.Radio.WDR2", icon: "radio", name: "WDR2", onColor: colorRadio},
                                { id: "alias.0.NSPanel.1.Radio.RockAntenne", icon: "radio", name: "Rock Antenne", onColor: colorRadio},
                                { id: "alias.0.NSPanel.1.Radio.WDR4", icon: "radio", name: "WDR4", onColor: colorRadio},
                                { id: "alias.0.NSPanel.1.Radio.Radio_90_1", icon: "radio", name: "Radio 90,1", onColor: colorRadio},
                                { id: "alias.0.NSPanel.1.Radio.Antenne_Bayern_80er_Hits", icon: "radio", name: "80er Hits", onColor: colorRadio},
                                { id: "alias.0.NSPanel.1.Radio.Nora_Webstream_80er", icon: "radio", name: "Nora 80er", onColor: colorRadio},
                            ]
                        };
                        
                        let Buero_Alarm: PageType =
                        {
                            'type': 'cardAlarm',
                            'heading': 'Alarmanlage',
                            'items': [{ id: 'alias.0.NSPanel.Alarm' }]
                        }; 
                        

                        Meine Fehlermeldungen gibt es immer noch

                        script.js.NSPanel_1_V4_4_0_1: Error: Cannot find module 'dayjs'
                        
                        Armilar 1 Reply Last reply Reply Quote 0
                        • Armilar
                          Armilar Most Active Forum Testing @GregorS last edited by

                          @gregors

                          dayjs ist kein Script-Thema... Wird irgendwann gefixt sein, kommt nur zum Start und hindert das NSPanel nicht an der Funktionalität

                          Sind deine eigenen Pages wieder im Page-Array eingetragen:

                          ab276389-f1c9-41f0-a1f1-fc59eec30652-image.png

                          Ansonsten werden die nicht angezeigt...

                          Gilt ebenso für die Subpages...

                          GregorS 1 Reply Last reply Reply Quote 2
                          • GregorS
                            GregorS @Armilar last edited by

                            @armilar
                            Das war der Fehler.
                            Danke

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

                            Support us

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

                            610
                            Online

                            31.6k
                            Users

                            79.5k
                            Topics

                            1.3m
                            Posts

                            7
                            22
                            1295
                            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