Read the statement by Michael Teeuw here.
MMM-Moon, See the moon phases and rise/set times!
-
https://github.com/EnderFlop/MMM-Moon
There’s an indepth README on the GitHub page for anyone interested in installing this. If there is interest I can add more configuration options for customizing the image, but right now all you do is set your location and timezone. Let me know what you think!
-
@enderflop
Okay, so i tried it out and it is working fine. Nice effort. However, You have forgotten to add the sample config.js entries, though you have given the configuration options. Is there a way to enlarge the size of the image in the configuration file?
Thanks -
@enderflop I have given this a try and all i get is the No Image! message. Any ideas?
-
@Rags said in MMM-Moon, See the moon phases and rise/set times!:
@enderflop
Okay, so i tried it out and it is working fine. Nice effort. However, You have forgotten to add the sample config.js entries, though you have given the configuration options. Is there a way to enlarge the size of the image in the configuration file?
ThanksTo add lines of code to configure the size of the image, you can modify the getDom function as follows:
getDom: function() { var outerDiv = document.createElement("div"); if (this.content) { var img = document.createElement("img"); img.src = this.content; img.style.width = this.config.width || "100%"; // add this line to set the width of the image img.style.height = this.config.height || "auto"; // add this line to set the height of the image outerDiv.appendChild(img); } else { outerDiv.innerText = "No image!"; } return outerDiv; }, add this in config.js; { module: "MMM-Moon", position: "top_right", config: { width: "400px", // as per requirement height: "400px" // as per requirement } }
code blocks please, by sdetweil
-
@enderflop further to before mentioned, I have changed my location in the js file from the standard US location you had and if I leave my location out of the config file I get an image(not sure if this a correct image or generic) but when I add my location in the config I get the no image message.
-
@Rags a much better way is to use css to set the size instead of changing the code
-
@sdetweil said in MMM-Moon, See the moon phases and rise/set times!:
@Rags a much better way is to use css to set the size instead of changing the code
Sure. Understood. Just learning.
-
@Rags its ok, we are all learning every day… i learn new MM stuff every day due to different modules and uses
-
Guys, can somebody please post sample config? Im having troubles setting it up with something else than empty config. Thanks
-
I initially put the lat/lon in quotes, but they must be integer values:
module: "MMM-Moon", //disabled: true, position: "top_right", config: { lat: 44.55555, // Latitude lon: -93.55555, // Longitude timezone: "America/Chicago" }