Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last Item keeps being displayed even list ist is empty and hideIfEmpty=true #20

Closed
magic21nrw opened this issue Apr 22, 2020 · 3 comments

Comments

@magic21nrw
Copy link

I have a shared list as main list which I share with my wife. The list keeps updating correctly and all items are displayed. I have selected the hideIfEmpty = true in the configuration and when I (or my wife) delete(s) the last item active on the list. It keeps being displayed on the module. The module itself is still visible with the last active item on. I would have expected it to be invisible when no item is active in the shared list.

My Configuration with IDs deleted:

	  {
module: 'MMM-MicrosoftToDo',
position: 'top_left',	// This can be any of the regions. Best results in left or right regions.
header: 'To-Do-Liste', // This is optional
config: {
  oauth2ClientSecret: 'deleted',
  oauth2RefreshToken: 'deleted',
  oauth2ClientId: 'deleted',
  listId: 'deleted', // optional parameter: default value is the "Tasks" list
  showCheckbox: false, // optional parameter: default value is true and will show a checkbox before each todo list item
  hideIfEmpty: true, // optional parameter: default value is false and will show the module also when the todo list is empty
  maxWidth: 450, // optional parameter: max width in pixel, default value is 450
  itemLimit: 200 // optional parameter: limit on the number of items to show from the list, default value is 200
}

},

@thobach
Copy link
Owner

thobach commented Apr 26, 2020

I used your configuration but the issue does not replicate on my side. I also tried it with a shared list and when the last item is removed, the list disappears.

I added a log message in https://github.com/thobach/MMM-MicrosoftToDo/blob/master/MMM-MicrosoftToDo.js#L46 to display the number of items received, that could give us a hint if no more updates are received, or if the logic to hide the module does not work.

Could you please test if the issue is also present when you only display the MMM-MicrosoftToDo module? Maybe there is another module that interferes with the logic to hide the module.

@magic21nrw
Copy link
Author

magic21nrw commented Apr 27, 2020

Interesting, with the Update, I only get the message that the Plugin is waiting for the items to be received or Loading list...

It seems that it now interferes with the MMM-GoogleMapsTraffic Module which did not cause any trouble with the MMM-Wonderlist plugin:

		{
		module: 'MMM-GoogleMapsTraffic',
		position: 'bottom_right',
		config: {
			key: 'Secret',
			updateInterval: 20*60*1000, //20 Minuten
			lat: 48.15,
			lng: 11.556,
			height: '400px',
			width: '500px',
			zoom: 11.6,
			mapTypeId: "roadmap",
			styledMapType: "daniel",
			disableDefaultUI: true,
			backgroundColor: 'hsla(0, 0%, 0%, 0)',
			markers: [
				{
					lat: 11.111,
					lng: 11.111,
					fillColor: '#ff0000'
				},
				{
					lat: 11.111,
					lng: 11.111,
					fillColor: '#a1262d'
				}
			]
		}
	},

If I disable this plugin, the items are loaded properly. The log - does not show any special entries no matter if the MMM-MicrosoftToDo is installed alone or together with the other plugins.

Any Idea - maybe delaying the loading of the plugin for some seconds? The Google Plugin is data heavy - maybe retrieving the map causes some trouble?

Log entries:

[email protected] start /home/magicmirror/MagicMirror
DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

