MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. stoffel
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 35
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Error updating MM

      @sil3ntstorm i make sudo rm -r /usr/lib/node_modules
      then i used the upgrade-script
      bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply.
      the script above
      bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/node20_install.sh)”
      not work for me, error arch=: Zeile 1: “#!/bin/bash: Datei oder Verzeichnis nicht gefunden.

      after that i make npm install in the MagicMirror directory. Now all works fine for me

      posted in Troubleshooting
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270 habe das Modul upgedated. Funktioniert gut. Vielen Dank.

      Übrigens, mein ssl-Problem liegt vielleicht doch an surfmusik.de.
      Unter ssllab.com kann man die Zertifikate testen lassen und bekommt einen ausfürlichen Bericht. Ein Zertifikat von surfmusik.de ist unvollständig.

      Unbenannt.png

      Ich bin mir nicht sicher ob der VLC-Player SNI-Support hat.

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270
      habe deinen Hinweis umgesetzt, funktioniert bei mir leider nicht.
      Müssten dann nicht auch zwei weitere Variablen im streamlinkWrapper eingefügt werden? Habe ich probiert und die Var OPT1 und OPT2 hinzugefügt und die Variable streamlink damit ergänzt .

      #!/bin/bash
      STREAM_TIMEOUT=$1
      SLEEP_TIME=$2
      LINK=$3
      OPT1=$4
      OPT2=$5
      
      STOP=0
      
      exit_script() {
      	STOP=1
      	killall streamlink
      	exit 0
      }
      
      trap exit_script exit
      
      
      while [ $STOP == 0 ] ; do 
      	streamlink "httpstream://${LINK}" live -p cvlc --retry-streams $STREAM_TIMEOUT $OPT1 $OPT2
      	CUR_PID=$PID
      	sleep $SLEEP_TIME
      done
      

      Funktioniert. Jetzt kann ich meine Ops in der config angeben und muss nicht im streamlinkWrapper
      herum fummeln.
      Ich bin halt kein Programmieren und brauche etwas mehr Zeit um die dinge zu verstehen. Kannst du das Script vielleicht so anpassen, so das man bei Updates nicht erneut im Script Änderungen vornehmen muss? Wäre super.

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @stoffel so, habe das Problem mit streamlink behoben.

      cp -a -v ../MagicMirror/config/config.default.js ../MagicMirror/config/config.js 1>> ./log_erfolgreich.txt 2>> ./log_fehlgeschlagen.txt
      for streamlink_process_id in $(ps aux | grep -i "streamlink" | awk '{print $2}'); do
          kill -2 $streamlink_process_id
      done
      pm2 restart MagicMirror
      

      streamlink_process_id holt sich die Process_id von allen Prozessen die mit streamlink zu tun haben und sendet Ctrl +c an jeden einzelnen davon. Jetzt ist streamlink komplett beendet und starte nicht immer wieder. :clapping_hands:

      FERTIG :thumbs_up:

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270
      ein git pull hat den streamlinkWrapper nicht überschrieben, also Modul gelöscht und neu gecloned.
      Alles gut. Dann neu gebootet und

      customCommandArgs: ["10","30","###URL###","--http-no-ssl-verify --player-continuous-http"],
      

      in meiner Config eingefügt, funktioniert leider nicht.

      customCommandArgs: ["10","30","###URL### --http-no-ssl-verify --player-continuous-http"],
      

      funktioniert leider auch nicht.

      streamlink "httpstream://${LINK}" live -p cvlc --retry-streams $STREAM_TIMEOUT --http-no-ssl-verify --player-continuous-http
      

      in der streamlinker.bash funktioniert :thumbs_up:

      Jetzt habe ich ein neues Problem. Wenn ich über mein Modul MMM-ConfigSwitcher in eine andere Config wechsle wird der Streamlinker nicht gekillt.
      Der Streamlinker starte jetzt in jeder Config automatisch, wahrscheinlich wegen der Option –player-continuous-http.
      Wie kann ich den Streamlinker sicher stoppen.

      Das MMM-ConfigSwitcher Module (meine Anpassung des MMM-ProfileSwicher) ruft das defauft.sh script auf

      cp -a -v ../MagicMirror/config/config.default.js ../MagicMirror/config/config.js 1>> ./log_erfolgreich.txt 2>> ./log_fehlgeschlagen.txt
      pm2 restart MagicMirror
      

      Der Befehl ps gibt nur bash und ps aus
      ein killall vlc killt den vlc nicht aber den streamlinker.
      Hast du vieleicht eine Idee?

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270
      so, habe jetzt das Modul gelöscht und neu gecloned. Alle Dateien vorhanden. Die Rechte bei den Scripten stehen bei mir auf 755.

      Habe es mal mit dem vlcWrapper probiert, leider ohne Erfolg wegen des ssl-problem. Meine System-zeit ist auf Europa/berlin eingestellt und zeigt die korrekte Zeit an.

      locales:
      LANG=de_DE.UTF-8
      alles andere = de_DE

      apt-cache policy vlc; lsb_release -a; uname -a

      vlc:
      Installiert: 3.0.18-0+rpt3+deb11u1
      Installationskandidat: 3.0.18-0+rpt3+deb11u1
      Versionstabelle:
      *** 3.0.18-0+rpt3+deb11u1 500
      500 http://archive.raspberrypi.org/debian bullseye/main armhf Packages
      100 /var/lib/dpkg/status
      3.0.18-0+deb11u1+rpi1 500
      500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
      Distributor ID: Raspbian
      Description: Raspbian GNU/Linux 11 (bullseye)
      Release: 11
      Codename: bullseye
      Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

      Vielleicht könnte man eine weitere Var dem Script hinzufügen für die die noch (oder andere) Optionen anfügen möchten/müssen. Ansonsten ein super Module, kenne auch kein anderes. Danke dafür.

      Für mich ist das no-sound Problem gelöst :hugging_face: :clapping_hands:

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270
      Die Scripte vlcPaWrapper.bash und vlcWrapper.bash habe ich garnicht. Ein git pull endet mit der Meldung bereits aktuel

      posted in Bug Hunt
      S
      stoffel
    • RE: MMM-MplayerRadio no Sound gelöst

      @wishmaster270
      ich habe vergessen das es auch ein problem mit dem ssl Zertifikat gibt deshalb habe ich zum testen im script noch die Option –http-no-ssl-verify --player-continuous-http angefügt. Meine Streams sind alle von surfmusik.de, vielleicht funktionieren andere Streams auch ohne diesen zusatz. Ob das ssl-problem vom Modul oder vom System kommt kann ich nicht sagen.

      posted in Bug Hunt
      S
      stoffel
    • MMM-MplayerRadio no Sound gelöst

      Re: MMM-MplayerRadio - No sound

      die vorgeschlagenen Lösungen habe bei mir nicht funktioniert. Nach langer suche habe ich heraus gefunden das der EACCES
      at ChildProcess._handle.onexit (node:internal/child_process:283:19
      )
      error durch die Rechte 744 statt 644 für das Script StreamlinkWrapper.bash behoben werden kann. Falls das ein Sichereitsrisiko darstellt bitte melden. Jetzt funktioniert alles wie früher :clapping_hands: .

      config: {
                customCommand: "/home/????/MagicMirror/modules/MMM-MplayerRadio/scripts/streamlinkWrapper.bash",
                customCommandArgs: ["10","30","###URL###"],
      
      posted in Bug Hunt
      S
      stoffel
    • RE: MM und nextcloud auf ein RPI möglich?

      @coernel vielen Dank für deine Antwort. Ich habe noch ein Backup. Die Nextcloud habe ich auch schon mit dieser Anleitung installiert. Jetzt habe ich aber das Problem das die Nextcloud nicht über die lokale IP erreichbar ist, sondern nur mein MM. Das liegt wahrscheinlich daran das der MM schon einen kleinen Web Server hat. Das Verzeichniss /var/www existierte vorher nicht. Wo das Server Verzeichnis vom MM liegt weis ich nicht, wahrscheinlich unter …/MagicMirror.

      Ich werde es erstmal mit nextcloudpi (guter Tipp, danke) probieren. Und dann MM installieren.

      Auf mein Handy habe ich LineageOS mit microG installiert. Läuft problemlos. Statt GMAIL habe ich DeltaChat, statt GoogleMaps Magic Earth, statt PlayStrore AuroraStore und FDroid, statt G…Chrome DuckDuck Browser. Alles läuft prima.

      Deine Antwort ist auf jeden Fall hilfreich. Vielen Dank dafür.

      Ich melde mich die Tage wenn ich nextcloudpi getestet habe.

      posted in General Discussion
      S
      stoffel
    • MM und nextcloud auf ein RPI möglich?

      Hallo liebe Leute,
      vor Jahren habe ich mir meinen MM mit eurer Hilfe gebaut. Soweit alles gut und danke für euere Unterstützung. Da ich meinen MM nur selten nutze und ich mir LineageOS OHNE Google auf mein Handy installiert habe, wollte ich jetzt Nextcloud auf meinem RPI 3B+ installieren um dort meine Sicherungen abzulegen. Kann man Nextcloud und MM auf einen RPI betreiben? Es gibt hier eine gute Anleitung auf deutsch für die Installation von Nextcloud auf RPI. Hat das schonmal jemand gemacht ?

      Gruß stoffel

      posted in General Discussion
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      i have test a lot with file attributes. not needed. magicMirror is not linux, its javascript. only the copy command and pm2 command in the exec function must linux conform. in the pm2 log you have sometimes error messages, but that comes from linux. so you have right, without x-flag its not executable, but MagicMirror ignore file attributes.

      now i can cange all my configs with remote-control. for the moment i am finished this module. maybe later i have a new idea, ha,ha.

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      ok, what can i say. i’v test it with other config und it works also. its overide the old config with the new config and restart mm.
      i not understand why, but it works. realy

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      ok, i am not a linux erpert. i think the exec command execute a script, and its work with this file-attributes. you can test it. maybe its read the file and exec the commands in it. i’v checked the attributes with filezilla, was 644, not executable but it works.

      the file-attributes are for the security of RPI & MM importend. thats is for later.

      at the moment ist works without errors. i can send you my files for test !?

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      look at my first post, its a simple text-file with the extension .sh and its executable -rw-r–r–
      the test.sh is not the problem, the file ist found and execute it. the problem was the cp command. but now i soved the problem.

      cp -a -v ../MagicMirror/config/config.js ../MagicMirror/config/config_1.js 1>> ./log_erfolgreich.txt 2>> ./log_fehlgeschlagen.txt
      pm2 restart all
      

      i add the option -a . now its work !!
      the log_erfolgreich.txt and log_fehlgeschlagen.txt are found in the MagicMirror dir, so cp starts at this dir.
      the

      ../MagicMirror/
      

      are needed, maybe mm starts from the .pm2 dir?!

      i play around with it and other files (txt, png…)
      i am lucky :-)
      thanks very much for your help.

      at WE i test your config-module and post it

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      i’v test the exec command without bash… thats not work, i have a
      /bin/sh: 1: …/MagicMirror/config/test.sh: Permission denied

      with bash it works now, but the filename is a bit crazy
      cp config.png

      thats at ssh console. in filezilla the filename is correct but says no such file or directory

      i have no idea what gos wrong

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      @sdetweil

      fine, i will test it at WE.
      Now its time to sleep. i test tomorrow with sh … and without bash/sh

      posted in Troubleshooting
      S
      stoffel
    • RE: exec error: Error: Command failed: ?!

      hallo sdetweil,

      have you finished your config-module :face_with_steam_from_nose: ?

      the __dirname was from the beginning when i have a file not found error. now its found and i think the exec comand works, in log you can see after the error restart mm but i have no error message from then cp command. so i can not find whats the problem is. in the console.log i have no errors. where can i see error messages from the cp command.

      posted in Troubleshooting
      S
      stoffel
    • exec error: Error: Command failed: ?!

      hallo @ all ,

      i am new here and german, so sorry for my english :-)

      i build my first module. i started with this simple module.

      it works. then i add an exec command

      exec("bash ../MagicMirror/config/test.sh", (error, stdout, stderr) => {
      	if (error) {
      		console.error(`exec error: ${error}`)
      		return;
      	}
      

      thats works ?! i am not sure.
      the test.sh

      cp ../MagicMirror/config/config.js ../MagicMirror/config/config_1.js
      pm2 restart all
      

      in my custom_menu.json i have an entry that send the notification TEST, my MMM_MeinModul.js recieved this and send

      this.sendSocketNotification('START_TEST', {});
      

      when my node_helper.js recieved this then call the function with the exec command.

      the result is an error at pm2 log:

      exec error: Error: Command failed: bash ../MagicMirror/config/test.sh
      

      but thats not true. the pm2 restart all are executed and restart the mm.

      playerRadio
      0|MagicMirror  | [06.07.2021 19:22.56.851] [LOG]   Stopping module helper: MMM-Tools
      0|MagicMirror  | [06.07.2021 19:22.56.883] [ERROR] 
      0|MagicMirror  | exec error: Error: Command failed: bash ../MagicMirror/config/test.sh
      0|MagicMirror  | > magicmirror@2.16.0 start /home/pi/MagicMirror
      0|MagicMirror  | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      0|MagicMirror  | [06.07.2021 19:23.02.329] [LOG]   
      0|MagicMirror  | Starting MagicMirror: v2.16.0
      
      

      so, i think the cp command not work, but i dont understand the problem.

      here my module

      Module.register("MMM-MeinModul",{
      	defaults: {
      		text: "Sergio"
      	},
      
      	getDom: function() {
      		var wrapper = document.createElement("div");
      		wrapper.innerHTML = this.config.text;
      		return wrapper;
      	},
      
      	start: function() {
      		this.sendSocketNotification('CONFIG', this.config);
      	},
      
      	socketNotificationReceived: function(notification, payload) {
      		if (notification === 'STARTED') {
      			console.log("MMM-MeinModule notification [" + notification + "] payload [" + payload + "]")
      			this.config.text = 'Started';
      			this.updateDom();
      		}
      	},
      	
      	notificationReceived: function(notification, payload) {
      		if (notification === 'TEST') {
      			console.log("MMM-MeinModule notification [" + notification + "] payload [" + payload + "]")
      			this.config.text = 'changed';
      			this.updateDom();
      			this.sendSocketNotification('START_TEST', {});
      		}
      	}
      });
      

      and here my node_helper

      var NodeHelper = require("node_helper");
      const exec = require("child_process").exec;
      
      module.exports = NodeHelper.create({
      	start: function () {
      		this.config = {}
      	},
      	
      copyfile: function () {
      console.log(__dirname)
      exec("bash ../MagicMirror/config/test.sh", (error, stdout, stderr) => {
      	if (error) {
      		console.error(`exec error: ${error}`)
      		return;
      	}
      });
      },
      
      	socketNotificationReceived: function (notification, payload) {
      		if (notification === 'CONFIG') {
      			this.config = payload;
      			console.log("MMM-MeinModule node_helper (config) notification [" + notification + "] payload [" + payload + "]")
      			this.sendSocketNotification('STARTED',payload);
      		}
      		if (notification === 'START_TEST') {
      			console.log("MMM-MeinModule node_helper (TEST) notification [" + notification + "] payload [" + payload + "]")
      			this.copyfile();
      		}
      	}
      });
      

      can sameone get a hint please ?

      posted in Troubleshooting
      S
      stoffel
    • RE: Are you tired of editing config.js, or have trouble doing it, see my new module

      @sdetweil

      thanks ;-)

      and i like people like you who spent a lot of time for creating useful modules like this !!

      again thanks a lot

      posted in Utilities
      S
      stoffel
    • 1
    • 2
    • 1 / 2