MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    [MMM-iFrameReload]: iFrame won't refresh

    Scheduled Pinned Locked Moved Solved Troubleshooting
    3 Posts 2 Posters 4.0k Views 2 Watching
    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.
    • binderthB Offline
      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.

      binderthB 1 Reply Last reply Reply Quote 0
      • binderthB Offline
        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 Offline
          daikaiju @binderth
          last edited by

          @binderth Can confirm this works!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy