A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • MMM-NetworkScanner revisited

    4
    1 Votes
    4 Posts
    2k Views
    E

    @zdenek
    Can you post your findings in the github issues pelase?
    I just posted about the same…

  • Slideshow Module with PDF support

    1
    0 Votes
    1 Posts
    765 Views
    F

    Hey guys,

    I need your help :).

    My module “Pictures” can show any kind of pictures, located on a mounted network drive. On startup node_helper mounts a specific drive, then it scans this folder every two seconds (it could be any other value) and write all filenames in a text file. Pictures imports and filters this file. At the end it generates a slideshow.

    Now I want to implement pdf files in the same way. Actually it works with a little workaround but I’m not happy with that. I have to start MagicMirror and additionally I have to start another browser (unfortunatelly “node serveronly” doesn’t work) on the pi to show pdf files with the integrated plugin.

    For that I have several questions^^:

    Is there a possibility to show pdf files native in my module? My slideshow is a little laggy on the pi (3B). Any PC with the same network connection shows the same slideshow in browser with perfect performance. Can I improve my slideshow performance anyhow? I have a problem to run “node serveronly” with raspian stretch an the new MagicMirror 2.3.1. I can start but as soon as I connect to the pi by IP:8080 my module generates -75 errors. This won’t happen if MagicMirror runs with “npm start”.

    Best regards
    flash

    node_helper.js

    var request = require('request'); var NodeHelper = require("node_helper"); const exec = require('child_process').exec; module.exports = NodeHelper.create({ start: function() { this.started = false; }, socketNotificationReceived: function(notification, payload) { if (notification === "CONFIG" && this.started == false) { this.config = payload; // mounting network drive exec("/usr/bin/sudo mount -t cifs -o user=" + this.config.user + ",password=" + this.config.password + " " + this.config.source + " /home/pi/MagicMirror/modules/Pictures/images", null); this.started = true; } if (notification === "GET_PICTURE_DATA" && this.started) { var path = "/home/pi/MagicMirror/modules/Pictures/images/"+ this.config.folder + "/"; var opt1 = '-type f ! -path "/home/pi/MagicMirror/modules/Pictures/images/' + this.config.folder + '/.thumb/*" | awk -F"/"' var opt2 = '{print $NF"/" }'; var opt3 = '| sort > ~/MagicMirror/modules/Pictures/files.txt'; exec("find " + "'" + path + "' " + opt1 + " '" + opt2 + "' " + opt3, null); this.getData(payload); } }, getData: function(options) { request(options, (error, response, body) => { this.sendSocketNotification("PICTURE_DATA", body); }); } });

    Pictures.js

    var showPicture = 0; var textdata = []; var textdataHelp = []; var findExt = []; Module.register("Pictures",{ defaults: { loadingText: 'Lade SlideShow...', pictureInterval: 20 * 1000, }, start: function() { Log.info("Starting module: " + this.name); this.loaded = false; this.sendSocketNotification('CONFIG', this.config); this.locationSelf = window.location.href; this.file = 'modules/Pictures/files.txt'; setTimeout(this.updateFiles, 2000, this); }, socketNotificationReceived: function(notification, payload){ if(notification === 'PICTURE_DATA' && payload !== null){ this.loaded = false; textdataHelp = payload.split("/\n"); if (textdataHelp[0] !== ""){ textdata = []; // textdata will not be cleared, if helper has no content } for (i = 0; i textdata.length - 1) { showPicture = 0; } self.updateDom(1000); showPicture++; } }, getDom: function() { var wrapper = document.createElement("div"); var pictureInfo = document.createElement('table'); if (!this.loaded) { wrapper.innerHTML = this.config.loadingText; return wrapper; } var currCount = showPicture + 1; var tableHead = document.createElement('tr'); tableHead.className = 'normal small'; var y = 0 findExt = textdata[showPicture].split("."); for (i = 0; i 0){ //tableHead.innerHTML = '<br />' + currCount + '/' + textdata.length; tableHead.innerHTML = '<br />' + currCount + '/' + textdata.length; }else{ tableHead.innerHTML = '<img src="' + this.locationSelf + 'modules/Pictures/images/' + this.config.folder + '/' + textdata[showPicture] +'" alt="Vorschau" /><br />' + currCount + '/' + textdata.length; } y = 0; findExt = []; pictureInfo.appendChild(tableHead); wrapper.appendChild(pictureInfo); return wrapper; }, });
  • Debugging

    22
    1 Votes
    22 Posts
    16k Views
    strawberry 3.141S

    @Sputnik could be the updatenotification module, which is probably not able to read a modules git config. Did you download modules manually or did you use git clone?

  • [Solved] Module asking SNCF API

    2
    0 Votes
    2 Posts
    2k Views
    J

    Problem solved.

    the module is working

  • 1 Votes
    5 Posts
    2k Views
    G

    You can find any information about bitcoin here: https://bitcoinbestbuy.com. There is a detailed guide for beginners, in which countries and what cryptocurrency. How to buy in USA and so on. Very interesting and cool articles and more!

  • Is there a way to programmatically change the position of a module

    2
    0 Votes
    2 Posts
    882 Views
    V

    I did it manually using references the modules and containers. It worked a lot better than I assumed it would as well since references to the modules seem to stay intact so hiding them still works. I will post the full module when I’m done if in case anybody wants to see how I hacked it together.

    P.S. If there is a more official way, I would still like to know what it is.

  • 0 Votes
    2 Posts
    874 Views
    strawberry 3.141S

    @mediathreat you have different possibilities, e.g.

    add a class

    in your td tag add a class attribute class='MyFancyTitle', the forum don't want to render it. Then in your css you can style this class

    or add inline styling

    in your td tag add a style attribute style='font-weight: bold'
  • How to show a popup window

    4
    0 Votes
    4 Posts
    2k Views
    H

    Have you had any luck with this. I’d also like some way to change alarm times on a touch screen.

  • sendSocketNotification not working

    3
    0 Votes
    3 Posts
    2k Views
    M

    Got this sorted - found there is another url that holds the information so added another request. The request I was having issues with was a post request, whereas the one I am using is a get.

  • photobooth module...2 screens?

    1
    0 Votes
    1 Posts
    961 Views
    D

    looking to have a 7" touch screen as secondary input, with a virtual keyboard like a console.

    Driving a magic mirror display, interactive, with a few questions/animations before picture and confirmation/email.

    kind of like this…https://github.com/wyolum/TouchSelfie

    Is it even possible? Maybe 2 Pis? One logged in as terminal? Anything like this already?

  • Alert' system as a call display

    6
    2 Votes
    6 Posts
    2k Views
    C

    Added a more stable version to Github. I’m looking to build a .netcore version so it will run on a debian plateform.

  • Exporting a file from Google Drive with specific mimeType

    5
    0 Votes
    5 Posts
    5k Views
    L

    Anyone interested… here is the code which worked for me: https://github.com/google/google-api-nodejs-client/issues/1098

  • Displaying data from MySQL database

    9
    0 Votes
    9 Posts
    5k Views
    cruunnerrC

    Don’t know if it helps and i am trying to keep it short…

    I build an Oiltank measurement system with another raspberry pi.
    The results will be written to a mysql database and to a JSON file, which will be uploaded to my NAS.
    On the NAS i run the database and a web server.
    To Display the results on a webpage i used this php script: https://github.com/cruunnerr/OilTank-Graph-WebPage

    To display the results on my MM i got some very much help from our user @doubleT
    He wrote this module for me: https://github.com/cruunnerr/MMM-Oiltank
    The module grabs the data from a JSON file and shows it on the MM.

    Maybe this could help :/

    MagicMirror:

    1_1522492360079_Bildschirmfoto 2018-03-31 um 12.30.56.png

    Web Page:

    0_1522492360077_Bildschirmfoto 2018-03-31 um 12.30.12.png

  • Header not showing

    4
    0 Votes
    4 Posts
    2k Views
    Mykle1M

    @fabbr

    Welcome! :-)

  • Improve updatenotification module (to be module selective)

    5
    0 Votes
    5 Posts
    2k Views
    E

    Ah Yeah. That actually sound like a much better solution!
    Not sure when I’m gonna have time to implement it though. Kinda low on my priority list, right now. We’ll see…

  • MMM-Assistant (Dev Updates)

    10
    2 Votes
    10 Posts
    4k Views
    H

    @E3V3A i back up the module folder before i do any updates just in case i do run in to that issue lol

  • Spotify

    13
    1 Votes
    13 Posts
    7k Views
    P

    Realy good i thing i add it to my mirror. Thanks

  • access filesystem

    4
    0 Votes
    4 Posts
    1k Views
    L

    As it turns out, I didn’t read enough: I had to use the node_helper to access the filesystem. Sorry for digging out the thread.

  • Is it possible to run a module stand-alone without the MM framework?

    3
    0 Votes
    3 Posts
    1k Views
    E

    @j.e.f.f Thank you. Yeah, that seem to be the best dev solution so far.

  • helo every one

    2
    0 Votes
    2 Posts
    975 Views
    N

    @jonhcenami Have a look at MMM-pages. You can then also install MMM-Remote-Control. It’s a very useful module, but will also install a listener to send notifications to MM, as referenced in this (and other) posts. You can then use that listener to send notifications to your mirror, including to switch to the various pages you’ve configured.