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.7k 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.
    • brobergB Offline
      broberg Project Sponsor
      last edited by

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

      [card:paphko/mmm-weatherchart]

      F 1 Reply Last reply Reply Quote 0
      • lolobyteL Offline
        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 Offline
          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 Offline
            fjnorb @broberg
            last edited by

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

            brobergB lolobyteL 2 Replies Last reply Reply Quote 0
            • brobergB Offline
              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
              • lolobyteL Offline
                lolobyte @fjnorb
                last edited by

                @fjnorb

                than you must hack a bit the module

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

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

                  lolobyteL 1 Reply Last reply Reply Quote 0
                  • lolobyteL Offline
                    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 Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy