• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Remote control

Scheduled Pinned Locked Moved Utilities
19 Posts 6 Posters 3.3k Views 7 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.
  • H Offline
    hawkeye @sdetweil
    last edited by Jun 3, 2020, 3:50 AM

    @sdetweil said in Remote control:

    {
    module: ‘MMM-Remote-Control’,
    position: ‘bottom_left’,
    config: {
    customCommand: {}, // Optional, See “Using Custom Commands” below
    customMenu: “custom_menu.json”, // Optional, See “Custom Menu Items” below
    showModuleApiMenu: true, // Optional, Enable the Module Controls menu
    apiKey: “”, // Optional, See API/README.md for details
    }
    },

    You rock that fixed that part now i just need to make it show modules so i can turn them off

    S 1 Reply Last reply Jun 3, 2020, 3:53 AM Reply Quote 0
    • S Away
      sdetweil @hawkeye
      last edited by Jun 3, 2020, 3:53 AM

      @hawkeye there is a bug on 2.11 tgat stops remote control from working.

      search the forum for the fix

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      H 1 Reply Last reply Jun 3, 2020, 3:58 AM Reply Quote 0
      • H Offline
        hawkeye @sdetweil
        last edited by Jun 3, 2020, 3:58 AM

        @sdetweil yeah I’m no programmer

        i need an idiots guide to things

        S 1 Reply Last reply Jun 3, 2020, 11:27 AM Reply Quote 0
        • S Away
          sdetweil @hawkeye
          last edited by Jun 3, 2020, 11:27 AM

          @hawkeye you are replacing one file, no programming required

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          H 1 Reply Last reply Jun 3, 2020, 11:52 AM Reply Quote 0
          • H Offline
            hawkeye @sdetweil
            last edited by Jun 3, 2020, 11:52 AM

            @sdetweil you have been a grate help so far and yes i know i am annoying but i cant find what i am to do

            S 1 Reply Last reply Jun 3, 2020, 11:59 AM Reply Quote 0
            • S Away
              sdetweil @hawkeye
              last edited by Jun 3, 2020, 11:59 AM

              @hawkeye you are replacing the contents of ~/MagicMirror/js/socketclient.js

              see this post for the (old) contents to put IN the file
              https://forum.magicmirror.builders/topic/12485/has-anyone-got-mmm-remote-control-working-on-mm-2-11/10?page=1

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              H 1 Reply Last reply Jun 3, 2020, 12:12 PM Reply Quote 0
              • H Offline
                hawkeye @sdetweil
                last edited by Jun 3, 2020, 12:12 PM

                @sdetweil see your totally awesome that’s fixed now wahoo

                with your help im sure you could help me get this working awsome

                S 1 Reply Last reply Jun 3, 2020, 12:13 PM Reply Quote 0
                • S Away
                  sdetweil @hawkeye
                  last edited by Jun 3, 2020, 12:13 PM

                  @hawkeye i just searched in the forum on 2.11 remote control, that was the top result

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    hawkeye
                    last edited by Jun 3, 2020, 12:38 PM

                    I deleted every thing in the socketclient.js file and replaced with the following now the remote works like a charm

                    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);
                    };
                    

                    };

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      shawnlane
                      last edited by Jun 8, 2020, 2:13 PM

                      @hawkeye Thank you for posting. This corrected my problem! I have so much to learn. Off to my next issue with getting the Google Photos module to work.

                      S 1 Reply Last reply Jun 8, 2020, 2:44 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        10/19
                        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