• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Way to display/refresh an image URL?

Scheduled Pinned Locked Moved Unsolved Troubleshooting
9 Posts 3 Posters 5.6k 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.
  • F Offline
    fjnorb
    last edited by Jan 23, 2017, 2:39 AM

    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
    • B Offline
      broberg Project Sponsor
      last edited by Jan 23, 2017, 9:58 AM

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

      [card:paphko/mmm-weatherchart]

      F 1 Reply Last reply Jan 23, 2017, 5:03 PM Reply Quote 0
      • L Offline
        lolobyte
        last edited by yawns Jan 23, 2017, 5:28 PM Jan 23, 2017, 10:13 AM

        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 Offline
          fjnorb
          last edited by Jan 23, 2017, 4:57 PM

          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 Offline
            fjnorb @broberg
            last edited by Jan 23, 2017, 5:03 PM

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

            B L 2 Replies Last reply Jan 23, 2017, 5:35 PM Reply Quote 0
            • B Offline
              broberg Project Sponsor @fjnorb
              last edited by Jan 23, 2017, 5:35 PM

              @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
              • L Offline
                lolobyte @fjnorb
                last edited by Jan 23, 2017, 7:17 PM

                @fjnorb

                than you must hack a bit the module

                1 Reply Last reply Reply Quote 0
                • F Offline
                  fjnorb
                  last edited by Jan 23, 2017, 8:00 PM

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

                  L 1 Reply Last reply Jan 23, 2017, 8:14 PM Reply Quote 0
                  • L Offline
                    lolobyte @fjnorb
                    last edited by Jopyth Jan 24, 2017, 1:45 PM Jan 23, 2017, 8:14 PM

                    @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
                    1 / 1
                    • First post
                      1/9
                      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