Read the statement by Michael Teeuw here.
Way to display/refresh an image URL?
-
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?
-
Yes, look at the module mmm-weatherchart, it does exactly that
[card:paphko/mmm-weatherchart]
-
This will help you!
Install the “MMM-Globe” from
https://github.com/LukeSkywalker92/MMM-Globeand 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 } },
-
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.
-
@broberg mmm-weatherchart shows a chart, not a radar image.
-
@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.
-
than you must hack a bit the module
-
Why would I ask if a module is available if I had the skill to hack them?
-
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.jsgetDom: 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!