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

    Posts

    Recent Best Controversial
    • RE: Online Radio

      @tanvir586 Hi, bad to hear that.
      At the moment I do not have any other idea.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586

      It looks like you use the right version but only the path in the “customCommand” option was wrong. With the following config it should work:

      	{
      		module: "MMM-MplayerRadio",
      		header: "Radio",
      		position: "top_center",
      		config: {
      			stations: [
      				{
      					title: "Almubarak",
      					url: "https://relay.emasjidlive.uk/almubarakradio",
      					logo: "https://almubarakradio.com/wp-content/uploads/2021/04/logorectangle-1024x326.png",
      					customCommand: "./modules/MMM-MplayerRadio/scripts/streamlinkWrapper.bash",
      					customCommandArgs: ["10", "30", "###URL###"],
      				},
      			],
      		},
      	},
      
      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 You installed to a different user. Your path will be

      /home/tanvir/MagicMirror/modules/MMM-MplayerRadio/scripts/streamlinkWrapper.bash
      
      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 Are you sure you are running the latest version of the module?
      The error says that the wrapper script I added yesterday does not exist.
      Can you please check the script folder and check if the file is executable?

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 Sorry, i am not at my pc at the moment. You only need the first customCommand line. The one with vlc is wrong.
      You can try to run the run the command directly on the shell and see what happens.

      /home/pi/MagicMirror/modules/MMM-MplayerRadio/scripts/streamlinkWrapper.bash 10 30 https://relay.emasjidlive.uk/almubarakradio
      

      You can end it by pressing CRTL+c

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586
      Normal installation is the right thing. If you got sound with the new configuration everything is fine.
      Hope the disconnect will be recognized correctly and your stream restarts now.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586
      I release a new version of MMM-MplayerRadio (0.0.10) a few minutes ago which contains a new script called “streamlinkWrapper.bash” script. This script uses the streamlink tool to wrap the stream and restarts it if the connection gets lost.
      You will find a example configuration in the examples directory for streamlinkWrapper which contains the configuration needed for your case.

      Make sure to install streamlink:

      sudo apt -y update && sudo apt -y install streamlink
      
      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 I will try to dig deeper the next days but I can not promise that I will have the time.
      Maybe I can write a simple wrapper for vlc which ends the process when the streams stops or is unreachable and tries to start the process every few seconds.
      Did not find any better solution til now.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 Sorry, needed a moment to figure things out…

      You can try to add “–http-reconnect” and maybe “–http-continuous” to the options.

      Your config should look something like this then:

      
      
             {
      		module: "MMM-MplayerRadio",
      		header: "Radio",
      		position: "top_center",
      		config: {
      			//autoplay: 0,
                              customCommand: "/usr/bin/vlc",
                              customCommandArgs: ["-I","dummy", "--http-reconnect", "--http-continuous", "###URL###"],
      			stations: [
      				{
      					title: "Al Mubarak",
      					url: "https://relay.emasjidlive.uk/almubarakradio",
      					logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png",
      				},
      			],
      		},
      	},
      
      
      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: Online Radio

      @tanvir586 Great if I could help.
      I am not sure how vlc will handle a connection loss. Normally it will try to reconnect but I do not know how long and often it tries.
      Maybe there is a command line option but I think the best option is to try it

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • 1
    • 2
    • 20
    • 21
    • 22
    • 23
    • 24
    • 33
    • 34
    • 22 / 34