edward-shen / MMM-pages

Add pages to your MagicMirror²!
MIT License
109 stars 29 forks source link

MMM-CalendarExt2 Page (Scene) Change Notification #56

Closed nitewing76 closed 3 years ago

nitewing76 commented 3 years ago

When running MMM-pages + MMM-CalendarExt2 and rotationHomePage ≠ 0....when the timeout occurs and MM returns to the first page, but MMM-CalendarExt2 remains on the same calendar. It seems MMM-CalendarExt2 may need the notification "changeSceneByName" with a payload of...well, I'm not sure but the code is here at line 20. "CALEXT2_SCENE_CHANGE" : { exec: (payload, sender) => { if (payload.type && payload.type == "id") { return "changeSceneById" } else if (payload.type && payload.type == "name") { return "changeSceneByName" } else { return null } },

edward-shen commented 3 years ago

Have you read the tips in the docs? Does this issue still occur after you follow that guide?

nitewing76 commented 3 years ago

Yes I found that on the forums and moving manually works fine. Idk what is different or why, but I had to use:

scenes: [ { name: "PAGE1", views:["VIEW1"], }, { name: "PAGE2", views:["VIEW2"], }, { name: "PAGE3", views:["VIEW3"], className: "fakeScene" },

Ironically, I moved on to something else and while searching for that answer, I just found the answer for this in a thread about Alexa (which I don't use)....here's the 3rd notification that solves my issue:

                    "PAGE_INCREMENT" : { 
                        exec: "sceneNext",
                    },
                    "PAGE_DECREMENT" : {
                        exec: "scenePrevious",
                    },
                    "PAGE_CHANGED" : {
                        exec: "changeSceneById",
                        payload: (payload) => {return payload}
                    }