Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. SONOFF NSPanel mit Lovelace UI

    NEWS

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    SONOFF NSPanel mit Lovelace UI

    This topic has been deleted. Only users with topic management privileges can see it.
    • Armilar
      Armilar Most Active Forum Testing @missi last edited by Armilar

      @missi sagte in SONOFF NSPanel mit Lovelace UI:

      hwclock

      Es wird die Systemzeit genommen und an das Panel übertragen. Den Fehler kannst du auch in jedem anderen Blockly reproduzieren:
      https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker---FAQ-&-Anleitungen#19-abweichende-uhrzeit

      Kann zwei Ursachen haben:
      Je nach System kann natürlich auch eine VM (z.B. Proxmox) ihr Unwesen treiben...

      1. Lösung: die Systemzeit (und Standort auf Berlin) korrigieren. In der Regel sollte danach ein Neustart des Betriebssystems erfolgen.

      2. Lösung: Eine veraltete nodeJS-Version könnte das Problem sein... Sollte in der Konsole mit node -v keine 16.19.0 herauskommen, dann sollte in jedem Fall gehandelt werden.

        • Das Release beginnt mit 16.X.X**

          Dann einfach

          sudo apt-get update
          sudo apt-get dist-upgrade
          sudo reboot
          

          durchführen (sollte sowieso mindestens einmal im Monat erfolgen)

        • Das Release beginnt mit 14.X.X oder noch kleiner:
          Jetzt ist zwingend das nodeJS auf einen neuen Stand zu bringen:
          Anleitung siehe hier:
          https://forum.iobroker.net/topic/35090/howto-nodejs-installation-und-upgrades-unter-debian

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

        Hallo,

        so langsam bekommt das Teil so 'richtigen' Nutzen aka WAF ;-D
        Habe mal die MediaCard für den Volumio-Player angepaßt (relevente Routinen erweitert), funkt soweit ganz gut inkl. dynamischer Playlist (Mißbrauch des Shuffle-Buttons für den Refresh-Init hierfür)

        let VolumioBoss: PageMedia = 
        {
            'type': 'cardMedia',
            'heading': 'Volumio-Büro',
            'useColor': true,
            'subPage': false,
            'parent': undefined,
            'items': [<PageItem>{   
                        id: 'alias.0.NSPanel.Volumio-Boss', 
                        adapterPlayerInstance: 'volumio.0.',
                        speakerList: [], /* this must, no function */
                        playList: [],    /* empty for dynamic reading */
                        colorMediaIcon: colorSpotify,
                        colorMediaTitle: colorSpotify,
                        colorMediaArtist: Yellow,
                        autoCreateALias : true
                     }]
        };
        
        let VolumioMobil: PageMedia = 
        {
            'type': 'cardMedia',
            'heading': 'Volumio-Mobil',
            'useColor': true,
            'subPage': false,
            'parent': undefined,
            'items': [<PageItem>{   
                        id: 'alias.0.NSPanel.Volumio-Mobil', 
                        adapterPlayerInstance: 'volumio.1.',
                        speakerList: [], /* this must, no function */
                        playList: [],    /* empty for dynamic reading */
                        colorMediaIcon: Yellow,
                        colorMediaTitle: Yellow,
                        colorMediaArtist: Gray,
                        autoCreateALias : true
                     }]
        };
        

        NSPanel-Voumio-2.JPG NSPanel-Voumio-1.JPG NSPanel-Voumio-3.JPG

        Bloß der volumio-Adapter ist ziemlich empfindlich (schmiert häufig ab, wenn man zu schnell tastet), und mehrer Adapter beeinflussen sich bei den Events: Titel/Artistwechsel gehen an alle Instanzen ?!?

        Hat irgend jemand hier noch Volumios im Einsatz ?

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

          @egal sagte in SONOFF NSPanel mit Lovelace UI:

          Volumios

          Denke die Änderungen könnte man mit aufnehmen, oder? Könntest du die (ich denke es ist die GenerateMediaPage, die createAutoMediaAlias, die HandleButtonEvent und wahrscheinlich die GenerateDetailPage) Änderungen auch posten? Es gibt immer jemanden, der es gebrauchen kann 😉

          Welches Icon benötigst du denn im Shuffle?

          EDIT: bei "dynamisch" sollten die Enträge in der playList nicht die 900 Zeichen überschreiten, sonst gibts einen Speicherüberlauf in der InSel.

          egal 1 Reply Last reply Reply Quote 0
          • K
            Kuckuckmann @Armilar last edited by

            @armilar ich übernehme das mal in die FAQ

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

              @kuckuckmann

              Jo, noch ist der Code nicht im Script...

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

                @armilar
                ja, gerne, mache ich morgen;
                hier in diesem Fred oder PN ?

                Icon muß ich mal schauen,
                die 900char Grenze habe ich gesehen, muß ich noch prüfen 😉

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

                  @egal

                  Entweder hier, oder direkt als Pull Request

                  EDIT: Coole Nummer 👍 😊

                  Armilar egal 2 Replies Last reply Reply Quote 0
                  • K
                    Kuckuckmann @Armilar last edited by

                    @armilar ich meinte die HM Thermostat Geschichte 😉

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

                      @armilar

                      Habe übrigens das Menü für das nächste Release noch weiter angepasst...

                      Subpages navigieren jetzt auch auf der selben Ebene, analog der Mainpages...

                      de00825f-40ea-411b-8206-798a6bfcb96d-image.png

                      c542d8e6-d02b-46f9-a9c4-b2dfad252b1e-image.png

                      Home kann mit definierter Seite belegt werden

                      Und natürlich die targetPages von @TT-Tom mit dem Alias in der Menüitem-ID...

                      Beschreibung folgt.

                      Für die Änderungen benötigen wir allerdings noch ein neues TFT-Release (> v3.7.3), da sich dort doch ein paar mehr Änderungen ergeben haben.

                      Geht natürlich auch mit Subpages auf denen Steuerelemente sind:

                      5588f297-cb7e-4ecf-93b2-9e5a8815aa6e-image.png

                      3e6a0ce6-f34d-4f7d-96e7-d23a5ae39dfd-image.png

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

                        @kuckuckmann

                        @armilar ich meinte die HM Thermostat Geschichte 😉

                        Ach da war ich mit meinen Gedanke ganz woanders. Ja klar, gerne. Aber die Funktionalität ist noch nicht bestätigt.

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

                          Hallo, ich habe gerade mal geupdatet, und hab mit großer Freude festgestellt das es jetzt ein WLED Seite gibt!!!

                          Wie muss dazu das alias angelegt werden damit die Seite funktioniert???

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

                            @armilar Ich bin gerade etwas gefrustet. Habe es so aufgebaut wie hier angedacht. Leider ist es so, dass die Homematic Falmot Steuereinheit doch ein Wandthermostat zu brauchen scheint. Ich habe leider keinen State Eintrag unter dem Homematic Adapter den ich ansteuern könnte und eine reine Ansteuerung über die CCU geht auch leider nicht. Das ist sehr doof. Wollte ja mittels heatingcontrol Adapter hier arbeiten und dies dann mit NSPanel nutzen....

                            Hat hier jemand ein NSPanel direkt an einem Homematic Falmot am laufen (OHNE zusätzliches HM Wandthermostat)?

                            Beste Grüße
                            Elluminatus

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

                              @armilar Das bekomme ich nicht hin, der Falmot hat nichts zum ansteuern..

                              2e182f3f-b7dc-4a56-8db3-a410f533ed74-grafik.png

                              bzw hier bei den Objekten:

                              67d61543-f2ed-4d96-9d86-2990e1f664a4-grafik.png

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

                                @elluminatus

                                Was ist denn LEVEL?

                                Sieht für mich nach einem SetPoint aus. Die Frage ist, von Wert/bis Wert kann der?

                                T E 2 Replies Last reply Reply Quote 0
                                • Armilar
                                  Armilar Most Active Forum Testing @danny_v1 last edited by

                                  @danny_v1

                                  @Kuckuckmann erstellt eine WIKI-Anleitung mit Beispiel hierzu.

                                  e18eaccc-acdf-45ed-a21b-07de1ad277b4-image.png

                                  Im Grunde ist das Beispiel eine cardGrid mit 2 Sockets und 4 popUpInSel als Werteliste

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

                                    @armilar Super danke! Na dann warte ich mal noch auf die Anleitung.

                                    Armilar K 2 Replies Last reply Reply Quote 0
                                    • Armilar
                                      Armilar Most Active Forum Testing @danny_v1 last edited by

                                      @danny_v1

                                      Passt... Ich muss meine auch noch aktiv einbinden 😉

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

                                        @armilar
                                        Level ist aber nur readonly. So wie es auf dem Bild aussieht, sind sie alle readonly.

                                        Habe auf der ELV Seite nachgeschaut, dort sprechen Sie auch von Kombination mit Thermostat.

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

                                          @armilar Hi leider ist Level nur readonly. Habe gestern noch ziemlich lange wach gelegen und nach einer Alternative gesucht. Ist zwar offtopic aber vllt. interessiert es ja jemanden:

                                          //Offtopic

                                          Es gibt für thermische Ventile eine DIY Lösung auf Tasmota Basis: 10ch thermisches Ventil Stellboard für FBH mit Tasmota

                                          und sogar eine Lösung für motorische Ventile: DIY Lösung für motorische Stellantriebe bei der FBH

                                          1 Reply Last reply Reply Quote 1
                                          • egal
                                            egal @Armilar last edited by egal

                                            @armilar
                                            so, die Erweiterungen für den Volumio-Player:

                                            async function createAutoMediaAlias(id: string, mediaDevice: string, adapterPlayerInstance: string) {
                                            ...
                                            
                                            +
                                            +        /* Volumio */
                                            +        if (adapterPlayerInstance.startsWith('volumio')) {
                                            +            if (existsObject(id) == false){
                                            +                console.log('Volumio Alias ' + id + ' existiert nicht - wird jetzt angelegt')
                                            +
                                            +                let dpPath: string = adapterPlayerInstance;
                                            +                try {
                                            +                    setObject(id, {_id: id, type: 'channel', common: {role: 'media', name:'media'}, native: {}});
                                            +                    await createAliasAsync(id + '.ACTUAL', dpPath + 'playbackInfo.volume', true, <iobJS.StateCommon>{ type: 'number', role: 'value.volume', name: 'ACTUAL' });
                                            +                    await createAliasAsync(id + '.ALBUM', dpPath + 'playbackInfo.album', true, <iobJS.StateCommon>{ type: 'string', role: 'media.album', name: 'ALBUM' });
                                            +                    await createAliasAsync(id + '.ARTIST', dpPath + 'playbackInfo.artist', true, <iobJS.StateCommon>{ type: 'string', role: 'media.artist', name: 'ARTIST' });
                                            +                    await createAliasAsync(id + '.TITLE', dpPath + 'playbackInfo.title', true, <iobJS.StateCommon>{ type: 'string', role: 'media.title', name: 'TITLE' });
                                            +                    await createAliasAsync(id + '.NEXT', dpPath + 'player.next', true, <iobJS.StateCommon>{ type: 'boolean', role: 'button.next', name: 'NEXT' });
                                            +                    await createAliasAsync(id + '.PREV', dpPath + 'player.prev', true, <iobJS.StateCommon>{ type: 'boolean', role: 'button.prev', name: 'PREV' });
                                            +                    await createAliasAsync(id + '.PLAY', dpPath + 'player.play', true, <iobJS.StateCommon>{ type: 'boolean', role: 'button.play', name: 'PLAY' });
                                            +                    await createAliasAsync(id + '.PAUSE', dpPath + 'player.toggle', true, <iobJS.StateCommon>{ type: 'boolean', role: 'button.pause', name: 'PAUSE' });
                                            +                    await createAliasAsync(id + '.STOP', dpPath + 'player.stop', true, <iobJS.StateCommon>{ type: 'boolean', role: 'button.stop', name: 'STOP' });
                                            +                    await createAliasAsync(id + '.STATE', dpPath + 'playbackInfo.status', true, <iobJS.StateCommon>{ type: 'boolean', role: 'media.state', name: 'STATE' });
                                            +                    await createAliasAsync(id + '.VOLUME', dpPath + 'playbackInfo.volume', true, <iobJS.StateCommon>{ type: 'number', role: 'level.volume', name: 'VOLUME' });
                                            +                    await createAliasAsync(id + '.REPEAT', dpPath + 'playbackInfo.repeat', true, <iobJS.StateCommon>{ type: 'number', role: 'media.mode.repeat', name: 'REPEAT' });
                                            +                    await createAliasAsync(id + '.SHUFFLE', dpPath + 'queue.shuffle', true, <iobJS.StateCommon>{ type: 'boolean', role: 'media.mode.shuffle', name: 'SHUFFLE' });                    
                                            +                    await createAliasAsync(id + '.status', dpPath + 'playbackInfo.status', true, <iobJS.StateCommon>{ type: 'string', role: 'media.state', name: 'status' });
                                            +                } catch (err) {
                                            +                    console.warn('function createAutoMediaAlias: ' + err.message);
                                            +                }
                                            +            }
                                            +        }
                                            +
                                            
                                            ...
                                            }
                                            
                                            function GenerateMediaPage(page: PageMedia): Payload[] {
                                            ...
                                            
                                            +
                                            +            //Volumio
                                            +            if (v2Adapter == 'volumio') {
                                            +                if (name != undefined) { author = author + " [" + name + "]"; }
                                            +                name = getState(vInstance + 'info.name').val;  /* page.heading; 
                                            +                                                                  getState(id + '.TRACK').val; */
                                            +            }
                                            +
                                            
                                            ...
                                            
                                            +            if (v2Adapter == 'volumio') { shuffle_icon = Icons.GetIcon('refresh'); } //Volumio: refresh playlist
                                            
                                            ...
                                            
                                            +
                                            +            //Ausnahme Volumio: status = string: play, pause, stop usw.
                                            +            if (v2Adapter == 'volumio') {
                                            +                if (getState(id + '.status').val == 'play') {
                                            +                    onoffbutton = 65535;
                                            +                    iconplaypause = Icons.GetIcon('pause'); //pause
                                            +                } else {
                                            +                    iconplaypause = Icons.GetIcon('play'); //play
                                            +                }
                                            +            }
                                            +
                                            
                                            ...
                                            
                                                        //InSel Playlist
                                                        let playListString: string = '~~~~~~'
                                                        let playListIconCol = rgb_dec565(HMIOff);
                                                        if (page.items[0].playList != undefined) {
                                            +                /* Volumio: get actual playlist if empty */
                                            +                if (v2Adapter == 'volumio') {
                                            +                    if (page.items[0].playList.length == 0) {
                                            +                        request({ url: `${getState(vInstance+'info.host').val}/api/listplaylists`, headers: {'User-Agent': 'ioBroker'} }, 
                                            +                            async (error, response, result) => {
                                            +                                try { page.items[0].playList = JSON.parse(result);
                                            +                                      //console.log(page.items[0].playList); 
                                            +                                    }
                                            +                            } catch (err) { console.log('get_volumio-playlist: ' + err.message); }
                                            +                        );
                                            +                    }
                                                            }
                                            
                                            ...
                                            }
                                            
                                            function HandleButtonEvent(words): void {
                                            ...
                                            
                                                        case 'media-shuffle':
                                            +                if ((findPageItem(id).adapterPlayerInstance).startsWith("volumio")) { findPageItem(id).playList = []; break; } //Volumio: empty playlist
                                                            if (getState(id + '.SHUFFLE').val == 'off') {
                                            
                                            ...
                                            
                                                        case 'mode-playlist':
                                                            let pageItemPL = findPageItem(id);
                                                            let adapterInstancePL = pageItemPL.adapterPlayerInstance;
                                                            let adapterPL = adapterInstancePL.split('.')
                                                            let deviceAdapterPL = adapterPL[0];
                                            
                                                            switch (deviceAdapterPL) {
                                                                case 'spotify-premium':
                                                                    let strDevicePI = pageItemPL.playList[words[4]]
                                                                    console.log(strDevicePI)
                                                                    let playlistListString = (getState(adapterInstancePL + 'playlists.playlistListString').val).split(';');
                                                                    let playlistListIds = (getState(adapterInstancePL + 'playlists.playlistListIds').val).split(';');
                                                                    let playlistIndex = playlistListString.indexOf(strDevicePI);
                                                                    setState(adapterInstancePL + 'playlists.playlistList', playlistListIds[playlistIndex]);
                                                                    setTimeout(async function () {
                                                                        globalTracklist = (function () { try {return JSON.parse(getState(adapterInstancePL + 'player.playlist.trackListArray').val);} catch(e) {return {};}})();
                                                                    }, 2000);
                                                                    break;
                                                                case 'alexa2':
                                                                    let tempListItem = pageItemPL.playList[words[4]].split('.');
                                                                    setState(adapterInstancePL + 'Echo-Devices.' + pageItemPL.mediaDevice + '.Music-Provider.' + tempListItem[0], tempListItem[1]);
                                                                    break;
                                            +                    case 'volumio':
                                            +                        let strDevicePL = pageItemPL.playList[words[4]];
                                            +                        request({ url:`${getState(adapterInstancePL+'info.host').val}/api/commands/?cmd=playplaylist&name=${strDevicePL}`, headers: {'User-Agent': 'ioBroker'} }, 
                                            +                                  async (error, response, result)=>{}); /* nothing todo @ error */
                                            +                        break;
                                                            }
                                            
                                            ...
                                            }
                                            
                                            function GenerateDetailPage(type: string, optional: string, pageItem: PageItem): Payload[] {
                                            ...
                                            
                                                                } else if (optional == 'playlist') {
                                                                    if (vAdapter == 'spotify-premium') {
                                                                        if (existsObject(pageItem.adapterPlayerInstance + 'player.playlist.name')) {
                                                                            actualState = formatInSelText(getState(pageItem.adapterPlayerInstance + 'player.playlist.name').val);
                                                                        }
                                                                        let tempPlayList = [];
                                                                        for (let i = 0; i < pageItem.playList.length; i++) {
                                                                            tempPlayList[i] = formatInSelText(pageItem.playList[i]);
                                                                        }
                                                                        optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : ''
                                                                    } else if (vAdapter == 'alexa2') {
                                                                        //Todo Richtiges Device finden
                                                                        actualState = formatInSelText(getState(pageItem.adapterPlayerInstance + 'Echo-Devices.' + pageItem.mediaDevice + '.Player.currentAlbum').val);
                                                        
                                                                        let tPlayList: any = []
                                                                        for (let i = 0; i < pageItem.playList.length; i++) {
                                                                            console.log(pageItem.playList[i]);
                                                                            let tempItem = pageItem.playList[i].split('.');
                                                                            tPlayList[i] = tempItem[1];
                                                                        }
                                                                        
                                                                        let tempPlayList = [];
                                                                        for (let i = 0; i < tPlayList.length; i++) {
                                                                            tempPlayList[i] = formatInSelText(tPlayList[i]);
                                                                        }
                                                                        optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : ''
                                            +                        } else if (vAdapter == 'volumio') { /* Volumio: limit 900 chars */
                                            +                            actualState = ''; //todo: no actual playlistname saving
                                            +                            let tempPlayList = []; let tempPll = 0;
                                            +                            for (let i = 0; i < pageItem.playList.length; i++) {
                                            +                                tempPll += pageItem.playList[i].length; if (tempPll > 900) break;
                                            +                                tempPlayList[i] = formatInSelText(pageItem.playList[i]);
                                            +                            }
                                            +                            optionalString = pageItem.playList != undefined ? tempPlayList.join('?') : ''
                                            +                        } /**/
                                                                    mode = 'playlist';
                                            
                                            ...
                                            }
                                            

                                            zur Vollständigkeit, die Funktionen nochmal in gänze:
                                            NSPanel-Volumio-all.txt

                                            Hinweis:
                                            Die player-Buttonobjekte in der volumio-Instanz müssen 1malig initialisiert werden, bis dahin gibt es Warnings und sie tun net 😉

                                            Edit: Shuffle-Button ergänzt

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            876
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

                                            lovelace ui nspanel sonoff
                                            260
                                            7128
                                            4325320
                                            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