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

    Posts

    Recent Best Controversial
    • RE: MagicMirror² Hackathon 2018

      Thanks to @justjim1220 for contributing in two issues and thanks to @idoodler for reviewing and testing an issue

      48h Hackathon recap

      Metric Total Ø per hour
      Issues handled 12 0.25
      Projects changed 7 0.15
      Lines added +1.587 +33
      Lines removed -1,487 -31

      Merge requests that are still open for review and testing:
      https://github.com/fewieden/MMM-AlarmClock/pull/22
      https://github.com/fewieden/MMM-voice/pull/38
      https://github.com/fewieden/MMM-Fuel/pull/32

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Creating Module with API Key/Secret

      @lilpkstud next to what sdetweil said you should also not save your result into this.data as it is an instance property which already contains data, see https://github.com/MichMich/MagicMirror/tree/master/modules#available-module-instance-properties for reference

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Get user input

      @veryaner if you want you can have a look in my Module, i did a similar approach, this might get you started.

      [card:fewieden/MMM-syslog]

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Change Fontsize

      @reaper81 yes you can

      .xsmall {
        font-size: 15px;
        line-height: 20px;
      }
      
      .small {
        font-size: 20px;
        line-height: 25px;
      }
      
      .medium {
        font-size: 30px;
        line-height: 35px;
      }
      
      .large {
        font-size: 65px;
        line-height: 65px;
      }
      
      .xlarge {
        font-size: 75px;
        line-height: 75px;
        letter-spacing: -3px;
      }
      

      put that in your custom.css file, change the numbers to your liking and you will cover most of the modules which uses those css classes

      or what @j-e-f-f suggested in the other thread https://forum.magicmirror.builders/post/25506 to scale everything in the same portion

      posted in Custom CSS
      strawberry 3.141S
      strawberry 3.141
    • RE: .txt file include

      @dominic this should give you an idea how to solve your problem, I just wrote it down maybe you have to adjust something a little bit and it’s not a finished solution

      • nodehelper:
      const fs = require('fs');
      ...
      
      socketNotificationReceived: function(notification, payload) {
          if(notification === 'START'){
              this.config = payload;
              this.readData();
              setInterval(() => {
                  this.readData();
              }, this.config.updateInterval);
          }
      },
      
      readData: function(){
          //to read a file to do the following
          fs.readFile('YOUR FILE PATH', (err, data) => {
              if (err) throw err;
              this.sendSocketNotification('DATA', data);
          });
      }
      
      • module:
      defaults: {
          updateInterval: 30*60*1000 //reads the file every 30 mins
      },
      
      start: function(){
          this.sendSocketNotification('START', this.config);
      },
      
      socketNotificationReceived: function(notification, payload) {
          if(notification === 'DATA'){
              this.dataFile = payload;
              this.updateDom();
          }
      },
      
      getDom: function(){
          var wrapper = document.createElement('div');
          if(this.dataFile){
              wrapper.innerHTML = this.dataFile;
          } else {
              wrapper.innerHTML = 'No data';
          }
          return wrapper;
      }
      
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-ModuleScheduler - Module Schedules and Notifications

      @cowboysdude adding a css filter to the specific module could set the brightness down

      posted in System
      strawberry 3.141S
      strawberry 3.141
    • RE: USB Microphone

      mine is a TP6920 usb microphone

      posted in Hardware
      strawberry 3.141S
      strawberry 3.141
    • Voice control

      I’m currently working on a voice control module.

      For now I’m able to switch between the modes Train, Weather and Spotify.

      In this modes I can already detect:

      play the next song
      shuffle playlist
      stop the music
      how is the weather today
      how is the weather tomorrow
      when does the next train depart

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Changing the length of the line under the header

      @cruunnerr that happens just for modules in the same region, you could either put the movie module in bottom_left, or you set max-width in custom css for the other modules to limit them

      posted in Custom CSS
      strawberry 3.141S
      strawberry 3.141
    • RE: .txt file include

      there is a general design your module have to look like

      you have to create a directory in ~/MagicMirror/modules/YOUR_MODULE_NAME

      then create a file YOUR_MODULE_NAME.js

      Module.register("YOUR_MODULE_NAME",{
          //here comes the rest of the code for module I posted above
      });
      

      then create a file node_helper.js

      const NodeHelper = require("node_helper");
      const fs= require("fs");
      
      module.exports = NodeHelper.create({
          //here comes the part of the nodehelper after the 3 dots as posted above
      });
      
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • 1 / 1