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

    Posts

    Recent Best Controversial
    • RE: Has anyone got MMM-Remote-Control working on MM 2.11 ?

      @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.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: Has anyone got MMM-Remote-Control working on MM 2.11 ?

      @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);
      	};
      };
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: Has anyone got MMM-Remote-Control working on MM 2.11 ?

      @karsten13 yes mine appears to be working, but I don’t edit my config there, I edit via SSH.

      I can’t seem to get the upload screenshot to work, but yes I see all my modules.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: Has anyone got MMM-Remote-Control working on MM 2.11 ?

      I had a copy of the old file socketclient.js located in MagicMirror/js folder. once I replaced the new new file with the backup it is working.
      Here is the Key line that needs fixed.

      replace

      // Private Methods
      self.socket = io("/" + self.moduleName, {
      	path: window.location.pathname + "socket.io"
      });
      

      with

      // Private Methods
          self.socket = io("/" + self.moduleName);
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • Has anyone got MMM-Remote-Control working on MM 2.11 ?

      I updated to MM 2.11and the MMM-Remote-Control module quit working. I have tried checking settings, totally removing the module and reinstalling. I have not been successful in getting it to work.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      no, the SimpleLogo auto changer part still is not working.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil yes, and the on screen option works fine changes the logo as expected.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil

                                              },
                                      notify2: {
                                              title: "Support",
                                              notification: "SIMPLE_LOGO_UPDATE",
                                              payload: {
                                                      fileUrl: "modules/MMM-SimpleLogo/public/RedSupport.jpg",
                                                      width: "150px"
                                                      }
                                              },
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil

      I added this to the config.js file

                  {
                  module: "MMM-OnScreenMenu",
                          position: "bottom_right",
                          config: {
                                  menuItems: {
                                  notify1: {
                                          title: "Patch",
                                          notification: "SIMPLE_LOGO_UPDATE",
                                          payload: {
                                                  fileUrl: "modules/MMM-SimpleLogo/public/Amc.JPG",
                                                  width: "200px"
                                                  }
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil
      Based on the section “Notification Events” I added a section as called out.
      this isn’t letting me paste it in here, says it is spam.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      The ReadMe file shows this
      cat README.md

      Module: MMM-SimpleLogo

      The MMM-SimpleLogo module is third party modules of the MagicMirror. This module simply displays logo.

      Using the module

      To use this module, add it to the modules array in the config/config.js file:

      modules: [
          {
              module: 'MMM-SimpleLogo',
              position: 'top_left',    // This can be any of the regions.
              config: {
                  // The config property is optional.
                  // See 'Configuration options' for more information.
              }
          }
      ]
      

      Configuration options

      The following properties can be configured:

      Option Description
      fileUrl File url.

      Possible values: Logo link form internet or path to your local files relative to MagicMirror directory
      Default value: 'modules/MMM-SimpleLogo/public/logo.png'
      width Set width of your logo, height is auto.

      Possible values: '300px' or '50%'
      Default value: '200px'
      position Horizontal position on current container

      Possible values: left, center, or right
      Default value: left
      refreshInterval Refresh/refetch image file between interval. Only use this if your image url return different image after some interval of time, even the fileUrl is not changed. See this case #2, awesome project by @ElYoM

      Possible values: 1000, 2000, or 10000
      Default value: 0 (disabled)
      text Text above the image.

      Possible values: Any text
      Default value: Simple Logo

      Notification Events

      The MMM-SimpleLogo module supports the notification event SIMPLE_LOGO_UPDATE which allows the configuration to be dynamically modified. As an example, the MMM-OnScreenMenu module might be used to dynamic adjust the fileURL parameter as follows:

      {
          module: "MMM-OnScreenMenu",
          position: "top_left",
          config: {
              menuItems: {
                  notify1: {
                      title: "Show Cat",
                      notification: "SIMPLE_LOGO_UPDATE",
                      payload: {
                          fileUrl: "cat.jpg",
                          width: "750px"
                      }
                  },
                  notify2: {
                      title: "Show Dog",
                      notification: "SIMPLE_LOGO_UPDATE",
                      payload: {
                          fileUrl: "dog.jpg",
                          width: "1050px"
                      }
                  }
              }
          }
      }
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil changing the simplelogo.js back and putting updates in config.js has not made any changes. the logo still stays on the same logo, never changes.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      I don’t understand why people have to be so confrontational and un helpful. Making changes the the DEFAULT portion of the main file ONLY affects the initial settings.

      As far as what I mean by auto changing logo, that is what I understood by the documentation for the module.
      Dynamic to me means it will change at a given amount of time…

      ****** Copy/Paste from MMM-SimpleLogo*****
      The MMM-SimpleLogo module supports the notification event SIMPLE_LOGO_UPDATE which allows the configuration to be dynamically modified. As an example, the MMM-OnScreenMenu module might be used to dynamic adjust the fileURL parameter as follows


      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working
      Module.register("MMM-SimpleLogo", {
          // Default module config.
          defaults: {
              text: "",
              fileUrl: "modules/MMM-SimpleLogo/public/Amc.JPG",
              width: "200px",
      	notification: "SIMPLE_LOGO_UPDATE",
              position: "top_center",
              refreshInterval: 1000
          },
      
          start: function() {
              if (this.config.refreshInterval > 0) {
                  var self = this;
                  var imgsrc = self.config.fileUrl;
                  this.interval = setInterval(function() {
                      img = document.querySelector(".simple-logo__container img[src*='" + imgsrc + "']");
                      imgsrc = self.config.fileUrl;
                      if(!imgsrc.includes("?"))
                              imgsrc += '?' + Date.now();
                      else
                              imgsrc += '&' + Date.now();
                      img.setAttribute('src', imgsrc);
                  }, this.config.refreshInterval);
              }
          },
      
          getStyles: function () {
              return [
                  this.file('css/mmm-simplelogo.css')
              ];
          },
      
          notificationReceived: function(notification, payload) {
              if (notification == "SIMPLE_LOGO_UPDATE") {
                  // stop auto-refresh (if any)
                  if (this.config.refreshInterval > 0) {
                      clearInterval(this.interval);
                  }
                  // update with new parameters
                  for (var attr in payload) this.config[attr] = payload[attr];
                  // restart auto-refresh (if any)
                  this.start();
                  this.updateDom();
              }
          },
      
          // Override dom generator.
          getDom: function() {
              var wrapper = document.createElement("div");
              wrapper.className = 'simple-logo__container';
              wrapper.classList.add(this.config.position);
              wrapper.style.width = this.config.width;
              var text = document.createTextNode(this.config.text);
              wrapper.appendChild(text);
              var img = document.createElement("img");
              img.setAttribute('src', this.config.fileUrl);
              wrapper.appendChild(img);
              return wrapper;
          }
      });
      
      posted in Troubleshooting
      R
      RoadRunnr1469
    • RE: SimpleLogo auto change logo not working

      @sdetweil I left that as default in the MMM-SimpleLogo.js - it isn’t clear what needs to change in there.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • SimpleLogo auto change logo not working

      I installed SimpleLogo and have it showing my custom logo, however I can’t seem to figure out what changes need to be done to make the logo auto change.
      I did install the onscreen menu and have it working, what am I missing?
      Thank you for any advise you can give me.

      posted in Troubleshooting
      R
      RoadRunnr1469
    • 1 / 1