A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Doesn't contain package.json file

    8
    0 Votes
    8 Posts
    2k Views
    A
    @sdetweil Oh! That’s great! Onward, then :D
  • 3 Votes
    13 Posts
    5k Views
    M
    Very cool! Are you still working on this @Lorenz ?
  • This topic is deleted!

    Moved
    2
    0 Votes
    2 Posts
    168 Views
  • MMM-MQTT/MMM-TeslaLogger - Cleanup JS - help needed

    1
    0 Votes
    1 Posts
    344 Views
    spitzlbergerjS
    Hi, I have used MMM-MQTT as the basis for my MMM-TeslaLogger module. In MMM-MQTT there is an own local directory node_modules. At first sight this local dir is identical with the dir node_modules in the root directory of Magic Mirror. I now try to get rid of the local dir node_modules in my module. But I do not succeed. In MMM-TeslaLogger.js I only found one reference to the local node_modules, namely jsonpointer.js. This is also the case in MMM-MQTT. But if I change this reference to the node_modules in the Magic Mirror root, the module doesn’t run anymore and partly generates error messages. The pm2 log also shows error messages for the node_helper. These seem to refer to the line after the last line of the file ??? I am a JavaScript Newbee and can’t get any further. Can someone please take a look at this? Unfortunately I don’t have access to the error messages right now - sorry. I will deliver them later. I would be very grateful for any help. Regards Josef
  • add pdf to magicmirror

    Moved Unsolved
    2
    0 Votes
    2 Posts
    674 Views
    C
    hello, more informations for anyone if i can help. here my “test.bat” : The first action is to convert pdf to jpg (only page 1 and more options like remove source, rotate,…) on my desktop folder. the second to delete files from destination before the third action to copy all files from desktop folder to raspberry echo off cls 2jpeg.exe -src “*.pdf” -dst “C:\Users\W-7\Desktop\immo” -options pages:“1” overwrite:yes delsrc:yes -oper Rotate angle:180 echo For more examples please look at: echo http://www.2jpeg.com/overview/2jpeg-command-line-syntax pause del \@IP_Raspberry\Partage2*.* /s /q pause XCOPY C:\Users\W-7\Desktop\immo*jpg \@IP_Raspberry\Partage2 /s /h /Y
  • Using npm module in a module

    6
    0 Votes
    6 Posts
    1k Views
    S
    be careful loading lots of services in the modulename.js via getscripts… all that is loaded into the browser… (and every instance of the browser used) load them in the node_helper via require as single instance, and move the memory and load to the server side
  • Automatic scrolling at IFrame Module

    6
    0 Votes
    6 Posts
    867 Views
    S
    @Hendrik9203 ah, u want to scroll the page IN the iframe… I don’t know anything that does it already here is some technical info about ‘HOW’ to do it… https://www.dyn-web.com/tutorials/iframes/postmessage/
  • Touch input examples for MM Module

    18
    0 Votes
    18 Posts
    2k Views
    D
    Some future direction and option https://github.com/dvbit/Kinect-Mouse-Swipe-C-Module Not touch but gestures
  • Virtual mouse with kinect helper

    1
    0 Votes
    1 Posts
    261 Views
    D
    Just finished one bit of the whole but I would like to start sharing back to the community. Wrote a C module that works as virtual mouse and interprets swipes with help of a kinect gen1 . Works only on raspberry 4 or debian pc. Next : write the corresponding mm module. The c program is built to do that (outputs json to stdout to be fed to a js) Here is the link to github. Doc is WIP but you can start form there. Any contribution is welcome . Forgive the code. Recoded after just 25 years . https://github.com/dvbit/Kinect-Mouse-Swipe-C-Module Here is a video in https://youtu.be/HuSI21rGujg
  • Help on reading in a text file from a Google Drive

    7
    0 Votes
    7 Posts
    794 Views
    Mykle1M
    @ToastyRoshi said in Help on reading in a text file from a Google Drive: Any chance of sharing module? While you’re waiting you can check this one out. I think it’s fantastic. https://github.com/cowboysdude/MMM-Recipe
  • KODI/LibreELEC

    1
    0 Votes
    1 Posts
    420 Views
    M
    Does any programmer accept the challenge of creating a module to put KODI / LibreELEC in MagicMirror? I could for example watch TV while shaving. rsrs
  • Is there any command line that I can send an alert?

    Moved
    7
    0 Votes
    7 Posts
    1k Views
    ?
    @BKeyport possble. some modules like RemoteControl and notificationTrigger, can receive HTTP Request. If your script can send custom HTTP request(to localhost or internal IP), those modules can control other modules.
  • Publishing MM module

    Solved
    3
    0 Votes
    3 Posts
    665 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
    682 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
    664 Views
    S
    @MichMich none of the tests pass on my mac Catalina
  • MMM-MealViewer

    48
    0 Votes
    48 Posts
    14k Views
    htilburgsH
    @sdetweil JSON is perfect: [image: 1576264518754-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
    645 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
    441 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