MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Has anyone got MMM-Remote-Control working on MM 2.11 ?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    31 Posts 8 Posters 16.3k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      RoadRunnr1469 @karsten13
      last edited by sdetweil

      @karsten13

      var MMSocket = function(moduleName) {
      	var self = this;
      
      	if (typeof moduleName !== "string") {
      		throw new Error("Please set the module name for the MMSocket.");
      	}
      
      	self.moduleName = moduleName;
      
      	// Private Methods
      	self.socket = io("/" + self.moduleName);
      	var notificationCallback = function() {};
      
      	var onevent = self.socket.onevent;
      	self.socket.onevent = function(packet) {
      		var args = packet.data || [];
      		onevent.call(this, packet);    // original call
      		packet.data = ["*"].concat(args);
      		onevent.call(this, packet);      // additional call to catch-all
      	};
      
      	// register catch all.
      	self.socket.on("*", function(notification, payload) {
      		if (notification !== "*") {
      			notificationCallback(notification, payload);
      		}
      	});
      
      	// Public Methods
      	this.setNotificationCallback = function(callback) {
      		notificationCallback = callback;
      	};
      
      	this.sendNotification = function(notification, payload) {
      		if (typeof payload === "undefined") {
      			payload = {};
      		}
      		self.socket.emit(notification, payload);
      	};
      };
      
      karsten13K 1 Reply Last reply Reply Quote 0
      • karsten13K Offline
        karsten13 @RoadRunnr1469
        last edited by

        @RoadRunnr1469

        didn’t ask you, because I know your socketclient.js, you applied my patch …

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          RoadRunnr1469 @karsten13
          last edited by

          @karsten13 actually no I didn’t. I had backed up my entire MagicMirror folder and all sub folders before upgrading. I saw another post where they said they changed the socketclient back to before upgrade. so I did the same thing. after making a backup of the new socketclient.js file.

          StoffbeuteluweS 1 Reply Last reply Reply Quote 0
          • StoffbeuteluweS Offline
            Stoffbeuteluwe Project Sponsor @RoadRunnr1469
            last edited by Stoffbeuteluwe

            @RoadRunnr1469 so…After restart MM …Remote Control is not working anymore :worried_face:

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @Stoffbeuteluwe
              last edited by

              @Stoffbeuteluwe put his fix on the js/socketclient.js

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                snikolaidis
                last edited by

                what if cat ./js/socketclient.js says the file doesn’t exist? Would it be located somewhere else for the MagicMirrorOS?

                1 Reply Last reply Reply Quote 0
                • karsten13K Offline
                  karsten13
                  last edited by

                  you are using this setup?

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    snikolaidis @karsten13
                    last edited by

                    @karsten13 yes I am

                    1 Reply Last reply Reply Quote 0
                    • karsten13K Offline
                      karsten13
                      last edited by

                      then you will not find the socketclient.js on your pi because this file is in the used docker image.
                      2 possibilities:

                      • you have to mount a fixed version of this file into the running container with a volume mount
                      • you can use the develop version of the docker image which contains the current develop branch of mm where this is already fixed (this is the current base of the upcoming MM v2.12)

                      Don’t know how experienced you are in docker, 2. option is easier to explain.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        snikolaidis @karsten13
                        last edited by

                        @karsten13 I am a complete novice to it, but I will figure out a way, thank you so much for pointing me in the correct path!

                        1 Reply Last reply Reply Quote 0
                        • karsten13K Offline
                          karsten13
                          last edited by

                          then goto ~/magicmirror/run and edit the docker-compose.yml with an editor (e.g. nano or vi).

                          In this file replace karsten13/magicmirror:latest with karsten13/magicmirror:develop, save the file.

                          You are still in ~/magicmirror/run, then run docker-compose up -d.

                          It will take a while because this will pull a new docker image.

                          After the app is up again, the problem should be fixed.

                          S MrCoffeeM 2 Replies Last reply Reply Quote 0
                          • S Offline
                            snikolaidis @karsten13
                            last edited by

                            @karsten13 said in Has anyone got MMM-Remote-Control working on MM 2.11 ?:

                            ~/magicmirror/ru

                            THANK YOU!!!

                            1 Reply Last reply Reply Quote 0
                            • karsten13K Offline
                              karsten13
                              last edited by

                              what I told you in my last reply was the solution to use the develop image.

                              Now I tried to write down the other solution (how to patch a mm-file in a docker setup) here.

                              1 Reply Last reply Reply Quote 0
                              • Z Offline
                                zeeboguy
                                last edited by

                                @RoadRunnr1469

                                This fixed the issue I was having with Remote Control

                                issue I was having was when logging into remote control, it would display all modules as ‘unavailable’ and would be in a constant loading… loop when trying to turn on/off modules.

                                Now its running as expected.

                                Thank you!

                                1 Reply Last reply Reply Quote 0
                                • Q Offline
                                  qqqqqqqq
                                  last edited by

                                  I did the fix in the socketclient.js file. but here are two issues that i am still facing. Anyone knows, how to fix them?

                                  1. The icons aren’t still visible, like it was in earlier versions.
                                  2. The top buttons just showing “All” and not “Show all” or “Hide All”.
                                  1 Reply Last reply Reply Quote 0
                                  • karsten13K Offline
                                    karsten13
                                    last edited by

                                    There is a fix for this provided as PR here but still not merged. But you can apply the fix yourself.

                                    1 Reply Last reply Reply Quote 0
                                    • MrCoffeeM Offline
                                      MrCoffee @karsten13
                                      last edited by

                                      @karsten13
                                      Sorry for asking, but I am pretty new to docker.
                                      I installed my MagicMirror using docker-MagicMirror.
                                      There I don´t have the ~/magicmirror/run folder.

                                      Could you please help me out, where I have to look?

                                      Thanks.
                                      Mr.Coffee

                                      karsten13K 1 Reply Last reply Reply Quote 0
                                      • karsten13K Offline
                                        karsten13 @MrCoffee
                                        last edited by

                                        @MrCoffee

                                        sorry, don’t understand your question.

                                        This thread is about a problem with MMM-RemoteControl with MM v2.11.

                                        If you use the mentioned docker setup this should have MM v2.13 where the problem is solved.

                                        MrCoffeeM 1 Reply Last reply Reply Quote 0
                                        • MrCoffeeM Offline
                                          MrCoffee @karsten13
                                          last edited by

                                          @karsten13
                                          Oh. Sorry for that.
                                          But thank you for your answer.

                                          However I thougt I had the same issues.
                                          Ok. I will give it another try and in case I can’t fix it, i will open a new thread.

                                          Thank you.

                                          1 Reply Last reply Reply Quote 0
                                          • karsten13K Offline
                                            karsten13
                                            last edited by

                                            may your image is to old. You can execute docker images and see how old your images are. You can get a new version with docker pull xy (replace xy with the image name).

                                            MrCoffeeM 2 Replies Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy