[Solved] When weather updates module unhides...



  • Hi all,
    I’m currently building a MM2 (2.1.0). For the moment I’m trying to find out why the weather (both current and forecast) shows up when updating.

    This is the scenario:
    I have usually the “local” weather (both current and forecast) shown. Then when my user logs in (using face recognition) then the local weather (both current and forecast) gets hidden and the weather (both current and forecast) from another location should be shown. Then when my user logs out, the local weather (both current and forecast) should be shown again and the “other” (both current and forecast) should be hidden.

    What I managed so far:
    When I start MM2, both weather locations (local and other and both current and forecast)) are shown. Then when the user logs in the local gets hidden and the “other” gets shown (stays shown). When the user logs out the local one get shown and the “other” hides. All good, I could live with the startup problem. :)
    Now, when the weather updates, everything (local and other, both current and forecast) are shown again and stays that way until a user logs in and out again.

    So, my config:
    First in the config is the Face recognition part(s):

    	{
    		module: "MMM-Facial-Recognition",
    		position: "top_bar",
    		header: "",
    		config: {
    			users: [
    				"Snille",
    				"Louise",
    				"Martin"
    			],
    			trainingFile: "modules/MMM-Facial-Recognition-Tools/facetrainer/training.xml",
    			logoutDelay: 30,
    			interval: 1
    		}
    	},
    

    And then further down the weather part(s)

    	{
    		module: "currentweather",
    		position: "top_right",
    		classes: "snille",
    		header: "",
    		config: {
    			location: "Arlanda",
    			locationID: "2679300",
    			appid: "b78a1a22ab05beb1fd30b2bf6013db64",
    			iconTable: {
    				"01d": "wi-day-sunny",
    				"02d": "wi-day-cloudy",
    				"03d": "wi-cloudy",
    				"04d": "wi-cloudy-windy",
    				"09d": "wi-showers",
    				"10d": "wi-rain",
    				"11d": "wi-thunderstorm",
    				"13d": "wi-snow",
    				"50d": "wi-fog",
    				"01n": "wi-night-clear",
    				"02n": "wi-night-cloudy",
    				"03n": "wi-night-cloudy",
    				"04n": "wi-night-cloudy",
    				"09n": "wi-night-showers",
    				"10n": "wi-night-rain",
    				"11n": "wi-night-thunderstorm",
    				"13n": "wi-night-snow",
    				"50n": "wi-night-alt-cloudy-windy"
    			},
    			showPeriodUpper: true,
    			showHumidity: true
    		}
    	},
    	{
    		module: "weatherforecast",
    		position: "top_right",
    		classes: "snille",
    		header: "Väder i",
    		config: {
    			location: "Arlanda",
    			locationID: "2679300",
    			appid: "b78a1a22ab05beb1fd30b2bf6013db64",
    			iconTable: {
    				"01d": "wi-day-sunny",
    				"02d": "wi-day-cloudy",
    				"03d": "wi-cloudy",
    				"04d": "wi-cloudy-windy",
    				"09d": "wi-showers",
    				"10d": "wi-rain",
    				"11d": "wi-thunderstorm",
    				"13d": "wi-snow",
    				"50d": "wi-fog",
    				"01n": "wi-night-clear",
    				"02n": "wi-night-cloudy",
    				"03n": "wi-night-cloudy",
    				"04n": "wi-night-cloudy",
    				"09n": "wi-night-showers",
    				"10n": "wi-night-rain",
    				"11n": "wi-night-thunderstorm",
    				"13n": "wi-night-snow",
    				"50n": "wi-night-alt-cloudy-windy"
    			},
    			showRainAmount: true
    		}
    	},
    	{
    		module: "currentweather",
    		position: "top_right",
    		classes: "default",
    		header: "",
    		config: {
    			location: "Åstorp",
    			locationID: "2724435",
    			appid: "b78a1a22ab05beb1fd30b2bf6013db64",
    			iconTable: {
    				"01d": "wi-day-sunny",
    				"02d": "wi-day-cloudy",
    				"03d": "wi-cloudy",
    				"04d": "wi-cloudy-windy",
    				"09d": "wi-showers",
    				"10d": "wi-rain",
    				"11d": "wi-thunderstorm",
    				"13d": "wi-snow",
    				"50d": "wi-fog",
    				"01n": "wi-night-clear",
    				"02n": "wi-night-cloudy",
    				"03n": "wi-night-cloudy",
    				"04n": "wi-night-cloudy",
    				"09n": "wi-night-showers",
    				"10n": "wi-night-rain",
    				"11n": "wi-night-thunderstorm",
    				"13n": "wi-night-snow",
    				"50n": "wi-night-alt-cloudy-windy"
    			},
    			showPeriodUpper: true,
    			showHumidity: true
    		}
    	},
    	{
    		module: "weatherforecast",
    		position: "top_right",
    		classes: "default",
    		header: "Väder i",
    		config: {
    			location: "Åstorp",
    			locationID: "2724435",
    			appid: "b78a1a22ab05beb1fd30b2bf6013db64",
    			iconTable: {
    				"01d": "wi-day-sunny",
    				"02d": "wi-day-cloudy",
    				"03d": "wi-cloudy",
    				"04d": "wi-cloudy-windy",
    				"09d": "wi-showers",
    				"10d": "wi-rain",
    				"11d": "wi-thunderstorm",
    				"13d": "wi-snow",
    				"50d": "wi-fog",
    				"01n": "wi-night-clear",
    				"02n": "wi-night-cloudy",
    				"03n": "wi-night-cloudy",
    				"04n": "wi-night-cloudy",
    				"09n": "wi-night-showers",
    				"10n": "wi-night-rain",
    				"11n": "wi-night-thunderstorm",
    				"13n": "wi-night-snow",
    				"50n": "wi-night-alt-cloudy-windy"
    			},
    			showRainAmount: true
    		}
    	},
    

    The rest of the modules get hidden and shown correctly as expected (MMM-SystemStats, MMM-bitcoin, calendar, compliments, newsfeeds (2), MMM-Mail, MMM-NetworkScanner and MMM-fitbit).

    It’s just the weather that gives “problems”. :)
    Anyone have any ideas?

    Best regards Erik



  • This is solved. It was actually the Profile-Switcher that created the problem. :)



  • @Snille Can you please explain this more precisely. I have a similar problem with MMM-Instagram.
    Best regards Ralf



  • @Ralf Ok, this was (infact still is) my case:

    1. I have setup “profiles” showing different modules using MMM-ProfileSwitcher (triggerd by either MMM-Facial-Recognition, MMM-TouchNavigation or MMM-ModuleScheduler).
    2. When a “profile” is activated only the modules in that profile is suppose to be shown.

    For the moment the default “currentweather” and “weatherforecast” is set to show in only one of my defined profiles. However, when a profile that do not have (any one of) those modules is activated, the weather modules are hidden until they “update”, then they show them self even if the profile currently selected should not show them.

    Then I started to “lock” modules with the ProfileSwitcher and that solved the “popup-on-update-problem”, but that resulted in modules not showing up when triggered by ModulesScheduler instead. So I disabled locking again.

    Update: Forgot that I also have disabled the “schedule” for switching profiles. The reason being that if I have specified a profile to be shown at a specific time frame, I can not use the TouchNavigation to switch to another profile at any time because all the modules are locked by the Scheduler…

    So, for the moment, I still have the problem. However it’s only those two modules behaving this way so far. :)


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.