eouia / MMM-CalendarExt

Calendar views for MagicMirror
MIT License
57 stars 18 forks source link

MMM-CalendarExt not showing on MM until access it from a web browser #54

Closed hco125 closed 5 years ago

hco125 commented 5 years ago

Bug Description: The calendar does not show up on the MagicMirror until I point a browser to the MagicMirror and refresh the page once or twice. Only then does the calendar "magically" appear. This happens every time I reboot the Pi OR restart MagicMirror.

I have modified the css file to display the calendar as I want it to, so if you require my modified css file to figure this out, please reply with an email address I can send the file to.

Screenshots Display on MagicMirror BEFORE going to http://192.168.x.x:8080 on web browser from another device, it looks like this for days until I go to a web browser: nocalendar

Display on MagicMirror AFTER going to http://192.168.x.x:8080 on web browser from another device: calendar

Other Info: -Node Version: 10.15.0 -MagicMirror Version: 2.5.0

MMM-CalendarExt config:

        {
            module: 'MMM-CalendarExt',
            position: 'lower_third',
            config: {
                system: {
                    show: ['month'],
                    locale: 'en',
                    showEmptyView: 1,
                    fullDayEventLocalize: 0,
                    redrawInterval: 1 * 60 * 1000,
                    useProfileConfig: 0,
                    startProfile: '',
                },
                defaultView: {
                    position: 'lower_third',
                    positionOrder: 1,
                    overflowRolling: 1,
                    overflowHeight: 50,
                    overflowDuration: 3,
                    onlyStartingTime: 0,
                    timeFormat: 'h:mm a',
                    dateFormat: 'ddd, M/D',
                    fullDayEventDateFormat: 'ddd, M/D',
                    ellipsis: 0,
                    limit: 0,
                    oneLineEvent: 1,
                    replaceTitle: '',
                    classPattern: '',
                    classPatternWhere: '',
                    symbolPattern: '',
                    symbolPatternWhere: '',
                },
                views: {
                    month: {
                        showWeeks: 0,
                        weeksTitle: 'Weeks',
                        weeksFormat: 'wo',
                        weekdayFormat: 'dddd',
                        titleFormat: 'D',
                        overTitleFormat: 'MMM D',
                        monthTitleFormat: 'MMMM YYYY',
                    },
                },
                defaultCalendar: {
                    profiles: [],
                    views: [],
                    symbol: '',
                    styleName: 'styleBW',
                    replaceTitle: [],
                    classPattern: [],
                    classPatternWhere: ['title'],
                    symbolPattern: [],
                    symbolPatternWhere: ['title'],
                    maxEntries: 50,
                    maxDays: 180,
                    interval: 300000,
                },
                calendars: [
                    {
                        name: 'Holly',
                        url: 'url hidden for privacy',
                        profile: ['holly'],
                        symbol: 'atom@md',
                        //styleName: 'styleHolly',
                    },
                    {
                        name: 'Sunday',
                        url: 'url hidden for privacy',
                        profile: ['sunday'],
                        symbol: 'pistol@md',
                        //styleName: 'styleSunday',
                    },
                    {
                        name: 'Cameron',
                        url: 'url hidden for privacy',
                        profile: ['cameron'],
                        symbol: 'football@md',
                        //styleName: 'styleCameron',
                    },
                    {
                        name: 'Mayan',
                        url: 'url hidden for privacy',
                        profile: ['mayan'],
                        symbol: 'peace@md',
                        //styleName: 'styleMayan',
                    },
                    {
                        name: 'Charline',
                        url: 'url hidden for privacy',
                        profile: ['charline'],
                        symbol: 'cat@md',
                        //styleName: 'styleCharline',
                    },
                    {
                        name: 'Cassiel',
                        url: 'url hidden for privacy',
                        profile: ['cassiel'],
                        symbol: 'tractor@md',
                        //styleName: 'styleCassiel',
                    },
                    {
                        name: 'Bills Due',
                        url: 'url hidden for privacy',
                        profile: ['bills'],
                        symbol: 'currency-usd@md',
                        //styleName: 'styleBills',
                    },
                    {
                        name: 'Roger',
                        url: 'url hidden for privacy',
                        profile: ['Roger'],
                        symbol: 'crosshairs@fa',
                        //styleName: 'styleRoger',
                    },
                    {
                        name: 'Nancy',
                        url: 'url hidden for privacy',
                        profile: ['Nancy'],
                        symbol: 'christianity-outline@md',
                        //styleName: 'styleNancy',
                    },
                    {
                        name: 'Holidays',
                        url: 'url hidden for privacy',
                        profile: [''],
                        symbol: 'pine-tree@md',
                    },
                    {
                        name: 'Birthdays & Anniversaries',
                        url: 'url hidden for privacy',
                        profile: [''],
                        symbol: 'cake-variant@md',
                    },
                ],
            },
        },
eouia commented 5 years ago

Are you using any page/profile related module with this?

hco125 commented 5 years ago

I am using MMM-pages

On Thu, Jan 31, 2019, 6:14 PM Seongnoh Sean Yi <notifications@github.com wrote:

If you are using any page/profile related module with this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eouia/MMM-CalendarExt/issues/54#issuecomment-459556806, or mute the thread https://github.com/notifications/unsubscribe-auth/ArTsmSl0qxtlyCV-GDUzHcqn5FJBmFMQks5vI4aagaJpZM4adXON .

eouia commented 5 years ago

For some reason to measure dimension of area to draw calendar, It might not be drawn during the hiding, So it will be redrawn in next refreshInterval after being revealed. To avoid this, set refreshInterval shorter, or put this module on first page(on start) and hide it after first drawing.

hco125 commented 5 years ago

@eouia Your suggestions fixed the problem.

The steps I took:

  1. MMM-pages config:
    • "rotationTime": set to 7 seconds
    • page with MMM-CalendarExt module was placed as the first page on the list of pages
  2. MMM-CalendarExt config options, changed the following two options:
    • "redrawInterval" (under "system"): set to 6 seconds
    • "interval" (under "defaultCalendar"): set to 6 seconds

The MMM-CalendarExt module now displays after a brief delay without having to refresh the MagicMirror several times from a web browser.

Thanks @eouia! You hit the nail on the head!

eouia commented 5 years ago

Nice to hear it. You don't need to keep interval of calendar too short. (30 min or hours enough.) Anyway, I'll close this issue. Have a nice day.

hco125 commented 5 years ago

@eouia

Which MMM-CalendarExt setting will allow close to instant updating of the MagicMirror display when I add an event to one of my google calendars (which I have added to the module)?

eouia commented 5 years ago

For instant updating from your original calendar changing, interval of calendar is right. But 6 seconds is too short I think. How about 10 minute? Is it REALLY important to update calendars immediately?

hco125 commented 5 years ago

Yes, 10+ minutes is a good setting for this. I asked the question to understand the difference between redrawInterval and interval options.

itsj4y commented 5 years ago

Could I get the modified css file itsj4y@yahoo.com

NelsonSanto commented 4 years ago

can you send css to me nelsonespirito santo@hotmail.com