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

    Solved
    3
    0 Votes
    3 Posts
    651 Views
    R

    Thanks! I will update when the module is published.
    First I need to solve some issues :)

  • Getting update from python code interval-ly

    8
    0 Votes
    8 Posts
    673 Views
    N

    @sdetweil oh I see, I made some modification based on your suggestion

    const spawn = require("child_process").spawn var NodeHelper = require("node_helper") var process = spawn("python", ["/home/pi/MagicMirror/modules/MMM-Attend/attendance.py"]) require('events').EventEmitter.defaultMaxListeners = 0; module.exports = NodeHelper.create({ socketNotificationReceived: function(notification, payload){ switch(notification) { case "GIVE_ME_DATA": process.stderr.on("data", (data)=>{ console.log("attend process errorr= "+data) }) process.stdout.on("data", (data)=>{ console.log("attend data = "+data) var result = String.fromCharCode.apply(null, new Uint16Array((data))) this.sendSocketNotification("HERE_IS_DATA", result) }) break } }, })

    is this what you mean based on your previous comment. Because I don’t really get it

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
  • Help needed! Looking for Mocha experts!

    5
    0 Votes
    5 Posts
    636 Views
    S

    @MichMich none of the tests pass on my mac Catalina

  • MMM-MealViewer

    48
    0 Votes
    48 Posts
    13k Views
    htilburgsH

    @sdetweil JSON is perfect:

    0_1576264519518_ff13b851-b585-43c2-a741-02e28faa83e9-image.png

    Thanks for the help so far!! Now I have my data I can play around with it.

  • Send data to magic mirror? Is there an API?

    2
    0 Votes
    2 Posts
    630 Views
    brobergB

    @cookblook The MM2 is a webserver, more or less.

    Take a look at MMM-Syslog (https://github.com/paviro/MMM-syslog)

  • Advice on learning to write modules??

    Locked
    2
    0 Votes
    2 Posts
    440 Views
    S

    @GoodWillGustin see my reply there

  • Nunjucks and Chartjs / Javascript

    15
    0 Votes
    15 Posts
    3k Views
    S

    @lavolp3 updateDom() returns a promise, but then IMMEDIATELY calls getDom()…

    so the wait is ineffective

    all you can do is check the dom to see if your minimum content some anchoring div) is present, and retry that until it is.
    then call updateDom() to force a refresh

    this is what I do in getDom(). i have an array of different charts to present

    // if we are not suspended/hidden due to sleep or whatever if (wself.suspended == false) { // make sure we don't start before the data gets here if (!this.loaded) { < - just a flag for first time this.loaded = true; return wself.wrapper; } else { // loop thru the data from the blynk server, one chart per data point/pin for (var pin_index = 0; pin_index < wself.config.Pins.length; pin_index++) { // get the pin text name. used for index into the data hash var this_pin = wself.config.Pins[pin_index]; // clear the work variable var canvas = null; // try to locate the existing chart if ((canvas = document.getElementById("myChart" + this_pin)) == null) { var c = document.createElement("div"); c.style.width = wself.config.width + "px"; c.style.height = wself.config.height + "px"; if (!wself.config.stacked) {c.style.display = "inline-block";} wself.wrapper.appendChild(c); canvas = document.createElement("canvas"); canvas.id = "myChart" + this_pin; c.appendChild(canvas); } // if the chart has been created if (wself.charts[pin_index] != null) { // destroy it, update doesn't work reliably wself.charts[pin_index].destroy(); // make it unreferenced wself.charts[pin_index] = 0; } // create it now, into the special div object for this chart wself.charts[pin_index] = new Chart(canvas, {

    my ‘schedule update’ asks for more data from my node_helper…
    it informs me when its back. and I call updateDom() after saving the data where getDom() will look

    u can see my code at https://github.com/sdetweil/WaterLevels

  • expressApp.get - Error Cannot GET ...

    4
    0 Votes
    4 Posts
    850 Views
    S

    @spitzlbergerj cool!!

  • Mmm aurora

    14
    0 Votes
    14 Posts
    2k Views
    C

    @Mykle1 Nice job :)…Thanks

  • Stop compliments cycling

    1
    0 Votes
    1 Posts
    336 Views
    K

    I’m looking to set up a mirror which activates with a proximity sensor and I was wondering if it’s possible to adjust the compliments module so that it displays a compliment when the pi is powered up and then fades to blank until next time the sensor is activated.

    I can’t see how the current settings in the readme would make this happen?

    Apologies if this is in the wrong section. Let me know if it is and I’ll move it :)

    thanks in advance

  • my first module "helloworld"

    3
    0 Votes
    3 Posts
    782 Views
    B

    @sdetweil feels like you are my personal trainer :rolling_on_the_floor_laughing:

    Thansk for this link!

  • This topic is deleted!

    4
    -1 Votes
    4 Posts
    152 Views
  • Azure Cognitive Services API

    5
    0 Votes
    5 Posts
    709 Views
    ?

    @Antagonist
    Definitely there be 1 or 2 facial detection module as 3rd party’s. they are based on opencv, but personally i havent used it. so cannot remember the name. You can search in this forum with keyword facial or detection.

  • Question: What is the process of modifying other people's module ?

    5
    0 Votes
    5 Posts
    762 Views
    S

    @bdream in the case where I made a copy, and NOT a fork, i create a fork, rename my installed instance out of the way, then clone the fork from MY github userid, and then copy the files from the saved instance to the new instance, retest, then use git to save those (commit to local repository) and then push to the fork. then u can erase your saved instance

    now on the fork, others can try it out, as they can clone YOUR instance, instead of the original.

    you can then create a pull request to the original repository.

    your form does NOT stay in sync automatically with the original…

    YOU have to create a pull request FROM the original to your fork to get and merge updates…

  • Creating Module with API Key/Secret

    15
    0 Votes
    15 Posts
    3k Views
    S

    @lilpkstud cool… if need it in strings someplace, need to convert it back object=JSON.parse(string)

  • start&end video id for MMM EmbedYoutube

    Moved Unsolved
    1
    0 Votes
    1 Posts
    308 Views
    C

    Hello everybody,

    beginner with javascript i would like to incorporate parameters start & end to a id video with module MMM embedYoutube or other modules…
    I have a playlist video and some videos are interesting but so large…thanks all

  • Loading and selecting an external DOM Element with jsdom

    5
    0 Votes
    5 Posts
    679 Views
    A

    Sam, thanks. That’s awesome.
    I’ll dig into the changes right now. Made my day.

  • Metar Module Not Working

    4
    0 Votes
    4 Posts
    677 Views
    S

    see my sample Module

    https://github.com/sdetweil/SampleModule

    I use ‘ALL_MODULES_STARTED’

  • CSS Order of execution

    4
    1 Votes
    4 Posts
    721 Views
    S

    @buzzkc great thanks… I always thought that custom.css was a bad idea… every module should supply their own file as the getStyles() function provides the mechanism.