[2020-04-27 09:07:39.366] [LOG] Starting MagicMirror: v2.11.0
[2020-04-27 09:07:39.380] [LOG] Loading config ...
[2020-04-27 09:07:39.407] [LOG] Loading module helpers ...
[2020-04-27 09:07:39.413] [LOG] No helper found for module: alert.
[2020-04-27 09:07:39.541] [LOG] Initializing new module helper ...
[2020-04-27 09:07:39.543] [LOG] Module helper loaded: updatenotification
[2020-04-27 09:07:40.207] [LOG] Initializing new module helper ...
[2020-04-27 09:07:40.208] [LOG] Module helper loaded: MMM-COVID19-SPARKLINE
[2020-04-27 09:07:40.209] [LOG] No helper found for module: clock.
[2020-04-27 09:07:41.021] [LOG] Initializing new module helper ...
[2020-04-27 09:07:41.024] [LOG] Module helper loaded: MMM-MicrosoftToDo
[2020-04-27 09:07:41.025] [LOG] No helper found for module: MMM-CountDown.
[2020-04-27 09:07:41.027] [LOG] No helper found for module: weather.
[2020-04-27 09:07:41.938] [LOG] Initializing new module helper ...
[2020-04-27 09:07:41.939] [LOG] Module helper loaded: MMM-DWD-WarnWeather
[2020-04-27 09:07:42.103] [LOG] Initializing new module helper ...
[2020-04-27 09:07:42.104] [LOG] Module helper loaded: calendar
[2020-04-27 09:07:42.105] [LOG] No helper found for module: compliments.
[2020-04-27 09:07:42.178] [LOG] Initializing new module helper ...
[2020-04-27 09:07:42.180] [LOG] Module helper loaded: newsfeed
[2020-04-27 09:07:42.186] [LOG] Initializing new module helper ...
[2020-04-27 09:07:42.187] [LOG] Module helper loaded: MMM-GoogleMapsTraffic
[2020-04-27 09:07:43.052] [LOG] Initializing new module helper ...
[2020-04-27 09:07:43.053] [LOG] Module helper loaded: MMM-MyCommute
[2020-04-27 09:07:43.059] [LOG] Initializing new module helper ...
[2020-04-27 09:07:43.060] [LOG] Module helper loaded: MMM-WatchDog
[2020-04-27 09:07:43.061] [LOG] All module helpers loaded.
[2020-04-27 09:07:43.392] [LOG] Starting server on port 8080 ...
[2020-04-27 09:07:43.416] [LOG] Server started ...
[2020-04-27 09:07:43.417] [LOG] Connecting socket for: updatenotification
[2020-04-27 09:07:43.419] [LOG] Connecting socket for: MMM-COVID19-SPARKLINE
[2020-04-27 09:07:43.420] [LOG] Starting node helper for: MMM-COVID19-SPARKLINE
[2020-04-27 09:07:43.421] [LOG] Connecting socket for: MMM-MicrosoftToDo
[2020-04-27 09:07:43.422] [LOG] MMM-MicrosoftToDo helper started ...
[2020-04-27 09:07:43.423] [LOG] Connecting socket for: MMM-DWD-WarnWeather
[2020-04-27 09:07:43.424] [LOG] MMM-DWD-WarnWeather helper started...
[2020-04-27 09:07:43.428] [LOG] Connecting socket for: calendar
[2020-04-27 09:07:43.429] [LOG] Starting node helper for: calendar
[2020-04-27 09:07:43.430] [LOG] Connecting socket for: newsfeed
[2020-04-27 09:07:43.432] [LOG] Starting module: newsfeed
[2020-04-27 09:07:43.433] [LOG] Connecting socket for: MMM-GoogleMapsTraffic
[2020-04-27 09:07:43.434] [LOG] Starting node_helper for module: MMM-GoogleMapsTraffic
[2020-04-27 09:07:43.435] [LOG] Connecting socket for: MMM-MyCommute
[2020-04-27 09:07:43.436] [LOG] ====================== Starting node_helper for module [MMM-MyCommute]
[2020-04-27 09:07:43.437] [LOG] Connecting socket for: MMM-WatchDog
[2020-04-27 09:07:43.438] [LOG] Starting module helper: MMM-WatchDog
[2020-04-27 09:07:43.439] [LOG] Sockets connected & modules started ...
[2020-04-27 09:07:43.608] [LOG] Launching application.
[2020-04-27 09:07:48.230] [LOG] [COVID:CORE] Scan starts.
[2020-04-27 09:07:48.740] [LOG] Create new calendar fetcher for url: https://internal/basic.ics - Interval: 300000
[2020-04-27 09:07:48.838] [LOG] Create new calendar fetcher for url: http://i.cal.to/ical/81/bayern/ferien/cc84ab96.bc9c2853-73fb55ef.ics - Interval: 300000
[2020-04-27 09:07:48.901] [LOG] Create new news fetcher for url: http://www.tagesschau.de/xml/rss2 - Interval: 300000
[2020-04-27 09:07:49.317] [LOG] Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload: { style: 'daniel' }
[2020-04-27 09:07:49.384] [LOG] WatchDog started. Maximum timeout: 10s.
[2020-04-27 09:07:50.460] [LOG] [COVID:CORE] Access to data source.
[2020-04-27 09:07:51.090] [LOG] [COVID:CORE] Resolving: csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv
[2020-04-27 09:07:51.500] [LOG] [COVID:CORE] Resolving: csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv
[2020-04-27 09:07:51.869] [LOG] [COVID:CORE] Resolving: csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv
[2020-04-27 09:07:51.959] [LOG] can't find property recovered Canada:
[2020-04-27 09:07:51.966] [LOG] adding...
[2020-04-27 09:07:52.265] [LOG] [COVID:CORE] Calculating Wordlwide total.
[2020-04-27 09:07:52.487] [LOG] [COVID:CORE] Scan Completed.

thobach added a commit that referenced this issue May 2, 2020
…ogleMapsTraffic interferred with the console object and removed the log function.
@thobach
Copy link
Owner

thobach commented May 2, 2020

Could you please try again with the latest version of this module (in the module folder run git pull and restart the magic mirror)? I fixed the way messages/errors are logged as the MMM-GoogleMapsTraffic changed some behaviour which made the use of console.log not possible anymore (vicmora/MMM-GoogleMapsTraffic#15).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants