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

    Posts

    Recent Best Controversial
    • RE: Is there a way to show specific compliments on specific dates?

      @romain I figured it out! The console showed me it was April 29 today (which is the right date), but it was written as “Apr. 29”, so with a dot behind the month. I tried writing it like this in the code and now it works!
      So it has to be:

      if (moment().format('MMM D') == 'Apr. 29')
      

      and then it works :)
      And now I know how to run my mirror in dev mode, which will be useful in the future ;) Thank you!

      posted in Troubleshooting
      C
      CyanKali
    • RE: Is there a way to show specific compliments on specific dates?

      @romain I live in Germany, at the time I posted it was already the 27th here :) It still does not work, even though now it is the 27th pretty much everywhere in the world. Do you have any idea what might be the reason when you look at the code I posted?

      posted in Troubleshooting
      C
      CyanKali
    • RE: Is there a way to show specific compliments on specific dates?

      @pauabaer

      as you can see I don´t know much about coding, but have you tried just deleting all the default compliments and then adding the line that romain suggested?

      posted in Troubleshooting
      C
      CyanKali
    • RE: Is there a way to show specific compliments on specific dates?

      @romain said in Is there a way to show specific compliments on specific dates?:

      if (moment().format(‘MMM D’) == ‘Apr 27’)
      complimentText = “Happy birthday”

      Thank you for your help @romain !
      I tried it but it does not work.
      The config file of the compliments module now looks like this:

      // Override dom generator.
         getDom: function() {
         	var complimentText = this.randomCompliment();
      			if (moment().format('MMM D') == 'Apr 27')
         			 complimentText = "Happy birthday"
         	var compliment = document.createTextNode(complimentText);
         	var wrapper = document.createElement("div");
         	wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright";
         	wrapper.appendChild(compliment);
      
         	return wrapper;
      

      But the mirror shows only the normal compliments.

      Does this code add the birthday message to the normal compliments or does it replace them so that only happy birthday is shown on this day? If it is added, maybe I just need to wait longer until it is shown at random?

      I think I kind of understood what you explained in the last part, but I would not know how to do this, sorry. I think you described how I would be able to add dates in the config file of the mirror instead of the config of the compliments module, didn´t you? I would like to do this, would you mind explaining it a little more detailed?

      Thank you for your help!

      posted in Troubleshooting
      C
      CyanKali
    • Is there a way to show specific compliments on specific dates?

      Hi,

      sorry if this is the wrong category for my question but the other categories don´t seem to fit either.

      I want to show messages on specific dates, like “Happy Birthday!” on my birthday. Those messages shall be shown just like regular compliments and in addition to the compliments. Is there an addon for the compliments module to achieve this?

      posted in Troubleshooting
      C
      CyanKali
    • RE: Scheduled restart for MM or module

      Sorry for the late reply. I updated to the new MM release and it broke everything. But now I fixed it and was able to test again.

      I see the new content every time its refreshing, so it works!
      Thank you so much for your help!

      posted in Troubleshooting
      C
      CyanKali
    • RE: Scheduled restart for MM or module

      Hi straawberry, thank you for your help!
      So, my js file now looks like this:

      	getDom: function() {
      		var iframe = document.createElement("IFRAME");
      		iframe.style = "border:0"
      		iframe.width = this.config.width;
      		iframe.height = this.config.height;
      		iframe.scrolling = this.config.scrolling;
      		iframe.src =  this.config.url;
                      iframe.setAttribute("timestamp", new Date().getTime());
      		iframe.id = this.config.id;
      		return iframe;
      

      is that right?

      And my congif.js now looks like this:

      	{
      	module: 'MMM-iFrameReload',
      	position: 'bottom_right', // This can be any of the regions.
      		config: {
      		// See 'Configuration options' for more information.
      		url: "http://MY_URL",
      		width: "80%", // Optional. Default: 400px
      		height: "400px", // Optional. Default: 800px
      		scrolling:"no",
      		refreshInterval: 60, //Optional. Default: 3600 = 1 hour
      		animationSpeed: 4000,
      		}
      	},
      

      Is that right?

      The stream is working right now, but I don´t see any refresh animation. I will have to wait until tomorrow to see if it reloads because most of the times it takes some hours for the stream to freeze.

      posted in Troubleshooting
      C
      CyanKali
    • RE: Scheduled restart for MM or module

      Unfortunately no. I am still looking for a solution. And I´m still hoping somebody might help with this issue.

      posted in Troubleshooting
      C
      CyanKali
    • Facebook birthdays not loading anymore

      My default calendar module imports facebook birthdays and a few days ago it just stopped working without me changing anything. It just says “no entries”. After that I changed the url so that it would show upcoming events instead of birthdays. This still works, events are shown. But birthdays still don´t.

      Does anybody else have this problem? What can I do to fix this?

      posted in Troubleshooting
      C
      CyanKali
    • RE: Scheduled restart for MM or module

      …me again. Unfortunately, iframe reload did not work. There seems to be an known issue with refreshing pages but I tried the suggested fixes and nothing worked:
      https://github.com/TheBogueRat/MMM-iFrameReload/issues/2?_pjax=%23js-repo-pjax-container

      The author of the module does not answer me, maybe I can get some help here? When you click on the link you see my post where I describe what I already tried.

      posted in Troubleshooting
      C
      CyanKali
    • RE: Scheduled restart for MM or module

      Thank you so much, that was exactly what I was looking for!
      I can’t believe I did not find it with by searching, I thought I checked all the modules and forums…

      Someone added the possibility to get rid of the scrolling bars in the iframe module. I just copied the code from the iframe module and it works in the iframe reload module, too.

      I don´t want to take credit for it since I just copied it, but if it helps someone else, here is what I did:
      I added “iframe.scrolling = this.config.scrolling;” in the module file, there:

      // Override dom generator.
      getDom: function() {
      var iframe = document.createElement(“IFRAME”);
      iframe.style = “border:0”
      iframe.width = this.config.width;
      iframe.height = this.config.height;
      iframe.scrolling = this.config.scrolling;
      iframe.src = this.config.url;
      return iframe;
      },

      After that, you can set “scrolling:“no”,” in the within the module in the config file.

      Thanks again!

      posted in Troubleshooting
      C
      CyanKali
    • Scheduled restart for MM or module

      Hi,

      I´m in the middle of building my first MM and know next to nothing about coding. Thanks to Google I came very far, but now I´m stuck.

      Here is my problem: I want to show the stream of my foscam camera to my mirror. I tried the module “MMM-ipCam” but i could not get it to work (it always returned “undefined object”). But I am able to see the stream in a browser via URL. So I got the iframe module and now the stream is shown on my mirror, yeah.

      But: The stream freezes after a few hours. Sometimes it runs for a day and a half, sometimes for only 10 hours. After restarting the mirror, all is fine again.

      This is what I already tried:

      • I copied the “update interval” section from the compliments module and inserted it in the iframe module. I thought this would fetch the stream every few minutes and solve the problem. I don’t even now if I did it right, but it did not help.

      • I looked up cron jobs and thought maybe I could start and stop the mirror every six hours. But since I know nothing about it and I did not find the right command to quit the mirror (I know start is npm start, but what would I say to quit…?) I gave up.

      Can you help me with a few lines of code that I can insert into the module or for restarting the mirror?

      posted in Troubleshooting
      C
      CyanKali
    • 1 / 1