Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Diskussion zum HowTo nodejs-Installation und upgrade

    NEWS

    • ioBroker goes Matter ... Matter Adapter in Stable

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    Diskussion zum HowTo nodejs-Installation und upgrade

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @Siggi0904 last edited by

      @siggi0904 dann nimm doch das Skript

      S 1 Reply Last reply Reply Quote 0
      • S
        skorpil @Homoran last edited by

        @homoran welches?

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

          @skorpil iob nodejs-update 20

          S 1 Reply Last reply Reply Quote 0
          • S
            skorpil @Homoran last edited by

            @homoran Danke. Ich verstehe.

            1 Reply Last reply Reply Quote 0
            • P
              powerich last edited by

              Hallo Zusammen
              auch ich habe versucht eine nodejs update durchzuführen. Leider ohne Erfolg.

              Folgendes Problem habe ich nach dem Update mit nodejs:

              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              

              Ich habe alles versucht was ich im Forum gefundeun habe.

              • Löschen der bisherigen Version
              • Löschen der Verzeichnisse und Dateiverknüpfungen
              • Manuelle Installation nach "neuer Anleitung"
              • Automatische installation

              Hier schon mal der "iob diag"

              ======================= SUMMARY =======================
                                      v.2024-05-22
              
              
                 Static hostname: rpiiobroker
                       Icon name: computer
                Operating System: Raspbian GNU/Linux 10 (buster)
                          Kernel: Linux 5.10.103-v7+
                    Architecture: arm
              
              Installation:           native
              Kernel:                 armv7l
              Userland:               32 bit
              Timezone:               Europe/Berlin (CEST, +0200)
              User-ID:                1000
              Display-Server:         false
              Boot Target:            graphical.target
              
              Pending OS-Updates:     0
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              Pending iob updates:    0
              
              Nodejs-Installation:
              nodejs: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by nodejs)
              /usr/bin/nodejs
              nodejs: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by nodejs)
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              /usr/bin/node
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              /usr/bin/npm
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              /usr/bin/npx
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              /usr/bin/corepack
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              
              Recommended versions are nodejs  and npm
              Your nodejs installation is correct
              
              MEMORY:
                            total        used        free      shared  buff/cache   available
              Mem:           923M         50M        113M         16M        758M        792M
              Swap:           99M        2.0M         97M
              Total:         1.0G         53M        211M
              
              Active iob-Instances:   0
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              ioBroker Core:          js-controller
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
                                      admin
              
              node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
              ioBroker Status:
              
              Status admin and web instance:
              
              Objects:                0
              States:                 0
              
              Size of iob-Database:
              
              1.3M    /opt/iobroker/iobroker-data/objects.json.bak
              1.3M    /opt/iobroker/iobroker-data/objects.json
              148K    /opt/iobroker/iobroker-data/states.json.bak
              148K    /opt/iobroker/iobroker-data/states.json
              
              
              
              =================== END OF SUMMARY ====================
              

              Vielen Dand für eure neuen Ideen zur Problemlösung.

              Grüße
              Ichda

              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @powerich last edited by Thomas Braun

                @powerich sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                Operating System: Raspbian GNU/Linux 10 (buster)

                Zu alt, installier da NEU Raspberry OS 12 'Bookworm', bevorzugt in den 64Bit-Variante 'Lite' - Ohne Desktop.

                https://forum.iobroker.net/topic/51869/installation-auf-raspi-einfacher-geht-s-nicht

                1 Reply Last reply Reply Quote 0
                • S
                  skorpil last edited by skorpil

                  mein system zeigt bei der Anwendung von

                  iob nodejs-update
                  

                  folgendes an:

                  Recommended nodejs-version is: 18.20.4
                  Checking your installation now. Please be patient!
                  
                  Your current setup is:
                  /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
                  We found these nodejs versions available for installation:
                  
                  nodejs:
                    Installed: 18.20.4-1nodesource1
                    Candidate: 18.20.4-1nodesource1
                  
                  

                  mit anderen Worten: die 20 wird NICHT gefunden.

                  Die Info Box sagt:

                  Plattform: linux
                  Betriebssystem: linux
                  Architektur: x64
                  CPUs: 2
                  Geschwindigkeit: 1996 MHz
                  Modell: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz
                  RAM: 3.8 GB
                  System-Betriebszeit: 00:33:29
                  Node.js: v18.20.4
                  time: 1722086029102
                  timeOffset: -120
                  NPM: 10.7.0
                  Adapter-Anzahl: 539
                  Datenträgergröße: 18.6 GB
                  Freier Festplattenspeicher: 9.1 GB
                  Aktive Instanzen: 5
                  Pfad: /opt/iobroker/
                  Betriebszeit: 00:00:22
                  aktiv:
                  
                  

                  meldet also auch, daß kein update notwendig ist.

                  Muß nicht eigentlich irgendwo auf die Notwendigkeit auf die empfohlene 20er Version zu updaten hingewiesen werden? Oder kommt das später? Oder sollte ich überhaupt updaten? Und dann mit:

                  iob nodejs-update 20
                  

                  Obwohl ich ja mit der 20 es schon mal versucht habe und dann Probleme mit httpGet hatte, wollte ich es noch einmal versuchen.

                  Danke für Hilfe.

                  Summery aus diag im spoiler


                  ======================= SUMMARY =======================
                  v.2024-05-22

                  Static hostname: LinuxNeu
                  Icon name: computer-vm
                  Chassis: vm 🖴
                  Virtualization: oracle
                  Operating System: Debian GNU/Linux 12 (bookworm)
                  Kernel: Linux 6.1.0-23-amd64
                  Architecture: x86-64
                  Hardware Vendor: innotek GmbH
                  Hardware Model: VirtualBox
                  Firmware Version: VirtualBox

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

                  Pending OS-Updates: 0
                  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 18.20.4 and npm 10.7.0
                  Your nodejs installation is correct

                  MEMORY:
                  total used free shared buff/cache available
                  Mem: 4.1G 2.1G 1.6G 2.5M 715M 2.0G
                  Swap: 1.0G 0B 1.0G
                  Total: 5.1G 2.1G 2.6G

                  Active iob-Instances: 16
                  Active repo(s): stable

                  ioBroker Core: js-controller 5.0.19
                  admin 6.17.14

                  ioBroker Status: iobroker is running on this host.

                  Objects type: jsonl
                  States type: jsonl

                  Status admin and web instance:

                  • system.adapter.admin.0 : admin : LinuxNeu - enabled, port: 8081, bind: 0.0.0.0, run as: admin

                  Objects: 19441
                  States: 16301

                  Size of iob-Database:

                  24M /opt/iobroker/iobroker-data/objects.jsonl
                  11M /opt/iobroker/iobroker-data/objects.json.migrated
                  11M /opt/iobroker/iobroker-data/objects.json.bak.migrated
                  0 /opt/iobroker/iobroker-data/objects.json.broken
                  6.7M /opt/iobroker/iobroker-data/states.jsonl
                  1.6M /opt/iobroker/iobroker-data/states.json.migrated
                  1.6M /opt/iobroker/iobroker-data/states.json.bak.migrated
                  0 /opt/iobroker/iobroker-data/states.json.broken

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

                  
                  === Mark text until here for copying ===
                  [/s]
                  Thomas Braun 1 Reply Last reply Reply Quote 0
                  • Thomas Braun
                    Thomas Braun Most Active @skorpil last edited by

                    @skorpil sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                    mit anderen Worten: die 20 wird NICHT gefunden.

                    Das hängt mit dem admin zusammen. Der hat die v18 fix drin. Nichtsdestotrotz ist nodejs@20 die vorgesehene Version.
                    Mit admin@7 funktioniert es dann auch:

                    Nothing to do - Your installation is using the correct paths.
                    
                    You are running nodejs v22.5.1. Do you want to install recommended version 20.16.0? 
                    
                    Press <y> to continue or any other key to quit
                    
                    
                    S 1 Reply Last reply Reply Quote 0
                    • S
                      skorpil @Thomas Braun last edited by

                      @thomas-braun Dankeschön. Und wie komme ich an den Admin 7? Wenn ich dich richtig verstehe, dann erst mit

                      iob nodejs-update 20
                      
                      

                      updaten und dann später den Admin7, wenn er in den Adaptern als updatable angezeigt wird, updaten?

                      Thomas Braun 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @skorpil last edited by

                        @skorpil sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                        Und wie komme ich an den Admin 7?

                        Der kommt irgendwann als stabile Version bei der üblichen Systempflege mit. Musste jetzt gar nix machen.
                        Bring nodejs auf Version 20 und gut ist...

                        iob nodejs-update 20
                        
                        S 1 Reply Last reply Reply Quote 0
                        • S
                          skorpil @Thomas Braun last edited by

                          @thomas-braun Dankeschön. Ich werde es testen.

                          Ich war ja schon mal kurz auf der 20, habe aber ein Scriptproblem und bin dann wieder zurück, da ich mein System in der VirtualBox betreibe, ich kann daher stets zurück..

                          Dieses Script

                          // ##################################################################

                          // Erst Ansage, dann Radio ein u. nach 45 min aus

                          // ##################################################################

                          // ##################################################################
                          // Definitionen Ansage
                          // ##################################################################

                          // Quellen
                          var idWetter = "hm-rega.0.29954";
                          var idTemperatursensor = 'hm-rpc.0.OEQ1296052.1.TEMPERATURE'/Außentemperatur:1 TEMPERATURE/
                          // var idSayVar = "hm-rega.0.38101";//Variable Sayit <= Alt, wenn Steuerung via CCU Variable;
                          var idBM = 'hm-rpc.0.JEQ0266058.1.MOTION'/BewMldr Treppenhaus:1 MOTION/

                          // Definition APIsay Büro Ikea;
                          // var APIsayBuero = "http://192.168.0.105:5005/Büro Ikea/say/";

                          // Definition APIsay Schlafzimmer;
                          // var APIsaySchlafzimmer = "http://192.168.0.105:5005/Schlafzimmer/say/";

                          // Definition APIsay Kueche;
                          var APIsayKueche = "http://192.168.0.105:5005/Küche/say/";

                          // Definition APIsay Terrasse;
                          // var APIsayTerrasse = "http://192.168.0.105:5005/Terrasse/say/";

                          // Definition Lautstärke;
                          var lautstaerke = "50";

                          var aufstehen = false;

                          // ####################################################
                          // Funktionen (Basiswerte ermitteln)
                          // ####################################################

                          function ermitteleAnsagedatum () {
                          //Wochentag ermitteln
                          var d = new Date ();
                          var w = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
                          var wochentag = w[d.getDay()];

                              //Tagesdatum ermitteln
                              var tag = d.getDate();
                          
                              //Monat ermitteln
                              var month = new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
                              var monat = month[d.getMonth()];
                          
                              //Jahr ermitteln
                              var jahr = d.getFullYear();
                          
                              //Stunde ermitteln
                              var stunde = d.getHours();
                          
                              //Minute ermitteln
                              var minute = d.getMinutes();
                          
                              //Begrüssung ermitteln
                              var Begr = " ";
                              if(stunde<=12){Begr = "Guten Morgen"};
                              if(stunde>=12 && stunde<=17){Begr = "Guten Tag"};
                              if(stunde>17){Begr = "Guten Abend"};
                          
                              return { // zurückgeben
                                  'Jahr'      : jahr,
                                  'Monat'     : monat,
                                  'Tag'       : tag,
                                  'Wochentag' : wochentag,
                                  'Stunde'    : stunde,
                                  'Minute'    : minute,
                                  'Begr'      : Begr
                              };
                          }
                          

                          function ermitteleWetter () { // Wetterbedingungen
                          var wetterdaten = getState(idWetter).val;
                          // log('Wetter: ' + wetterdaten);
                          return(wetterdaten);
                          }

                          function ermitteleAnsageTemperatur () {
                          // Die Außentemperatur ist xx. Das Wetter heute ist xx
                          // Einfache Temperaturansage mit SayIt.
                          // Variante 1 mittels splitten der Temperatur, damit die Ansage nicht
                          // "Es sind 18 Punkt 2 Grad " sagt.

                          var temperatursensor = getState(idTemperatursensor).val;
                          var temp_string = temperatursensor.toString();
                          //    log('Temp  ' + temp_string);
                          var temp_array = [];
                          temp_array = temp_string.split(".");
                          
                          // Fange leere Nachkommastellen ab. Das passiert, wenn die Temperatur z. B. 18.0 ist.
                          // Es wird dann nur "18" gelesen.
                          if (!temp_array[1]) {
                          temp_array[1] = "0";
                          //log("Die Nach-Kommastelle in temp_array[1] war nicht vorhanden und wird nun fest auf 0 gesetzt.");
                          }
                          return{
                              'Ganzzahl'      : temp_array[0],
                              'Nachkommazahl' : temp_array[1]
                              };
                          }
                          

                          // ##########################################################
                          // ANSAGE (GETRIGGERT via BewMldr)
                          // EINMALIG im Zeitraum 6:00 - 10:00, wenn BewMldr
                          // ##########################################################

                          on(idBM, function(dp) {

                          log("Motion ausgelöst");

                          if(dp.state.val && compareTime('6:00', '10:00', 'between') && !aufstehen) {
                          aufstehen = true;

                            log("Motion ausgelöst, in der Zeit und aufstehen falsch");
                          
                          // ##########################################################
                          //         ANSAGE Verögerung 10 sec
                          // ##########################################################
                          
                          setTimeout(function() {
                          
                            var ansagetext = ermitteleAnsagedatum().Begr + ", heute ist " + ermitteleAnsagedatum().Wochentag + " der " + ermitteleAnsagedatum().Tag + "te " + ermitteleAnsagedatum().Monat + ' ' + ermitteleAnsagedatum().Jahr 
                                      + ". Es ist " + ermitteleAnsagedatum().Stunde + "  Uhr und " + ermitteleAnsagedatum().Minute + "  Minuten." 
                                      + " Die Aussentemperatur beträgt " + ermitteleAnsageTemperatur().Ganzzahl + "," + ermitteleAnsageTemperatur().Nachkommazahl + " Grad." 
                                      + " Wetter Bedingungen, " + ermitteleWetter() +" .";
                          

                          // ##################################################################
                          // Ansagetext zusammenstellen und in Objekt schreiben
                          // ##################################################################

                          // Ansagetext
                              // Basisansage
                              var Ansage = ansagetext;
                              
                              //Geburtstagsansage
                              var tempGEBURTSTAGE = "javascript.0.Ansage.GeburtstageHEUTE";
                              var AnsageGEBURTSTAGE = getState(tempGEBURTSTAGE).val;
                              
                              //Muellsansage heute
                              var tempMUELLheute = "javascript.0.Ansage.MuellHEUTE";
                              var AnsageMUELLheute = getState(tempMUELLheute).val;
                              
                              //Muellsansage Zukunft
                              var tempMUELLzukunft = "javascript.0.Ansage.MuellZUKUNFT";
                              var AnsageMUELLzukunft = getState(tempMUELLzukunft).val;
                          
                          /*log("Tempansage--------------------->" + tempAnsage);
                          log("Ansage--------------------->" + Ansage);
                          

                          {1}
                          log("tempGEBURTSTAGE--------------------->" + tempGEBURTSTAGE);
                          log("AnsageGEBURTSTAGE--------------------->" + AnsageGEBURTSTAGE);
                          {1}
                          log("tempMUELLheute--------------------->" + tempMUELLheute);
                          log("AnsageMUELLheute--------------------->" + AnsageMUELLheute);
                          {1}
                          log("tempMUELLzukunft--------------------->" + tempMUELLzukunft);
                          log("AnsageMUELLzukunft--------------------->" + AnsageMUELLzukunft);*/

                          // ####################################################
                          // Wenn Geburtstag dann mit ansagen
                          // ####################################################
                          
                          if (AnsageGEBURTSTAGE.length > 2) { // wenn der Inhalt des Objektes "AnsageGEBURTSTAGE" größer als 2 Zeichen lang ist, dann ...
                              Ansage = Ansage + "Heute haben Geburtstag, " + AnsageGEBURTSTAGE +" .";
                              //log("Ansage mit Geburtstag--------------------->" + Ansage);
                          }
                          
                          
                          // ####################################################
                          // Wenn Müll dann mit ansagen
                          // ####################################################
                          
                          if (AnsageMUELLheute.length > 2) { // wenn der Inhalt des Objektes "AnsageMUELLheute" größer als 2 Zeichen lang ist, dann ...
                              Ansage = Ansage + "  Achtung, heute ist " + AnsageMUELLheute +" ." + "Bitte an die Strasse stellen" + " !";
                              //log("Ansage mit Geburtstag und Muell heute--------------------->" + Ansage);
                          }
                          
                          // ####################################################
                          // Wenn Müll ZUKUNFT, dann mit ansagen
                          // ####################################################
                          
                          if (AnsageMUELLzukunft.length > 2) { // wenn der Inhalt des Objektes "AnsageMUELLzukunft" größer als 2 Zeichen lang ist, dann ...
                              Ansage = Ansage + "  Achtung, morgen ist " + AnsageMUELLzukunft + " ." + "Bitte MORGEN an die Strasse stellen" + " !";
                              //log("Ansage mit Geburtstag und Muell heute und morgen--------------------->" + Ansage);
                          }    
                          
                          //Ansage
                          Ansage = APIsayKueche + Ansage + "/" + lautstaerke;       
                          
                          ansagenSonos(Ansage);//Funktion mit HttpGet in Global
                          

                          }, 15000);
                          // Ende timeout/ Verzögerung

                          //****************************************************************************************** */

                          //************************************************
                          //Javascript zum Schalten von Sonos via BewMldr
                          //************************************************

                              /* Das folgende sind nur Befehle, die ich mir aufgehoben habe: 
                              // var idSonosfav = getState("sonos.0.root.192_168_0_63.favorites_list").val;      //speichern des aktuellen Senders
                              // var idSonosplay = getState ("sonos.0.root.192_168_0_63.state_simple").val;     //Status des Speakers
                              // laut = getState('sonos.0.root.' + raum + '.volume').val;
                              // log(idSonosfav);
                              // log(idSonosplay);*/
                          

                          //*******************************************
                          // Definitionen für Radio
                          //*******************************************

                          // *******************************************************************************  
                          // Info zum Verzeichnis     /home/brs/node-sonos-http-api-master/static/says/;
                          // Definitionen MP3;
                          // herzlichWillkommen.mp3";
                          // var herz = "herzlichWillkommen.mp3";
                          // HundeGebell.mp3;
                          // var hund = "HundeGebell.mp3";
                          // Rolladen.mp3;
                          // var roll = "Rolladen.mp3";
                          
                          //AUFRUF:
                                  //Beispiel: http://192.168.0.105:5005/B%C3%BCro%20Ikea/favorite/RTL - Die besten Hits aller Zeiten
                          
                          
                          // IDsonosAufr = "http://192.168.0.105:5005/"<------hier richtige IP eintragen
                          
                          // Definition STRUKTUR
                          // Achtung, am Ende der Einzelteile des Aufrufs jeweils ein "7"
                          // IDsonosAufr + IDsonosRaum + IDsonosFunktion + IDsonosSender + laut
                              
                              //Favorites bzw. Sender
                              //IDsonosSender = "104.6 RTL Weihnachtsradio/"
                              //IDsonosSender = "RTL - Die besten Hits aller Zeiten/"
                              //IDsonosSender = "RTL - Die besten Hits aller Zeiten/"
                              //IDsonosSender = "RTL Deutschlands Hit-Radio/"
                          
                              //Definition Räume
                              // Definition raum Büro Ikea;
                              // IDsonosRaum ="B%C3%BCro%20Ikea/";
                          
                              // Definition raum Schlafzimmer;
                              // IDsonosRaum = "Schlafzimmer/";
                          
                              // Definition raum Kueche;
                              // IDsonosRaum = "K%C3%BCche/";
                          
                              // Definition raum Terrasse;
                              // IDsonosRaum = "Terrasse/";
                          
                              // Definition Funktionen
                              // IDsonosFunktion = "say/"
                              // IDsonosFunktion = "clip/"
                              // IDsonosFunktion = "favorite/"
                              // IDsonosFunktion = "pause"; <-------ohne "/"
                          
                          
                          
                          //STOP
                          //BEISPIEL: http://192.168.0.105:5005/B%C3%BCro%20Ikea/pause
                          //STRUKTUR: IDsonosAufr + IDsonosRaum + IDsonosFunktion
                          
                          // das ist der Aufruf
                          // ansagenSonos(radioAbspiel);
                          // Funktion mit HttpGet in Global
                          
                          // Anweisung setzen LAUTSTAERKE
                          // var laut = "8";//<------hier gewünschte LAUTSTÄRKE eintragen
                          
                          // *******************************************************************************  
                          

                          var IDsonosAufr = "http://192.168.0.105:5005/";
                          var IDsonosRaum = "K%C3%BCche/";

                          // ************************************************  
                          // Auswahl Radiosender
                              // Sender muß in Favoriten vorhanden sein
                              // momentan: 104.6 RTL Weihnachtsradio, RTL Deutschlands Hit-Radio, RTL - Die besten Hits aller Zeiten
                          // ************************************************
                          

                          var IDsonosSender = "RTL - Die besten Hits aller Zeiten/";
                          // var radioAbspiel = IDsonosAufr + IDsonosRaum + IDsonosFunktion + IDsonosSender;

                          setTimeout(function() {
                          // ************************************************
                          // nach 60 sekunden starten
                          // ************************************************

                          // Befehle ausführen

                          // ************************************************
                          // Befehl zum play
                          // ************************************************
                          

                          var IDsonosFunktion = "favorite/";
                          var radioAbspiel = IDsonosAufr + IDsonosRaum + IDsonosFunktion + IDsonosSender;

                          ansagenSonos(radioAbspiel);//Funktion mit HttpGet in Global

                          // Lautstaeke einstellen
                          var IDsonosFunktion = "volume/";
                          var laut = "8";
                          var radioAbspiel = IDsonosAufr + IDsonosRaum + IDsonosFunktion + laut;

                          ansagenSonos(radioAbspiel);//Funktion mit HttpGet in Global

                          // Ende lautstaerke

                          }, 60000);
                          // Ende timeout für Start

                          setTimeout(function() {
                          // ************************************************
                          // Befehl zum stop nach 45 Minuten
                          // ************************************************

                          var IDsonosFunktion = "pause";
                          var radioAbspielStop = IDsonosAufr + IDsonosRaum + IDsonosFunktion;

                          log("radioAbspielStop--------------------->" + radioAbspielStop);

                          ansagenSonos(radioAbspielStop);//Funktion mit HttpGet in Global

                          }, 2700000);
                          // Ende timeout für Stop

                          }
                          // Ende If

                          });

                          // ####################################################
                          //     var "aufstehen" zurücksetzen auf false um 3 Uhr
                          // ####################################################
                          

                          schedule('0 3 * * *', function() {
                          aufstehen = false;
                          });

                          in Verbindung mit diesem globalen Script


                          function ansagenSonos(url) {
                          httpGet(url, {timeout: 30000}, (error) => {
                          if(error) {
                          console.error(error);
                          }
                          });
                          }

                          Unter der Version 18 laufen meine Scripte komplett fehlerfrei durch. Unter der 20er Version entsteht der Fehler "socket hang up".

                          Ich teste nochmal das update auf die 20 und werde hier berichten.

                          Thomas Braun 1 Reply Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @skorpil last edited by

                            @skorpil sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                            und werde hier berichten.

                            Bitte nicht hier. Mach einen eigenen Thread mit deinem Skript auf.

                            S 1 Reply Last reply Reply Quote 1
                            • S
                              skorpil @Thomas Braun last edited by

                              @thomas-braun okay! Da es offenbar mit nodejs zusammenhängt anderseits auch das Scripten betrifft: in welches Kategorie sollte ich das posten, damit es die richtigen Leute sehen?

                              Und nochmals danke!

                              Thomas Braun 1 Reply Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @skorpil last edited by

                                @skorpil

                                https://forum.iobroker.net/category/6/skripten-logik

                                S 1 Reply Last reply Reply Quote 1
                                • S
                                  skorpil @Thomas Braun last edited by

                                  @thomas-braun okay, Merci

                                  W 1 Reply Last reply Reply Quote 0
                                  • W
                                    Würfel @skorpil last edited by

                                    HI,
                                    wollte eben von Nodejs 18 auf 20 updaten,

                                    Mit dem Befehl: iob nodejs-update 20 bekam ich folgende Meldung;

                                    iobroker nodejs-update [<major-version>]
                                    
                                    Upgrade the Node.JS installation to the current LTS
                                    
                                    Options:
                                      --help  Show help  [boolean]
                                    

                                    Will/kann er nicht updaten oder wo liegt das Problem?
                                    Bevor ich mir was zerstöre wollte ich lieber vorher fragen.

                                    Sudo apt update und sudo apt upgrade habe ich durchlaufen lassen vorher.

                                    Danke
                                    Tobias

                                    Homoran Thomas Braun 2 Replies Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators @Würfel last edited by

                                      @würfel sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                      Mit dem Befehl: iob nodejs-update 20 bekam ich folgende Meldung;

                                      den seh ich nicht!

                                      bitte komplett alles zeigen, incl prompt

                                      1 Reply Last reply Reply Quote 0
                                      • Thomas Braun
                                        Thomas Braun Most Active @Würfel last edited by

                                        @würfel sagte in Diskussion zum HowTo nodejs-Installation und upgrade:

                                        Will/kann er nicht updaten oder wo liegt das Problem?

                                        iob stop
                                        iob fix
                                        

                                        und dann nochmal versuchen.

                                        W 1 Reply Last reply Reply Quote 0
                                        • W
                                          Würfel @Thomas Braun last edited by

                                          @thomas-braun
                                          HI,
                                          damit hat es geklappt.
                                          Installation ist durchgelaufen.
                                          Nodejs 20.16
                                          NPM 10.8.1

                                          Vielen Dank !!!
                                          Tobias

                                          Michael ÜB 1 Reply Last reply Reply Quote 0
                                          • Michael ÜB
                                            Michael ÜB @Würfel last edited by

                                            Hallo,
                                            ich habe leider auch Probleme node-js etc upzudaten.
                                            Ich hab schon alles mögliche versucht.

                                            Folgende Fehlermeldung erhalte ich:

                                            Recommended versions are nodejs 20.17.0 and npm 10.8.2
                                            *** nodejs is NOT correctly installed ***
                                            Wrong installation path detected. This needs to be fixed.
                                            
                                            Please execute
                                            iobroker nodejs-update
                                            to fix these errors.
                                            

                                            komplettes iob diag siehe unten.

                                            iobroker nodejs-update funktioniert dann auch nicht:

                                            ioBroker nodejs fixer 2024-05-23
                                            
                                            Recommended nodejs-version is: 20.17.0
                                            Checking your installation now. Please be patient!
                                            
                                            Your current setup is:
                                            /usr/bin/node 		v16.18.1
                                            /usr/bin/npm 		8.19.2
                                            /usr/bin/npx 		8.19.2
                                            /usr/bin/corepack 	0.14.1
                                            
                                            We found these nodejs versions available for installation:
                                            
                                            nodejs:
                                              Installed: 16.18.1-deb-1nodesource1
                                              Candidate: 20.17.0-1nodesource1
                                              Version table:
                                                 20.17.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.16.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.15.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.15.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.14.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.13.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.13.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.12.2-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.12.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.12.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.11.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.11.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.10.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.9.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.8.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.8.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.7.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.6.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.6.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.5.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.5.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.4.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.3.1-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.3.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.2.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.1.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                                 20.0.0-1nodesource1 1001
                                                    500 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages
                                             *** 16.18.1-deb-1nodesource1 100
                                                    100 /var/lib/dpkg/status
                                                 12.22.12~dfsg-1~deb11u4 500
                                                    500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
                                            
                                            
                                            
                                            Nothing to do - Your installation is using the correct paths.
                                            
                                            You are running nodejs v16.18.1. Do you want to install recommended version 20.17.0? 
                                            
                                            Press <y> to continue or any other key to quit
                                            Trying to fix your installation now. Please be patient.
                                            Waiting for ioBroker to shut down - Give me a minute...
                                            ############################################################
                                            
                                            *** These repos are active on your system:
                                            Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
                                            Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]    
                                            Get:3 https://packages.grafana.com/oss/deb stable InRelease [7660 B]           
                                            Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages [13.2 MB]
                                            Err:3 https://packages.grafana.com/oss/deb stable InRelease
                                              The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            Fetched 13.3 MB in 7s (1782 kB/s)                                              
                                            Reading package lists... Done
                                            W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Some index files failed to download. They have been ignored, or old ones used instead.
                                            
                                            *** Installing ca-certificates, curl and gnupg, just in case they are missing.
                                            
                                            *** Creating new /etc/apt/sources.list.d/nodesource.list and pinning source
                                            
                                            deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main
                                            Package: nodejs
                                            Pin: origin deb.nodesource.com
                                            Pin-Priority: 1001
                                            
                                            *** These repos are active after the adjustments:
                                            Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
                                            Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease              
                                            Get:3 https://packages.grafana.com/oss/deb stable InRelease [7660 B]           
                                            Hit:4 https://deb.nodesource.com/node_20.x nodistro InRelease                  
                                            Err:3 https://packages.grafana.com/oss/deb stable InRelease
                                              The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            Reading package lists... Done
                                            W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Some index files failed to download. They have been ignored, or old ones used instead.
                                            
                                            Installing nodejs now!
                                            
                                            /home/iobroker/.nodejs-update.sh: line 370: [: : integer expression expected
                                            /home/iobroker/.nodejs-update.sh: line 387: [: : integer expression expected
                                            Installing the nodejs!
                                            W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 963FA27710458545
                                            W: Some index files failed to download. They have been ignored, or old ones used instead.
                                            E: Failed to fetch https://packages.grafana.com/oss/deb/pool/main/g/grafana/grafana-rpi_10.1.0_arm.deb  404  Not Found [IP: 2a04:4e42:8e::729 443]
                                            E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
                                            
                                            We tried our best to fix your nodejs. Please run iob diag again to verify.
                                            
                                            *** RESTARTING ioBroker NOW! *** 
                                             Please refresh or restart your browser in a few moments.
                                            
                                            

                                            komplettes iob diag:

                                            ======================= SUMMARY =======================
                                            			v.2024-05-22
                                            
                                            
                                               Static hostname: michisraspi
                                                     Icon name: computer
                                              Operating System: Raspbian GNU/Linux 11 (bullseye)
                                                        Kernel: Linux 5.15.61-v7l+
                                                  Architecture: arm
                                            
                                            Installation: 		native
                                            Kernel: 		armv7l
                                            Userland: 		32 bit
                                            Timezone: 		Europe/Berlin (CEST, +0200)
                                            User-ID: 		1000
                                            Display-Server: 	true
                                            Boot Target: 		graphical.target
                                            
                                            Pending OS-Updates: 	311
                                            Pending iob updates: 	14
                                            
                                            Nodejs-Installation:
                                            nodejs: 		N/A
                                            /usr/bin/node 		v16.18.1
                                            /usr/bin/npm 		8.19.2
                                            /usr/bin/npx 		8.19.2
                                            /usr/bin/corepack 	0.14.1
                                            
                                            Recommended versions are nodejs 20.17.0 and npm 10.8.2
                                            *** nodejs is NOT correctly installed ***
                                            Wrong installation path detected. This needs to be fixed.
                                            
                                            Please execute
                                            iobroker nodejs-update
                                            to fix these errors.
                                            
                                            MEMORY: 
                                                           total        used        free      shared  buff/cache   available
                                            Mem:            1.9G        822M         99M         21M        950M        1.1G
                                            Swap:            99M        1.0M         98M
                                            Total:          2.0G        824M        197M
                                            
                                            Active iob-Instances: 	14
                                            Active repo(s): stable
                                            
                                            ioBroker Core: 		js-controller 		4.0.24
                                            			admin 			7.0.23
                                            
                                            ioBroker Status: 	iobroker is running on this host.
                                            
                                            
                                            Objects type: jsonl
                                            States  type: jsonl
                                            
                                            Status admin and web instance:
                                            + system.adapter.admin.0                  : admin                 : michisraspi                              -  enabled, port: 8081, bind: 0.0.0.0 (SSL), run as: admin
                                            + system.adapter.web.0                    : web                   : michisraspi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                            
                                            Objects: 		2107
                                            States: 		1864
                                            
                                            Size of iob-Database:
                                            
                                            11M	/opt/iobroker/iobroker-data/objects.jsonl
                                            748K	/opt/iobroker/iobroker-data/states.jsonl
                                            
                                            
                                            
                                            =================== END OF SUMMARY ====================
                                            
                                            Thomas Braun Homoran 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

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

                                            638
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            nodejs
                                            91
                                            844
                                            167325
                                            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