<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Need help for a module who give advice because of the weather]]></title><description><![CDATA[<p dir="auto">So I’m building a magic mirror and I am trying to create my first module which could give advice to people according to the weather, but It’s my first time coding and I don’t understand how to collect the weather data from OpenCallWeather API and use it in my code. And I also don’t understand how to create a module from the start, I looked the MMM-Template but I don’t understand where I need to put my code.</p>
<p dir="auto">Thank you in advance for the time you’ll give me</p>
]]></description><link>https://forum.magicmirror.builders/topic/19593/need-help-for-a-module-who-give-advice-because-of-the-weather</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 17:03:27 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19593.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Apr 2025 13:32:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Need help for a module who give advice because of the weather on Sun, 06 Apr 2025 14:10:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xx_codeur_xx" aria-label="Profile: Xx_Codeur_xX">@<bdi>Xx_Codeur_xX</bdi></a> You could have a look at some of the modules that already does this. They get the weather from the default weather module, no need to redo this as it is already available.</p>
<p dir="auto">See either of the below.<br />
<a href="https://github.com/fruestueck/MMM-WeatherDependentClothes" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/fruestueck/MMM-WeatherDependentClothes</a><br />
or<br />
<a href="https://github.com/Lavve/MMM-WeatherOutfit/tree/main" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Lavve/MMM-WeatherOutfit/tree/main</a></p>
]]></description><link>https://forum.magicmirror.builders/post/125646</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/125646</guid><dc:creator><![CDATA[mumblebaj]]></dc:creator><pubDate>Sun, 06 Apr 2025 14:10:48 GMT</pubDate></item><item><title><![CDATA[Reply to Need help for a module who give advice because of the weather on Sun, 06 Apr 2025 13:46:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xx_codeur_xx" aria-label="Profile: Xx_Codeur_xX">@<bdi>Xx_Codeur_xX</bdi></a> one way to develop is to create a standalone web page, xxx.html and use the browser to view that</p>
<p dir="auto">this gets all your css and script dependencies worked out</p>
<p dir="auto">then you take the smallest section of the body that makes  your content visible (div, table, canvas…)</p>
<p dir="auto">and make document. crreateElement(type) js api calls to create each</p>
<p dir="auto">because you so that do much, in one of my modules i created a little function</p>
<pre><code class="language-js">createEl : function (type, id, className, parent, value) {
		var el= document.createElement(type)
		if(id)
			el.id = id
		if(className)
			el.className = className
		if(parent)
			parent.appendChild(el)
		if(value) {
			var e = document.createTextNode(value)
			el.appendChild(e)
		}
		return el
	},
</code></pre>
<p dir="auto">which lets you do all the things at once create it fill in class names, attach to parent (building the tree of elements), set a value</p>
<p dir="auto">see the bottom of my birthday list module for how i used it</p>
<p dir="auto"><a href="https://github.com/sdetweil/birthdaylist/blob/master/birthdaylist.js" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/birthdaylist/blob/master/birthdaylist.js</a></p>
]]></description><link>https://forum.magicmirror.builders/post/125643</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/125643</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 06 Apr 2025 13:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to Need help for a module who give advice because of the weather on Fri, 04 Apr 2025 22:21:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xx_codeur_xx" aria-label="Profile: Xx_Codeur_xX">@<bdi>Xx_Codeur_xX</bdi></a></p>
<p dir="auto">use my sample module<br />
<a href="https://github.com/sdetweil/SampleModule" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/SampleModule</a></p>
<p dir="auto">and see the documentation on creating modules<br />
<a href="https://docs.magicmirror.builders/development/introduction.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.magicmirror.builders/development/introduction.html</a></p>
<p dir="auto">there are lots of modules that use the openweather api,<br />
including the default weather module. you can examine those for the specifics</p>
<p dir="auto">a module creates a small section of web content. typically part of the body section of a web page</p>
<p dir="auto">MagicMirror will call the function getDom() to get this content<br />
if you want to update the content at a later time, you inform MagicMirror by calling updateDom(), and MagicMirror will call again at getDom()</p>
<p dir="auto">everything else in the module is about getting the info needed to supply getDom() with the info it needs</p>
<p dir="auto">a web browser (electron, chrome, firefox, edge…) cannot read files directly or access hardware, for security reasons.<br />
so MagicMirror provides support for a helper (node_helper.js) that runs outside the browser, and functions to send a message to it and receive a response<br />
the helper is optional</p>
<p dir="auto">the latest browsers have built in fetch() so that one can request data from other web sites directly without needing the helper</p>
]]></description><link>https://forum.magicmirror.builders/post/125598</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/125598</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 04 Apr 2025 22:21:04 GMT</pubDate></item></channel></rss>