A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • help converting code for module...

    21
    0 Votes
    21 Posts
    6k Views
    ?

    @justjim1220

    const exec = require('child_process').exec var NodeHelper = require("node_helper") module.exports = NodeHelper.create({ socketNotificationReceived: function(noti, payload) { if (noti == "GIVE_ME_RESULT") { setTimeout(()=>{ exec("C:\WINDOWS\system32\get-temperature", //I don't know WINDOWS system at all. Is it right? (err, sto, ste) => { if (!err) { this.sendSocketNotification("HERE_IS_RESULT", sto) } else { console.log("Error", err) } } ) }, 1000) } } })

    It isn’t tested. But you can catch the idea.

  • ALSA sound mix problem (Youtube)

    2
    2 Votes
    2 Posts
    872 Views
    ?

    UPDATE
    Weird thing.
    in RPI (model 3 B+ / Raspbian Stretch), in getDom() I rendered belows;

    < iframe width="560" height="315" src="https://www.youtube.com/embed/8CdcCD5V-d8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>< /iframe>

    This works. but

    < audio src="test.mp3" > < iframe width="560" height="315" src="https://www.youtube.com/embed/8CdcCD5V-d8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>< /iframe>

    This doesn’t work often. but I don’t know why and when.

    When audio tag exists before youtube, 100% failed. When after, sometime worked, sometime didn’t. I suspect Electron(Chromium) on RPI cannot handle multi-sound output.

    I’m rebuilding my MMM-AssistantMk2 more stable, lighter and independent from some annoying dependencies, but I’m stuck on this. I’m even considering to drop youtube features from module if I cannot solve this problem. (But who cares… -_- )

  • Change newsfeed title to image/logo?

    Moved
    58
    0 Votes
    58 Posts
    20k Views
    justjim1220J

    @striiker said in Change newsfeed title to image/logo?:

    opacity: 1.0;

    Well, you might think about changing the color or having no color.

    I just worked with it going all the way down to 0.1 and this is the result:

    0_1540513439867_Screenshot (156).png

    this is without a background color…

    0_1540513583820_Screenshot (157).png

    just change background-color: maroon; to background: none;

  • VW-CarNet module

    4
    4 Votes
    4 Posts
    2k Views
    L

    That would be great! Just what I was looking for!

  • Dynamically update html

    2
    0 Votes
    2 Posts
    951 Views
    B

    I resolved it by implementing a updateBoard function that checks if tables has been rendered and if just updates the innerHTML of that div. Was great to read ANOTHER WAY TO CONTROL OUTPUT in the beginners KB, https://forum.magicmirror.builders/topic/8534/head-first-developing-mm-module-for-extreme-beginners

  • Help with inserting a script into a <div> element

    11
    0 Votes
    11 Posts
    2k Views
    Mykle1M

    @justjim1220 said in Help with inserting a script into a <div> element:

    It doesn’t allow clickable links to be clicked…

    Most people don’t use a mouse with their mirrors

  • 0 Votes
    1 Posts
    2k Views
    N

    I want to display live cricket score and sensex indices (Indian share market) to the magic mirror but there are no free or open api available for the same, after spending a lot of time I came to the conclusion that using website widget to do the same is the best and only option so is there any way or module to add the widgets like these ones available at these sites
    for live cricket score
    cricruns(dot)com/widget/
    cricwaves(dot)com/cricket/widgetmaker.html

    for sensex indices
    moneycontrol(dot)com/stocks/company_info/indices_widget.php
    liveindex(dot)org/widgets/

    the above widgets are not embedded in the iframe tags, so is there any way to use the other widgets that are available in the iframe tags?

    Can someone please write a module where I can add any website widget to the magic mirror, just like we can add any widget to website?

  • include npm module like firebase module into our own MM module

    9
    0 Votes
    9 Posts
    2k Views
    K

    @sean ok will try it out later =)

  • Learning Node.js

    2
    0 Votes
    2 Posts
    1k Views
    Mykle1M

    @timcadieux said in Learning Node.js:

    will I be able to do the development on my Windows PC (vs 2017) and merely copy it over to my PI

    Yes, you can. I was developing under Windows. I know some others that still do. I do my module work in ubuntu now.

  • how to detect main window size via code

    4
    0 Votes
    4 Posts
    1k Views
    S

    @sean said in how to detect main window size via code:

    clientHeight

    thanks… duh, so easy!..

  • can i inject javascript as part of my modules getDom content?

    7
    0 Votes
    7 Posts
    1k Views
    S

    @sdetweil well, that was easy and works great!..

    gotta figure out how to have a div with a fill color to replace the black edges when the pics are not fulls screen.

    also the bottom edge of the pic is clipped by the bottom of the screen somehow… half the newsfeed line is over the clip line

  • Is there any callback for getDom execution ?

    3
    1 Votes
    3 Posts
    1k Views
    ?

    As I know, there is no callback or notification when getDom is executed.
    However, if you want to catch the changing of the output of the specific module, you can use MutationObserverin your module.

  • Raspberry Pi 0w Module Errors

    5
    0 Votes
    5 Posts
    2k Views
    E

    @ninjabreadman++ Thank you again for your reply, I will review the MM on the pi0w with the dir name the same as the Module.register(). That said, if this is truly the issue, wouldn’t the same issue persist when booting up the electron app locally on my mac?

    re loader.js error that appears to be coming from MagicMirror/js/loader.js which appears to be failing to load my MMM-my-module.js file AFAIK

  • Using Unicode Character and symbols in module

    2
    0 Votes
    2 Posts
    1k Views
    A

    Hi to all,

    i found a solution.
    0_1536262932769_lock.JPG

    I use font awesome (which comes with mm anyway) an the following css:

    .fa-lock1:after { content: "\f023"; }

    AxLED

  • Accesing config in node_helper

    3
    0 Votes
    3 Posts
    1k Views
    R

    @sean Yep, thats what i do now. Messaging config around :-) Thanks for clarifying so i can rest assured not to overlock something obvious :-)

  • omxplayer overlay

    19
    0 Votes
    19 Posts
    6k Views
    evroomE

    The MPG2 license I most probably needed in order to be able to stream the satellite TS stream.
    With the codec disabled, I am still able to play the .mov and .mp4 files.

    In general the rule applies: when you can play / stream a source using omxplayer from the command-line, you should be able to play that source via MM (as long as the module used passes the right omxplayer parameters).

    If you want to pursue the issue further, you can add the --genlog parameter in order to generate the omxplayer.log file:

    cd /MagicMirror/modules/MMM-RTSPStream $ vi node_helper.js Edit line 113: args.unshift("--genlog", "--avdict", "rtsp_transport:tcp"); Restart MM. $ ls -als /home/pi/MagicMirror/omxplayer.log

    Perhaps this log will reveal why the file does not play.

  • CSS-help

    5
    0 Votes
    5 Posts
    1k Views
    J

    @cowboysdude
    Thanks! Finally did it!

  • Show notification and hide compliments

    1
    0 Votes
    1 Posts
    1k Views
    D

    In the early days of MagicMirror,
    i got a module, that was able to fetch data from OpenHAB and displays it in place (instead of the compliment section)
    If the string is empty, the comments won’t be hided.

    Is it possible to bring this to the current version of MagicMirror?

    https://raw.githubusercontent.com/Dom1n1c/Smartmirror/master/js/openhab/openhab.js

  • error loop

    11
    0 Votes
    11 Posts
    3k Views
    ?

    @jchenaud
    MODULE_DOM_CREATED is not so good time. Because, It would be emitted when Your DOM was created, but All of other DOMs are not rendered yet. DOM_OBJECTS_CREATED is better.
    If you want to using position, use .getDom(). A usual way to use position is, in .getDom() to initialize your rendering and to prepare the framework to draw.
    And you can choose one of drawing tricks.

    getDom() shall take care of all the drawing. in .getDom() put all of your rendering framework and contents. and you can refresh your render by calling .updateDom()

    getDom() shall draw only framework, Contents should be drawn by your another function with HTML DOM manipulation.

    or getDom() just return empty wrapper, Then, all of your rendering and refreshing will be performed by yourself.

    Which is better? case-by-case.

    For the last question; I cannot figure out. :)

  • Convert existing javascript code to magic mirror module

    Moved
    2
    0 Votes
    2 Posts
    993 Views
    S

    what does it do? I just ported over my pure node/angular/javascript code to mm…

    took some thinking about how to separate the existing code to fit the MM execution model…

    in general on MM you supply fragments of a page to be shown in some location on the MM page… you can also do a whole page in an iframe…