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.
    • 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

                        627
                        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