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.

    Does anyone know how to make the iFrame module refresh periodically?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    28 Posts 6 Posters 23.5k Views 6 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer @cnelso24
      last edited by

      @cnelso24 the problem is probably that there isnt a change detected when updating the dom, try to add a timestamp attribute to the iframe.

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • K Offline
        kevsfastz @cnelso24
        last edited by

        @cnelso24

        I have found a fix for this module which I posted here:

        https://github.com/TheBogueRat/MMM-iFrameReload/issues/2

        Kev

        C 2 Replies Last reply Reply Quote 1
        • C Offline
          cnelso24 @kevsfastz
          last edited by

          @kevsfastz

          Thank you!! I will check it out when I get home.

          1 Reply Last reply Reply Quote 0
          • C Offline
            cnelso24 @kevsfastz
            last edited by

            @kevsfastz

            Just got a chance to try this. Works like a charm! Thank you!

            1 Reply Last reply Reply Quote 0
            • foxF Offline
              fox
              last edited by

              @kevsfastz is it possible to show simple html content and update periodically?

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kevsfastz @fox
                last edited by

                @fox
                The simple answer is yes it is possible. What is your goal specifically?

                foxF 1 Reply Last reply Reply Quote 0
                • Mitch1138M Offline
                  Mitch1138
                  last edited by

                  Many thanks, I have bee looking for a way to do this for some time. I loaded iFrameReload with the following url. It will load, but not update. Any suggestions as to what I am missing?

                  url: “http://tides.tidegraph.com/api/tidegraph.php?bg=black&scale=.8&station=Old Frenchtown Wharf, Elk River, Maryland”,

                  Many thanks

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kevsfastz @Mitch1138
                    last edited by

                    @Mitch1138

                    As mentioned above, I have provided a fix or adjustment by adjusting the MMM-IframeReload.js below:

                    https://github.com/TheBogueRat/MMM-iFrameReload/issues/2

                    1 Reply Last reply Reply Quote 0
                    • Mitch1138M Offline
                      Mitch1138
                      last edited by

                      My mistake, I thought this was updated in the .git. I added the timestamp as you suggested (iframe.src = this.config.url + new Date().getTime();). The url does update now, but since the url displays the tides at a location embedded in the url, it looks like the timestamp is appended to the location. With this added, it is not a valid location and the tides don’t display.

                      Again, many thanks for your help.

                      K 1 Reply Last reply Reply Quote 0
                      • K Offline
                        kevsfastz @Mitch1138
                        last edited by kevsfastz

                        @Mitch1138

                        I see what you mean with the URL, any variables you add at the end even a ? will result in displaying all zeros on the output. You can get around this by using a site such asTHIS to refresh this URL for you instead of using iFrame to call a refresh. Of course all these sites will have advertisments which you do not want displayed on your mirror… so what you COULD do is reposition the iframe so the advertisment is hidden in one of the top corners. For example you can add margins with negative values to the iframe style:

                        iframe.style = “border:0;margin-bottom:-110px;margin-left:-10px;;width:500px;height:450px;filter:invert(100%);”

                        Of course this is not the best nor the most clean solution… maybe someone else has some ideas?

                        1 Reply Last reply Reply Quote 0
                        • foxF Offline
                          fox @kevsfastz
                          last edited by fox

                          @kevsfastz said in Does anyone know how to make the iFrame module refresh periodically?:

                          @fox
                          The simple answer is yes it is possible. What is your goal specifically?

                          I have another raspberry who gets temperatures with one-wire-sensors.
                          This i provide in a simple homepage:

                              <div>
                                <div>
                              <h2>...</h2>
                          	<p><b>Temperaturen:</b></p>
                              <p>Luft:............ -3.5°</p>
                          	<p>Dach:........... -2.5°</p>
                          	<p>Pool: ............3.5°</p>
                          	<p><b>Status: </b></p>
                          	<p>Pumpe:........... <b>Aus</b></p>
                              <p>Solarheizung:...<b>Aus</b></p>
                              <br />
                          	<p><b>Meta: </b></p>
                              <p>System:...........Linux 4.1.19+ armv6l</p>
                          	<p>CPU Temp:....14.260°</p>
                          	<p>Sensors...........3 x DS18B20 @ 5V </p>
                              <p>Last Update:......Mon 13-02-2017, 19:40:05 Uhr</p>
                          	</div>
                          	<p>....</p>
                               
                              </div>
                          
                            
                          
                          

                          how to show this, or parts of it?

                          edit:(the html header will not be shown in this forum framework :walking:

                          K 1 Reply Last reply Reply Quote 0
                          • K Offline
                            kevsfastz @fox
                            last edited by

                            @fox

                            This depends on the output of your other Pi. If you already have this output displayed in say HTML format ( I assume that’s what you mean when you say simple homepage?) you can easily place this in iFrame via local URL. The best way would be to create its own page so you can control the output, then you can use CSS styles to adjust colors, size, placement etc.

                            foxF 1 Reply Last reply Reply Quote 0
                            • foxF Offline
                              fox @kevsfastz
                              last edited by

                              @kevsfastz said in Does anyone know how to make the iFrame module refresh periodically?:

                              @fox

                              This depends on the output of your other Pi. If you already have this output displayed in say HTML format ( I assume that’s what you mean when you say simple homepage?) you can easily place this in iFrame via local URL. The best way would be to create its own page so you can control the output, then you can use CSS styles to adjust colors, size, placement etc.

                              Thank you for your answer. I tried of course, but I got only a white line on the screen.

                              K 1 Reply Last reply Reply Quote 0
                              • K Offline
                                kevsfastz @fox
                                last edited by

                                @fox

                                Can you show a sample of your code? I assume the URL is working fine in a web browser?

                                foxF 1 Reply Last reply Reply Quote 0
                                • foxF Offline
                                  fox @kevsfastz
                                  last edited by fox

                                  @kevsfastz
                                  Above is a sample of the code(the weird forum framework removed the headd of the html )
                                  Yes it is working very fine in the web browser

                                  Does this help you?

                                  Thank you in advance !

                                  1 Reply Last reply Reply Quote 0
                                  • foxF Offline
                                    fox
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • foxF Offline
                                      fox
                                      last edited by fox

                                      created new thread because this one is solved with the original issue

                                      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
                                      • 2
                                      • 2 / 2
                                      • 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