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

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    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 @Wuschl last edited by

      @wuschl sagte in SONOFF NSPanel mit Lovelace UI:

      mqtt.0.stat.tasmota_0E3BFC.POWER1

      Da ist doch schon etwas...

      Dein Tele läuft auf:

      mqtt.0.tele.NS-Panel-Paps_0BED20.RESULT
      

      dein Stat läuft auf:

      mqtt.0.stat.tasmota_0E3BFC.POWER1
      

      und ist irgendwie ein völlig anderes Gerät

      Versuche es mal mit:

      mrIcon1ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.stat.NS-Panel-Paps_0BED20.POWER1', ScreensaverEntityIcon: 'light-switch', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff  },
      mrIcon2ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.stat.NS-Panel-Paps_0BED20.POWER2', ScreensaverEntityIcon: 'lightbulb', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff  },
      
      W 1 Reply Last reply Reply Quote 0
      • Armilar
        Armilar Most Active Forum Testing @Meister-x last edited by

        @meister-x

        ich muss es erstmal einbauen. Wird in die nächste Version kommen.

        Meister-x 2 Replies Last reply Reply Quote 0
        • Meister-x
          Meister-x @Armilar last edited by

          @armilar
          super -vielen Dank !!!!!!

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

            @peoples

            Warte - ich klicke mal schnell ein paar Zeilen zusammen...

            16.18.1 passt. Schon vorbildlich 😊

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

              @armilar super danke. Jetzt bleibt nur noch das übrig

              16.11.2022, 21:22:50.314	[warn ]: javascript.0 (806)     at script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:1293:46
              16.11.2022, 21:22:50.314	[warn ]: javascript.0 (806)     at step (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:33:23)
              16.11.2022, 21:22:50.314	[warn ]: javascript.0 (806)     at Object.next (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:14:53)
              16.11.2022, 21:22:50.314	[warn ]: javascript.0 (806)     at fulfilled (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:5:58)
              
              1 Reply Last reply Reply Quote 0
              • Armilar
                Armilar Most Active Forum Testing last edited by

                @armilar

                Würde mir ein klein wenig von deiner Seite helfen, wenn du sehen würdest, was im Screensaver aktuell nicht läuft 😉

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

                  @armilar das hier fehlt, das finde ich nirgends.

                   //Subpage 2 von Subpages_2
                          let NSPanel_Einstellungen: PageEntities =
                          {
                              'type': 'cardEntities',
                              'heading': 'Screensaver',
                              'useColor': true,
                              'subPage': true,
                              'parent': Service,
                              'items': [
                                  <PageItem>{ id: AliasPath + 'Dimmode.brightnessDay', name: 'Brightness Tag', icon: 'brightness-5', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 5, maxValue: 10},
                                  <PageItem>{ id: AliasPath + 'Dimmode.brightnessNight', name: 'Brightness Nacht', icon: 'brightness-4', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 4},
                                  <PageItem>{ id: AliasPath + 'Dimmode.hourDay', name: 'Stunde Tag', icon: 'sun-clock', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 23},
                                  <PageItem>{ id: AliasPath + 'Dimmode.hourNight', name: 'Stunde Nacht', icon: 'sun-clock-outline', offColor: MSYellow, onColor: MSYellow, useColor: true, minValue: 0, maxValue: 23}
                              ]
                          };
                  
                  Armilar 1 Reply Last reply Reply Quote 0
                  • Armilar
                    Armilar Most Active Forum Testing @Armilar last edited by Armilar

                    @armilar

                    on({id: [].concat(['0_userdata.0.NSPanel.1.Relay.1']).concat(['0_userdata.0.NSPanel.1.Relay.2']), change: "ne"}, async function (obj) {
                        console.log(obj.id);
                        console.log((obj.common ? obj.common.name : ""));
                        console.log((obj.common ? obj.common.desc : ""));
                        console.log(obj.channelId);
                        console.log(obj.channelName);
                        console.log(obj.deviceName);
                        console.log((obj.state ? obj.state.val : ""));
                        console.log((obj.state ? obj.state.ts : ""));
                        console.log((obj.state ? obj.state.q : ""));
                        console.log((obj.state ? obj.state.from : ""));
                    });
                    

                    Pass mal die beiden Datenpunkte im Trigger an deine an. Dann Trigger mal beide Datenpunkte (true/false) und sende das Log zurück.

                    --> Als neues Test-Script anlegen

                    Ich denke wir werden mit einem Spit über die obj.id gehen. Die ist eindeutig

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

                      @peoples

                      Habe es auf die obj.id umgeschrieben. Tausche mal die Zeilen im TS-Script aus...

                      //switch Relays 1 + 2 with DP's
                      async function Init_Relays() {
                          if (existsState(NSPanel_Path + 'Relay.1') == false ||
                              existsState(NSPanel_Path + 'Relay.2') == false) {
                              await createStateAsync(NSPanel_Path + 'Relay.1', true, { type: 'boolean' });
                              await createStateAsync(NSPanel_Path + 'Relay.2', true, { type: 'boolean' });
                          }
                      }
                      Init_Relays();
                      
                      on({id: [].concat(String(NSPanel_Path) + 'Relay.1').concat(String(NSPanel_Path) + 'Relay.2'), change: "ne"}, async function (obj) {
                          try {
                              console.log(obj.id);
                              let Button = obj.id.split('.');
                              console.log(((['http://',get_current_tasmota_ip_address(),'/cm?cmnd=Power',Button[Button.length - 1],' ',(obj.state ? obj.state.val : "")].join(''))));
                              require("request")((['http://',get_current_tasmota_ip_address(),'/cm?cmnd=Power',Button[Button.length - 1],' ',(obj.state ? obj.state.val : "")].join(''))).on("error", function (err) {console.error(err.message);});
                          } catch (err) { 
                              console.warn(err.message); 
                          }
                      });
                      
                      on({id: [].concat(config.mrIcon1ScreensaverEntity.ScreensaverEntity).concat(config.mrIcon2ScreensaverEntity.ScreensaverEntity), change: "ne"}, async function (obj) {
                          if (obj.id.substring(0,4) == 'mqtt') {
                              let Button = obj.id.split('.'); 
                              if (getState(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6)).val != obj.state.val) {
                                  await setStateAsync(NSPanel_Path + 'Relay.' + Button[Button.length - 1].substring(5,6), obj.state.val == 'ON' ? true : false);
                              }
                          }
                      });
                      
                      Peoples 1 Reply Last reply Reply Quote 0
                      • Armilar
                        Armilar Most Active Forum Testing @Wuschl last edited by

                        @wuschl

                        Oh ich dachte mehr wenn du direkt auf den Screensaver vom NSPanel siehst. Ist da alles okay, oder fehlt etwas?

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

                          @wuschl sagte in SONOFF NSPanel mit Lovelace UI:

                          Sehe soeben das pages-Array. Da ist auch ein Fehler drin. Es fehlen die Kommas - hab sie mal eingebaut.

                          pages: [
                                     Garagen,
                                     WLAN,
                                     Service             //Auto-Alias Service Page
                             ],
                          
                          1 Reply Last reply Reply Quote 0
                          • W
                            Wuschl @Armilar last edited by

                            @armilar da ist alles da.
                            Nur die Screensaver Einstellungen fehlen.

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

                              @wuschl

                              Den Post darüber mal geändert?

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

                                @armilar ja, Kommas eingebaut, aber ändert nichts.

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

                                  @wuschl

                                  Poste nochmal die Config, bitte

                                  und die aktuellen Logs.

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

                                    @armilar

                                    export const config: Config = {
                                        panelRecvTopic: 'mqtt.0.tele.NS-Panel-Paps_0BED20.RESULT',       // anpassen
                                        panelSendTopic: 'mqtt.0.cmnd.NS-Panel-Paps_0BED20.CustomSend',   // anpassen
                                        firstScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Hourly.h0.PrecipitationProbability', ScreensaverEntityIcon: 'weather-pouring', ScreensaverEntityText: 'Regen', ScreensaverEntityUnitText: '%', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100} },
                                        secondScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.WindSpeed', ScreensaverEntityIcon: 'weather-windy', ScreensaverEntityText: "Wind", ScreensaverEntityUnitText: 'km/h', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 120} },
                                        thirdScreensaverEntity: { ScreensaverEntity: "shelly.1.SHSW-1#E098068D8BFC#1.ext.temperatureC3", ScreensaverEntityIcon: "pool-thermometer", ScreensaverEntityText: "Pool", ScreensaverEntityUnitText: "°C", ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 40} },
                                        fourthScreensaverEntity: { ScreensaverEntity: 'accuweather.0.Current.RelativeHumidity', ScreensaverEntityIcon: 'water-percent', ScreensaverEntityText: 'Luft', ScreensaverEntityUnitText: '%', ScreensaverEntityIconColor: {'val_min': 0, 'val_max': 100, 'val_best': 65} },
                                        alternativeScreensaverLayout: false,
                                        autoWeatherColorScreensaverLayout: true,
                                        mrIcon1ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.stat.NS-Panel-Paps_0BED20.POWER1', ScreensaverEntityIcon: 'light-switch', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff  },
                                        mrIcon2ScreensaverEntity: { ScreensaverEntity: 'mqtt.0.stat.NS-Panel-Paps_0BED20.POWER2', ScreensaverEntityIcon: 'lightbulb', ScreensaverEntityOnColor: On, ScreensaverEntityOffColor: HMIOff  },
                                        timeoutScreensaver: 20,
                                        dimmode: 20,
                                        active: 100, //Standard-Brightness TFT
                                        screenSaverDoubleClick: true,
                                        locale: 'de-DE',                                // en-US, de-DE, nl-NL, da-DK, es-ES, fr-FR, it-IT, ru-RU, etc.
                                        timeFormat: '%H:%M',                            // currently not used 
                                        dateFormat: '%A, %d. %B %Y',                    // currently not used 
                                        weatherEntity: 'alias.0.Wetter.Gerät_1',                // Dieser Alias muss erstellt werden, damit die 4 kleineren Icons (Wetter oder DP) angezeigt werden können --> oder autoCreateAlias auf true
                                        defaultOffColor: Off,
                                        defaultOnColor: On,
                                        defaultColor: Off,
                                        defaultBackgroundColor: Black,    //New Parameter
                                        temperatureUnit: '°C',
                                        pages: [
                                                Garagen,
                                                WLAN,
                                               
                                                Service             //Auto-Alias Service Page
                                        ],
                                        subPages: [
                                                                    
                                                    NSPanel_Infos,              //Auto-Alias Service Page
                                                    NSPanel_Einstellungen,      //Auto-Alias Service Page
                                                    NSPanel_Firmware_Info       //Auto-Alias Service Page
                                        ],
                                        button1Page: null,   //Beispiel-Seite auf Button 1, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null, 
                                        button2Page: null    //Beispiel-Seite auf Button 2, wenn Rule2 definiert - Wenn nicht definiert --> button1Page: null,
                                    };
                                    
                                    
                                    16.11.2022, 22:14:57.478	[info ]: javascript.0 (806) Stop script script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5
                                    16.11.2022, 22:15:01.129	[info ]: javascript.0 (806) script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5: compiling TypeScript source...
                                    16.11.2022, 22:15:01.900	[info ]: javascript.0 (806) script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5: source code did not change, using cached compilation result...
                                    16.11.2022, 22:15:01.983	[info ]: javascript.0 (806) script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5: Wetter-Alias existiert bereits
                                    16.11.2022, 22:15:02.043	[info ]: javascript.0 (806) script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5: registered 13 subscriptions, 7 schedules, 0 messages, 0 logs and 0 file subscriptions
                                    16.11.2022, 22:15:03.460	[warn ]: javascript.0 (806)     at script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:1293:46
                                    16.11.2022, 22:15:03.460	[warn ]: javascript.0 (806)     at step (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:33:23)
                                    16.11.2022, 22:15:03.461	[warn ]: javascript.0 (806)     at Object.next (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:14:53)
                                    16.11.2022, 22:15:03.461	[warn ]: javascript.0 (806)     at fulfilled (script.js.Papa-Garagen.NS-Panel-Paps-3_5_0_5:5:58)```
                                    

                                    code_text

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

                                      @armilar
                                      bitteschön

                                      2022-11-16 22:26:07.923 - info: javascript.0 (400696) script.js.test: 0_userdata.0.NSPanel.Fitness.Relay.1
                                      2022-11-16 22:26:07.924 - info: javascript.0 (400696) script.js.test: 0_userdata.0.NSPanel.Fitness.Relay.1
                                      2022-11-16 22:26:07.924 - info: javascript.0 (400696) script.js.test: undefined
                                      2022-11-16 22:26:07.924 - info: javascript.0 (400696) script.js.test: 0_userdata.0.NSPanel.Fitness.Relay
                                      2022-11-16 22:26:07.924 - info: javascript.0 (400696) script.js.test: Relay
                                      2022-11-16 22:26:07.924 - info: javascript.0 (400696) script.js.test: Fitness
                                      2022-11-16 22:26:07.925 - info: javascript.0 (400696) script.js.test: true
                                      2022-11-16 22:26:07.925 - info: javascript.0 (400696) script.js.test: 1668633967917
                                      2022-11-16 22:26:07.925 - info: javascript.0 (400696) script.js.test: 0
                                      
                                      Armilar 1 Reply Last reply Reply Quote 1
                                      • Armilar
                                        Armilar Most Active Forum Testing @Peoples last edited by

                                        @peoples

                                        Okay, hatte ich mir schon gedacht.

                                        Nimm mal den Code aus diesen Post (vor ein paar Minuten):
                                        https://forum.iobroker.net/post/893216

                                        Ich habe die obj.id zerlegt und nehme den Teil nach dem Punkt. Dann sollte es passen.

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

                                          @wuschl

                                          hmm, dachte ich hätte eben geantwortet. Aber dann sah ich meine Frage nicht mehr 😵

                                          Ich kann keine Fehler finden in der Config. Sende mal den kompletten oberen Teil (Code in einem Spoiler)

                                          erst
                                          d3e1159d-627f-4295-bd5a-394290da4aa1-image.png
                                          dann außen noch
                                          a872249c-5fd8-4edb-beda-90fa4a6cd5f9-image.png

                                          Muss ich mir komplett ansehen. Irgendwo ist noch ein Fehlerchen in dem Teil. Kann aber bis morgen dauern.

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

                                            @armilar
                                            Ja mit der Änderung funktioniert es

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            881
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

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