A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Trying to make my own LIRR live map module but don't know where to start

    4
    0 Votes
    4 Posts
    2k Views
    S
    @EphraimB you can view and save that as an image. the railroad tracks and terminals are not gonna move today… or anytime soon
  • Does node_helper know if all module instances are already started?

    15
    0 Votes
    15 Posts
    6k Views
    A
    @sdetweil Works as you wrote. Sadly its not in the documentation.
  • Need help with new Modul "Scare"

    8
    0 Votes
    8 Posts
    1k Views
    R
    @Rattenjunge8080 So, i found a Solution, if anyone is interested, be my guest to copy this (spaghetti-code! I catch exceptions cause i am not able to check if and how many pictures are already loaded): /* MagicMirror² * Module: Scare * * By Rattenjunge8080 * */ Module.register("Scare", { // Default module config. defaults: { }, start: function(){ //The container which will be shown in DOM this.container = document.createElement("div"); this.visible = true; //set true via resume this.blocker = false; //block multiple DOM-calls image1 = document.createElement("img"); image1.src = '/modules/Scare/img1.jpg'; image1.classList.add("image1"); image2 = document.createElement("img"); image2.src = '/modules/Scare/img2.jpg'; image2.classList.add("image2"); }, // system notification your module is being hidden // typically you would stop doing UI updates (getDom/updateDom) if the module is hidden suspend: function(){ console.log('suspend'); this.visible = false; this.updateDom(1000); //TODO If in future not all pictures are removed->Delete the container: //this.container.remove(); }, // system notification your module is being unhidden/shown // typically you would resume doing UI updates (getDom/updateDom) if the module is shown resume: function(){ console.log('resume'); //TODO If in future not all pictures are removed->add here the container: //this.container = document.createElement("div"); this.visible = true; this.updateDom(); }, /* * Here the first Image will be added to a container, shown on screen * and a timer will count down. Let them feel safe for a while... * then a new image will pop up and a sound is played */ showImageAndPlaySound() { this.blocker = true; //TODO: Maybe useful in future //this.container.innerHTML = "<img src=\"/modules/Scare/OVAL.png\" width=\"200px\" height=\"500px\">"; //Put in picture to let it print on DOM this.container.appendChild(image1); this.updateDom(); console.log("set timeout 10s"); try { setTimeout(() => this.container.removeChild(image1), 10000); }catch (e) {console.log("catch timeout line 70");} setTimeout(() => this.container.appendChild(image2), 10000); this.updateDom(); //Generate the Audio from local file TODO auch mit setTimeout machen var audio = new Audio("/modules/Scare/sound.mp3"); audio.play(); this.blocker = false; }, /* * Here the first Image will be added to a container, shown on screen * and a timer will count down. Let them feel safe for a while... * then a new image will pop up and a sound is played */ getDom: function(){ if(this.visible){ if(this.blocker === false){ this.showImageAndPlaySound(); }else{} }else{ //When the Module is not shown, then remove the 2 Images try { this.container.removeChild(image1); this.container.removeChild(image1); this.container.removeChild(image1); this.container.removeChild(image1); this.container.removeChild(image1); this.container.removeChild(image1); } catch (e) {console.log("catch remove child img 1");} try { this.container.removeChild(image2); this.container.removeChild(image2); this.container.removeChild(image2); this.container.removeChild(image2); this.container.removeChild(image2); this.container.removeChild(image2); }catch (e) {console.log("catch remove child img 2");} } return this.container; } });
  • Need help with refactoring charting for a fork of a module.

    16
    0 Votes
    16 Posts
    4k Views
    S
    @jwilson5607 glad u got it working… if I hadn’t done my own chartjs module, I would have had no clue,
  • MMM-GoogleAssistant 4 how to change the wake word?

    7
    0 Votes
    7 Posts
    2k Views
    S
    @bugsounet Thanks a lot for your kind informations.
  • Need some help with a carousel like function

    3
    0 Votes
    3 Posts
    695 Views
    mumblebajM
    @sdetweil Thanks Sam. Will give that a go.
  • Help, I need to send data to the module I am trying to create

    2
    0 Votes
    2 Posts
    620 Views
    S
    @kylelamb1324 see my sample module it’s node helper receives a message and sends one back https://github.com/sdetweil/SampleModule its string identifying the message and some buffer of data, completely up to you, string, number, structure… then on the receiving side u get the identifier, so you can tell different messages apart and a pointer to the buffer sent by the sender socket notifications are private to your module an example use the node_helper does not get any of the info from config.js like the modulename.js does so, typically the first thing would be to send the this.config buffer to the node_helper
  • Change Folder of Logs of PM2 and NPM

    11
    0 Votes
    11 Posts
    5k Views
    S
    @thgmirror and there is a $HOME/.npm folder for npm, but I have no idea what all is stored there, and what needs to be persistent and not
  • PIR Sensor doesnt detect movement

    10
    0 Votes
    10 Posts
    2k Views
    T
    @1BlauNitrox it’s 28 inch lcd monitor. Few years old. Don’t know the model
  • Disable a module with touch screen (or remotely)

    4
    0 Votes
    4 Posts
    1k Views
    S
    @SvenT the module should not update when it is suspended (hidden)
  • MMM-Todoist scrolling list (Marquee)

    3
    1
    0 Votes
    3 Posts
    1k Views
    S
    @MZ-BER lucky it’s a div table and not html table
  • Sending Notification to html-file!?!?

    4
    0 Votes
    4 Posts
    894 Views
    S
    @thgmirror it’s not ‘in an html’ it has to be loaded into a browser. and then u have to export it correctly, and THEN you can call it ft another script.
  • Face Recognition

    3
    0 Votes
    3 Posts
    944 Views
    S
    @sdetweil ok Thank you ❤
  • MMM-PIR-Sensor Guide with Edits and Updates

    20
    7 Votes
    20 Posts
    19k Views
    S
    @bugsounet my apologies. I have deleted the post.
  • 0 Votes
    5 Posts
    1k Views
    S
    @banbutcher there is a little nosql db and lib in one https://www.npmjs.com/package/nosql
  • Help developing first module, displaying webscraped text.

    8
    2
    0 Votes
    8 Posts
    2k Views
    S
    @enderflop cool key here is module name = foldername = filename = register name and node_helper.js has to be in the same folder
  • updateDom() blocks MagicMirror

    28
    1
    0 Votes
    28 Posts
    9k Views
    S
    @1blaunitrox said in updateDom() blocks MagicMirror: I installed the software like in the docs show. my script fixes little odds and ends not covered by the doc
  • Error while starting Magic Mirror

    29
    0 Votes
    29 Posts
    8k Views
    1
    @sdetweil It works btw
  • Help creating a full screen module linked to weather

    5
    0 Votes
    5 Posts
    912 Views
    cowboysdudeC
    @sdetweil Yes he can also look at MMM-EasyBack to see how to do videos
  • Starting from an existing module?

    6
    0 Votes
    6 Posts
    1k Views
    S
    @sifuhall my SampleModule has all the parts. u won’t need the helper if fetch works