A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Starting from an existing module?

    6
    0 Votes
    6 Posts
    595 Views
    S

    @sifuhall my SampleModule has all the parts. u won’t need the helper if fetch works

  • @bugsounet MMM-GoogleAssistant v3

    8
    7 Votes
    8 Posts
    2k Views
  • Multiple instance module. Scope for a noob.

    Solved
    4
    0 Votes
    4 Posts
    756 Views
    S

    @birdabirda the config.js info is provided to the modulename.js instance. this is object oriented programming

    each unique instance is pointed to by ‘this’.

    think of node_helper as a server. .
    but it’s responses are broadcast to ALL instances.

    so each instance needs to pass it’s
    identifier as part of the data on each sendsocketNotifocation

    then the node helper has to keep track of that and send that back as part of the response

    then each modulename instance has to check to see if the response is for them.

    you can store the data in a hash by
    instance id.

  • How to send notification to module via external REST API call?

    9
    0 Votes
    9 Posts
    820 Views
    S

    @mumblebaj Log.log is just a wrapper for console.log, which lets mm do the loglevel settings in config.js

  • Error in DNews (copy of PNews)

    5
    0 Votes
    5 Posts
    437 Views
    J

    @cowboysdude - thanks

  • Temperature and/or last motion from Philips Hue motion sensor?

    1
    0 Votes
    1 Posts
    182 Views
    hedmikH

    Hi,

    I’m using mmm-hue-lights and want to display temperature and/or the last motion from a Philips Hue motion sensor (indoor and outdoor).
    Anyone added that feature…?

    /Mikael

  • 0 Votes
    3 Posts
    475 Views
    cowboysdudeC

    @lebatu MMM-EasyBack module

  • Change current CSS with a module?

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    M

    I don’t have the knowledge for plan A. I tried it, but it doesn’t affect the display and it doesn’t show up on MMM-RemoteControl in the Edit View list. What is necessary though.

    I can change or add a few lines of code, but I can’t rewrite a module. The gradient stays as it is.

    /* to disable the following class .MMM-BackgroundSlideshow .gradient background-image: radial-gradient(at center top, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45) 85%) !important; */ Module.register("MMM-BGSs-NoGradient", { // define variables used by module, but not in config data // some_variable: true, // some_other_variable: "a string", // holder for config info from module_name.js config:null, init: function(){ Log.log(this.name + " is in init!"); }, start: function(){ Log.log(this.name + " is starting!"); }, loaded: function(callback) { Log.log(this.name + " is loaded!"); callback(); }, // return list of stylesheet files to use if any getStyles: function() { return [ // sample of list of files to specify here, if no files, do not use this routine, , or return empty list //'script.css', // will try to load it from the vendor folder, otherwise it will load is from the module folder. //'font-awesome.css', // this file is available in the vendor folder, so it doesn't need to be avialable in the module folder. //this.file('anotherfile.css'), // this file will be loaded straight from the module folder. //'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', // this file will be loaded from the bootstrapcdn servers. ] }, // messages received from other modules and the system (NOT from your node helper) // payload is a notification dependent data structure notificationReceived: function(notification, payload, sender) { // once everybody is loaded up if(notification==="ALL_MODULES_STARTED"){ // send our config to our node_helper this.sendSocketNotification("CONFIG",this.config) } if (sender) { Log.log(this.name + " received a module notification: " + notification + " from sender: " + sender.name); } else { Log.log(this.name + " received a system notification: " + notification); } }, // system notification your module is being hidden // typically you would stop doing UI updates (getDom/updateDom) if the module is hidden suspend: function(){ }, // system notification your module is being unhidden/shown // typically you would resume doing UI updates (getDom/updateDom) if the module is shown resume: function(){ }, // this is the major worker of the module, it provides the displayable content for this module getDom: function() { var wrapper = document.createElement("div"); wrapper.className = 'bgss-nogradient_container'; // if user supplied message text in its module config, use it if(this.config.hasOwnProperty("message")){ // using text from module config block in config.js wrapper.innerHTML = this.config.message; } else{ // use hard coded text wrapper.innerHTML = " "; } // change css Object.assign( document.querySelector('.MMM-BackgroundSlideshow .gradient').style, { display: none } ) // pass the created content back to MM to add to DOM. return wrapper; }, })
  • Auto power on and off

    14
    0 Votes
    14 Posts
    4k Views
    S

    @sdetweil Thank you. I have Home Assistant in place, the only gripe is that I wont have enough space between the mm frame and the outlet to shove another smart outlet. I guess i will need to replace the single gang smart outlet.

  • Best practice for `import` ESM in MM module?

    Unsolved
    3
    0 Votes
    3 Posts
    547 Views
    M

    @sdetweil

    Modern browsers can directly import ESM through JS regardless it exists locally or externally. . (Anyway, the above code works really.) Loading ESM via <script type="module">tag will probably be the one way but It will have a global namespace scope. I’m afraid of the risks of collision among MM modules that might be using the same namespace. getScripts() doesn’t support script type. So some codes for injecting proper script tag is needed by the developer himself, To load ESM with MM-module-level scoping, using import() and binding the namespace to the MM module would be possible. however, there will be some pitfalls, import() is an asynchronous function. To prevent referencing unloaded ES modules or to avoid handling of DOM by ES Modules before DOM is created, so some tricks might be needed to confirm everything is ready. (Above my code is that.). So I’m just seeking another or better way if exists.
  • console.Log() shows nothing?

    Solved
    19
    0 Votes
    19 Posts
    13k Views
    S

    @easty if u want to setup using pm2, then there is another script on my page, down at the bottom

    fixuppm2.sh

  • [FR ONLY] MMM-Pronote ?

    54
    2 Votes
    54 Posts
    10k Views
    J

    Bonjour,
    Je déterre un peu le sujet, mais ce module est-il toujours d’actualité ?
    Car j’ai “err no data” qui s’affiche au démarrage du module.
    Merci

  • Changing MMM-Traffic into using TomTom API

    17
    0 Votes
    17 Posts
    2k Views
    R

    @sdetweil
    The Same Error accured for Line 70, so I both commented those 2 lines.
    Now I get no Error, and the Loading disappeared, it now says:
    Screenshot_4.png

  • MM Alexa speech to text

    14
    0 Votes
    14 Posts
    2k Views
    S

    @mmrize he was asking what happens if he does it anyhow…

  • Async Functions inside node_helper.js

    6
    0 Votes
    6 Posts
    1k Views
    M

    @mmrize
    Thank you very much!!! It’s working now. :)

  • To install the module

    2
    0 Votes
    2 Posts
    371 Views
    S

    @lishmalinyjames yes, that is what the module instructions say to do

  • Alternative Calendar View

    8
    6 Votes
    8 Posts
    9k Views
    foxF

    wonderful view - any update here?

  • Show a module on MMM-HideAll

    1
    0 Votes
    1 Posts
    244 Views
    V

    MMM-HideAll is great for hiding modules and just showing the mirror, but there is 1 module I would like to still show. Can anyone assist in setting this up?

    I’d like to show the MMM-EyeCandy module while the other modules are hidden. I’d also like to set it on a loop timer so that it appears and disappears while hideall is active. The goal is to have a flat mirror that occasionally shows a twitchy eyeball that looks back at you.

    I do use eyecandy on one of my pages already, so I’m assuming I will have to duplicate and rename the module to get it to work separately, but I think address how to show a module while modules are hidden is the first step to figuring this out.

    Appreciate any assistance

  • how and where to find the latest modules offered?

    2
    0 Votes
    2 Posts
    370 Views
    S

    @rikko14 no definitive way… only one of mine is published on the 3rd party list

    I have tried in the past to do a google search for

    ‘github magicmirror module’

  • Making persistent and smooth visual timer

    7
    0 Votes
    7 Posts
    495 Views
    S

    @kiina create the timer in getDom() when u create the div, after updateDom() says content is available… u can save the div element in global and then have access to it from other places too…

    when the global is not null… then u know it was created