A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Advice on learning to write modules??

    Locked
    2
    0 Votes
    2 Posts
    581 Views
    S
    @GoodWillGustin see my reply there
  • Nunjucks and Chartjs / Javascript

    15
    0 Votes
    15 Posts
    4k 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
    1k Views
    S
    @spitzlbergerj cool!!
  • Mmm aurora

    14
    0 Votes
    14 Posts
    5k Views
    C
    @Mykle1 Nice job :)…Thanks
  • Stop compliments cycling

    1
    0 Votes
    1 Posts
    385 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
    1k 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
    1k 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
    1k 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
    6k 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
    356 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
    956 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
    921 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
    1k 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.
  • MMM-Remote-Control # More files *.html (pages)

    6
    0 Votes
    6 Posts
    724 Views
    S
    @Ciastuus many html elements (p, div, span, … ) have an innerHtml attribute that will wrap text or raw html. a web page is made up of hundreds of html elements… the MagicMirror model is a single web page… and each module contributes a little bit of that content. the getDom() routine is MagicMirrors request to the module to supply the html for ITS content. (paragraph, table, … whatever)… BUT, until the getDom() routine returns, the stuff built is just in the modules memory space. the content provided to MagicMirror is then inserted into the dom in the appropriate location based on the ‘position’ you provided in config.js. the content can be built lots of different ways… hard coded html text (just like a html file) some hard coded and some built by building the little dom tree for the modules content or all apis… none of this is MagicMirror specific, as it uses the documented Document Object Model (dom) apis defined my the w3c standards. your module’s content starts with a < div> innerHtml is here < /div> and then u set its div.innerHtml, or call div.appendChild(anotherElement)
  • On-Demand Music

    Locked
    18
    1 Votes
    18 Posts
    9k Views
    S
    @jhoney maybe look at raspotify https://github.com/dtcooper/raspotify https://medium.com/@pugillum/spotify-connect-with-raspberry-pi-a3280893a076
  • Video encoding ffmpeg and streaming hls

    1
    0 Votes
    1 Posts
    758 Views
    D
    I created a 3rd party module called MMM-Ring. It is for MM owners who have a ring device that whenever the doorbell is activated the video is streamed to the mirror. This works on my end with no issues. However, I have at least one person stating they get either no video or the video is frozen almost as if its just a snapshot. I had them check to make sure the stream data is being saved (.m3u8 and .ts files) and it is. I’m thinking this is a latency related issue tied to internet connectivity. I thought by making the -preset option on ffmpeg to ultra fast perhaps we could reduce down the size of the files generated for stream, but it only showed minor improvement on the end users side. Hoping someone with more experience in streaming could potentially add some guidance/assistance. https://github.com/DustinBryant/MMM-Ring/issues/1 Thanks in advance!
  • Getting API data in table

    7
    0 Votes
    7 Posts
    2k Views
    B
    @sdetweil hi did you make a table then? where did you put your java code? i.e. which file?
  • How to have Python and JS talk to each other?

    5
    0 Votes
    5 Posts
    1k Views
    S
    @strawberry-3-141 and that uses a larger wrapper of python scripts called PythonShell
  • Need help to develop a Module for Halloween

    1
    0 Votes
    1 Posts
    513 Views
    D
    Hello, I’m trying to make this project ( https://www.instructables.com/id/Raspberry-Pi-Based-Living-Portrait-Player-Intro/ ) into a Module. The difficulty I have is that I’m using Simple-Swiper module to switch the pages of my mirror. Here is what I’m trying to do : the user can navigate on the different pages. when he reaches the last page , omx player is displayed with the video but doesn’t play the video. It just display the first image. This is what is done in the Living-Portrait-Player. if a move is detected, the video plays. if the user switch the page, omx is killed and disappears. I’m asking for your help because I have already started something but I can’t manage to make it work. I’m getting inspiration from multiple modules for this project. MMM-PIR which is the one I’m using as a main module and I’m modifying the code of that module. MMM-Podcast MMM-pages to find out what is the current page MMM-RTSPStream for methods related to omxplayer I wonder if I can use the callback method in MMM-PIR to run the script when the user arrives on the page. I haven’t tried that yet. And also, how to kill omx when the user changes the page. I’m also having difficulties to get the current page in the MM-PIR modules. I’m using this.sendNotification(“QUERY_PAGE_NUMBER”); in the MMM-PIR.js but seems like MMM-pages doesn’t receive the notification. I would be so thankful if someone could help me working on this.