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

    Posts

    Recent Best Controversial
    • RE: Gurus, what is the problem with this code ?

      @sean Tks again … I am newb with MM, so I think that it is not possible to create a function in the config.js … I think that this will not work. because the next step I will need to call an api from config.js to get some data from mysql.
      In my test using a config.js out the MM system, I could call the api, but I think that this is not possible in the MM. Am I right ? Tks

      posted in Development
      rsellmerR
      rsellmer
    • RE: MagicMirror to msSQL

      Hi, I’ve sent an e-mail to you because I am new in MM and I need to do something like yours.
      Please, help me.
      Tks,
      Renato

      posted in Development
      rsellmerR
      rsellmer
    • RE: Gurus, what is the problem with this code ?
      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var full  = "";
      
      function LoadData() {
      
      full = "Hello";
      
      }
      
      $( document ).ready(function() {
      	LoadData();
      }); 
      
      var config = {
      	address: "localhost", 
              port: 8080,
      	ipWhitelist: ["192.168.1.9"],
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      	zoom: 0.85,
      	
              modules: [
      
      		{
      		module: "helloworld",
      		position: "center",
      		config: {
      			text: full
      		}
      		},
      
      	]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      posted in Development
      rsellmerR
      rsellmer
    • RE: Gurus, what is the problem with this code ?

      Ok … I am so sorry about that. It was not easy to understand.
      Let me try to explain … I need call a function which is declared into the config.js. However, this is impossible. Nothing appeared on the screen. I did not find any example using a function call. Is it clear ?

      posted in Development
      rsellmerR
      rsellmer
    • Gurus, what is the problem with this code ?

      When I use this function I got an error and nothing appear on the screen.

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var full  = "";
      
      function LoadData() {
      
      full = "Hello";
      
      }
      
      $( document ).ready(function() {
      	LoadData();
      }); 
      
      var config = {
      	address: "localhost", 
              port: 8080,
      	ipWhitelist: ["192.168.1.9"],
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      	zoom: 0.85,
      	
              modules: [
      
      		{
      		module: "helloworld",
      		position: "center",
      		config: {
      			text: full
      		}
      		},
      
      	]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      posted in Development
      rsellmerR
      rsellmer
    • Calling a general function

      Hi guys, this is my first project using MM and I am having an issue to call a simple function.
      I need only modify the variable using a function and it is not working. Maybe because I put the function in the wrong place. Please, help me:

      /* global Log, Module, moment */
      
      /* Magic Mirror
       * Module: Compliments
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       */
      
      var full_text = "Have a good stay";
      function LoadData() {
      
      	  full_text = "Welcome " + "Renato" + ". Have a great stay !";
      }
      
      $( document ).ready(function() {
      	
      		LoadData();
      
        }); 
      
      Module.register("compliments", {
      	// Module config defaults.
      	defaults: {
      		compliments: {
      			anytime:[
      				full_text,
      			],
      		},
      		updateInterval: 72000000,
      		remoteFile: null,
      		fadeSpeed: 4000,
      		morningStartTime: 3,
      		morningEndTime: 12,
      		afternoonStartTime: 12,
      		afternoonEndTime: 17,
      	},
      
      posted in Development
      rsellmerR
      rsellmer
    • RE: Calling a Module from Web

      @Sean Thank you very much for your help.

      posted in General Discussion
      rsellmerR
      rsellmer
    • RE: Calling a Module from Web

      @Sean Let me try to explain to you. I have 2 mirrors in my house, one is in the room and another one in the bedroom, ok ? Through the web browser I want select one mirror or another and control the MMM-Remote-Control for this one which I selected and I want to use a new front end and just call the functions from the MMM-Remote-Control passing the parameters, is this possible ?

      posted in General Discussion
      rsellmerR
      rsellmer
    • RE: Calling a Module from Web

      @Sean Thank you very much for your answer. It is exactly what I need. Understand how to use the MMM-Remote-Control with a web browser. I believe that I have to create the front end with PHP and use nodejs to call the MMM-Remote-Control, right ? If you have any example I appreciate that.

      posted in General Discussion
      rsellmerR
      rsellmer
    • 1
    • 2
    • 1 / 2