Navigation

    MagicMirror Forum

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

    UNSOLVED Way to display/refresh an image URL?

    Troubleshooting
    3
    9
    4368
    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.
    • F
      fjnorb last edited by

      Say I wanted to have a local weather radar displayed on my mirror. I have a direct URL to a .gif that is updated in place periodically. (Example: http://images.intellicast.com/WxImages/Radar/bgm.gif). Is MM able to grab that image from that URL, display it, and refresh it from that URL periodically?

      1 Reply Last reply Reply Quote 0
      • broberg
        broberg Project Sponsor last edited by

        Yes, look at the module mmm-weatherchart, it does exactly that

        F 1 Reply Last reply Reply Quote 0
        • lolobyte
          lolobyte last edited by yawns

          This will help you!

          Install the “MMM-Globe” from
          https://github.com/LukeSkywalker92/MMM-Globe

          and insert at “ownImagePath” your own URL.

          Good luck.

          {
              module: 'MMM-Globe',
              position: 'center',
              config: {
                  style: 'geoColor',
                  imageSize: 600,
                  ownImagePath: ''http://images.intellicast.com/WxImages/Radar/bgm.gif",
                  updateInterval: 10*60*1000
              }
          },
          
          1 Reply Last reply Reply Quote 0
          • F
            fjnorb last edited by

            Thank you. Of the two suggetsions, MMM-Globe (which I never would have thought to use) is the only one that will let me use a custom radar image, however it seems that the Globe module only allows you to use completely square images, and distorts them to exactly square if you don’t. The example image I provided was 768x496, for instance, and there is only one “imageSize” option, and in the code it is used to set both width and height. For a globe picture that’s fine, but not for this.

            1 Reply Last reply Reply Quote 0
            • F
              fjnorb @broberg last edited by

              @broberg mmm-weatherchart shows a chart, not a radar image.

              broberg lolobyte 2 Replies Last reply Reply Quote 0
              • broberg
                broberg Project Sponsor @fjnorb last edited by

                @fjnorb yes, but in the .js file you can alter the line

                var src = "http://www.yr.no/place/" + this.config.country +, "/" + this.config.area + "/" + this.config.city + "/meteogram.png?" + new Date().getTime();
                
                

                to

                var src = "http://images.intellicast.com/WxImages/Radar/bgm.gif";
                

                But that is altering the module and you still would have to change the width and height further down in the same .js file.

                the globe module is the easier route and you should be able to just change the css to render another image size.

                1 Reply Last reply Reply Quote 0
                • lolobyte
                  lolobyte @fjnorb last edited by

                  @fjnorb

                  than you must hack a bit the module

                  1 Reply Last reply Reply Quote 0
                  • F
                    fjnorb last edited by

                    Why would I ask if a module is available if I had the skill to hack them?

                    lolobyte 1 Reply Last reply Reply Quote 0
                    • lolobyte
                      lolobyte @fjnorb last edited by Jopyth

                      @fjnorb

                      then make a pull request to the developer with your wish to implement a argument to define x and y with of the picture limitation.

                      take a look at this post:

                      https://forum.magicmirror.builders/topic/986/mmm-globe/25

                      ask @SvenSommer , maybe he can help you at firt before the pull request is done.

                      Hey guys,
                      I was able to cut the white bar by cutting the last pixels (depending on the image size) from this image with adding the following to MMM-Globe.js

                      getDom: function () {
                          var wrapper = document.createElement("div");
                          if (this.config.style == "europeDiscNat") {
                      	wrapper.style.height = 0.98 * this.config.imageSize - 1 + "px";
                      	wrapper.style.overflow = "hidden";
                          }
                      
                          var image = document.createElement("img");
                      

                      Note from admin: Please use Markdown on code snippets for easier reading!

                      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