MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED [MMM-iFrameReload]: iFrame won't refresh

    Troubleshooting
    2
    3
    2875
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • binderth
      binderth last edited by binderth

      After I managed to load the iFrame at all (see https://forum.magicmirror.builders/topic/2637/mmm-iframereload-iframe-won-t-load), the iFrame (in my case the present snapshot picture of a webcam) is loaded, but not refreshed.
      I made a pull request to update the readme of https://github.com/TheBogueRat/MMM-iFrameReload, see https://github.com/TheBogueRat/MMM-iFrameReload/pull/5 , so my config.js looks like this:

      		{
      		module: 'MMM-iFrameReload',
      		position: 'top_left',	// This can be any of the regions.
      		config: {
      			// See 'Configuration options' for more information.
      				url: 'http://192.168.178.xx:xx/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=USER&pwd=PASS',
      				width: '640px', // Optional. Default: 100%
      				height: '360px', //Optional. Default: 100px
      				refreshInterval: 10  //Optional. Default: 3600 = 1 hour
      			}
      		},
      

      with this, the iframe is loaded, but not refreshed after 10 seconds, I do get the following every 10 seconds in the console - so I guess principially it works?:

      attempting to update dom for iFrameReload  MMM-iFrameReload.js:52:3
      /"this/" module is: [object Object]  MMM-iFrameReload.js:53:3
      attempting to update dom for iFrameReload  MMM-iFrameReload.js:52:3
      /"this/" module is: [object Object]  MMM-iFrameReload.js:53:3
      

      what I did also is changing the last Attribute:

      				refreshInterval: '10'  //Optional. Default: 3600 = 1 hour
      

      removed and added the ’ around the 10 and added a comma at the end of the line. still the same: iframe gets loaded, but not refreshed.

      binderth 1 Reply Last reply Reply Quote 0
      • binderth
        binderth @binderth last edited by

        @binderth
        I want to solve! 😉
        see on github: https://github.com/TheBogueRat/MMM-iFrameReload/issues/2

        I also changed the “MMM-iFrameReload.js”: line 32:

        		iframe.src =  this.config.url + '&' + new Date().getTime();
        

        this way, the URL is different everytime - perhaps it is some kind of caching issue.?

        D 1 Reply Last reply Reply Quote 1
        • D
          daikaiju @binderth last edited by

          @binderth Can confirm this works!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy