MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. mortenbirkelund
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 58
    • Groups 0

    Posts

    Recent Best Controversial
    • Swiper only works on first update...

      I am trying to add a swiper to the official rss news module, but I am having some problems. Whenever i open the page, the slider only works, the first time the getDom function is called. Once the rss feed is fetched and ready, the getDom function is called again, but this time the swiper doesnt work.

      I am using this swiper http://idangero.us/swiper/demos/
      and i am initating the swiper by creating a swiper object and passing it the class for the swiper div.

      	// Override dom generator.
      	getDom: function() {
      		if (this.newsItems.length > 0){
      			var swiper = new Swiper('.swiper-container');		
      			var container = document.createElement("div");
      			container.className = "swiper-container";
      				
      			var wrapper = document.createElement("div");
      			wrapper.className = "swiper-wrapper";
      
      ...... (more code ......
      
      return container;
      

      I cant figure out why the swiper only works the first time the getDom function is called. Any suggestions?

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      @strawberry-3.141 Thanks. I thought that MM would automatically look in the node_module folder. It is working now.

      posted in Development
      M
      mortenbirkelund
    • RE: Display JSON data from an api

      @cowboysdude said in Display JSON data from an api:

      it would be easier to just write a new module for it…

      Perhaps. I just guessed a the rest module could be a good starting point.

      posted in Requests
      M
      mortenbirkelund
    • RE: Display JSON data from an api

      You could take a look at the MMM-Rest… It doesnt have the ability to read json but could be modified. If you do modify it to accept json, please let me know as I am also looking for a way to do this.

      https://forum.magicmirror.builders/topic/1851/mmm-rest-reading-json

      posted in Requests
      M
      mortenbirkelund
    • RE: Activate Profiles (via MMM-ProfileSwitcher) using MMM-Remote-Control...

      http://MagicMirorIP:8080/remote?action=NOTIFICATION¬ification=CURRENT_PROFILE&payload={Profile:“Snille”}

      What about if you remove the double quotes from Profile? Just a guess.

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      @strawberry-3.141 Perfect. I now have the module in a node_module folder located inside the module folder.
      But how do i include this module into my code?

      	getScripts: function() {
      		return [
      			"moment.js","package.js"
      		];
      	},
      

      this is not wokring as i get an 404 error

      posted in Development
      M
      mortenbirkelund
    • RE: Include from /modules/node_modules/

      I am pretty sure that I did install it in my modules directory but I will try your suggestion. Thanks for a quick reply. Awesome forum 👍

      posted in Development
      M
      mortenbirkelund
    • Include from /modules/node_modules/

      I have a js script that I would like to include into my module. I have installed it into the modules/node_modules/ folder by running “npm install swiper”.

      How do i include this script into my module, so I can start using it?

      0_1488270765657_1.PNG

      posted in Development
      M
      mortenbirkelund
    • RE: Svendborg/Denmark - Magic Mirror finished!

      Could you tell a bit about the quality of the glass. I have been looking to purchase the same, but I wasn’t sure about the specs of the glass. Is it a suitable product for a magic mirror project?

      posted in Show your Mirror
      M
      mortenbirkelund
    • RE: New windows, NOT full size

      @roramirez said in New windows, NOT full size:

      Electron

      Could you please elaborate on ow i could use the Electron to open a browser window that is not full size, even though the magic Mirror browser is in full size?

      posted in Troubleshooting
      M
      mortenbirkelund
    • Github Tutorial

      I was looking through the log of magicmirror and I found and error. It turned out to be an error in the danish translation file da.json. The smallest error ever, but an error, none the less.

      I am totally new to git and github, and are therefore not sure how to proceed. I am hoping that somebody will add an small post in the tutorial section of this forum with a “You’ve fixed a bug; whats next”, that simply explains how to handle the git-part and upload the fix to the repository. Hopefully this could encourage more people to help and contribute.
      I know I could read more general guides about git, but I am hoping that somebody would also explain about the branches in the repository and the specific parts concerning the magicmirror repository.

      posted in Feature Requests
      M
      mortenbirkelund
    • RE: New windows, NOT full size

      @roramirez but isnt that only for the MagicMirror window? I still want the MagicMirror window to to be fullscreen. I would just like to be able of opening a window that is not full screen.
      Or have i misunderstood the electronOptions?

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: New windows, NOT full size

      @broberg As far as I could see, Iframe was not and option, due to cross-origin limitations…

      posted in Troubleshooting
      M
      mortenbirkelund
    • New windows, NOT full size

      Hi
      I am working on a MagicMirror with touch. Therefore I inserted the following code into the getDom function in the newsfeed module, in order to add a link to the news, so a new browser window will open and i can read the whole news in a browserwindow.

      			var url = this.newsItems[this.activeItem].url;
      			wrapper.addEventListener("click", function () {				
      				window.open(url,'popUpWindow','height=500,width=500');
                  });
      return wrapper;
      

      This works perfect when I run it in my browser (node serveronly), but when I run it normally (npm start), then the new browser window is full size, and therefore the top bare is missing, and the windows cannot be closed again. Is there anyway, to make sure that the new browser windows is not full size when it opens?

      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @tosti007 I’ve just tried it, and I don’t experience any problems.

      posted in Utilities
      M
      mortenbirkelund
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @tosti007 In case anybody is interested, the block of codes that enables the modules, should be altered a bit in order to take the animationDuration into account.

      		setTimeout(function() {			
      			MM.getModules().exceptWithClass(self.config.ignoreModules).enumerate(function (module) {
      				if (self.isVisible(self, useEveryone, module.data.classes)) {
      					module.show(self.config.animationDuration, function () {
      						Log.log(module.name + " is shown.");
      					}, options);
      				}
      			});			
      		}, self.config.animationDuration);
      
      posted in Utilities
      M
      mortenbirkelund
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @tosti007 Thank you very much. Very kind of you to create the code for me.

      I am new to using Git. How do i alter your my copy of your module, without risking that it will be overwritten on an update? Or is that not something that i should be concerned about?

      posted in Utilities
      M
      mortenbirkelund
    • MMM-NetworkScanner returns error

      Whenever start the MagicMirror with the network scanner modul installed i get the error described here.

      https://github.com/ianperrin/MMM-NetworkScanner/issues/8

      There error says : TypeError: Cannot read property 'devices' of undefined
      

      You can see my config here

      {
              	module: 'MMM-NetworkScanner',
              	position: 'top_right', 
      			classes: 'network',
              	config: {
      				devices: [
      					{ ipAddress: "192.168.0.5", name: "Qnap", icon: "server"},
      					{ ipAddress: "192.168.0.6", name: "AquariumPi", icon: "tint"},
      					{ macAddress: "48:3c:0c:84:08:98", name: "Marie-Huawei", icon: "female"},
      					{ macAddress: "c0:ee:fb:4a:7a:cf", name: "Morten-OnePlus", icon: "male"},
      				],
      				showUnknown: false
              	}	        
          	},
      
      posted in Troubleshooting
      M
      mortenbirkelund
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @tosti007 When switching between profiles, there is a short timespan where both the modules of the old profile and of the new profile, is present at the screen at the same time. Is there a way to ensure that the old modules fadeout first, and once they are gone, the new modules will fade in?

      posted in Utilities
      M
      mortenbirkelund
    • MMM-Rest reading Json

      Hi
      I am not sure, but is is possible to read from a rest api returning json, using this module? (https://github.com/Tuxdiver/MMM-Rest)

      Here are the json that are returned from the API. I need the module to read 24.75 and display it.

      {
        "temp": 24.75
      }
      
      
      posted in Troubleshooting
      M
      mortenbirkelund
    • 1
    • 2
    • 3
    • 2 / 3