[GA-RECIPE] MMM-Pages
-
This post is deleted! -
This post is deleted! -
@calcu Nice !
-
@ Graingallet
Have trouble with changing back to home page 0 how would i go about it here is my config file.{ module: 'MMM-pages', disabled: false, config: { modules: [["clock", "newsfeed", "compliments", "MMM-GoogleAssistant", "MMM-Detector", "MMM-Globe"], ["weather_plus", "MMM-OpenWeatherMapForecast", "MMM-HTMLSnippet"], ["MMM-CalendarExt2", 'MMM-MyWastePickup'], ["MMM-NowPlayingOnSpotify"], ["MMM-Todoist"], ["MMM-AVStock"]], fixed: ["MMM-page-indicator", "MMM-GoogleAssistant"], hiddenPages: { "admin": ["clock", "MMM-NowPlayingOnSpotify", "MMM-CalendarExt2"], "test": [] }, } },
and recipe
/** MMM-Pages **/ /** vocal control **/ /** Thanks @bugsounet **/ /** 10/06/2021 **/ var recipe = { transcriptionHooks: { "PAGE_INCREMENT": { pattern: "next page", // "next page" command: "PAGE_INCREMENT" }, "PAGE_DECREMENT": { pattern: "previous page", // "previous page" command: "PAGE_DECREMENT" }, "PAUSE_ROTATION": { pattern: "pause my rotation", command: "PAUSE_ROTATION" }, "RESUME_ROTATION": { pattern: "resumes my rotation", command: "RESUME_ROTATION" }, "SHOW_HIDDEN_PAGE": { pattern: "show parameters", // I have juste one page hidden, you can have several command: "SHOW_HIDDEN_PAGE" }, "LEAVE_HIDDEN_PAGE": { pattern: "exit settings", command: "LEAVE_HIDDEN_PAGE" }, "CLOCK": { pattern: "displays the clock", // I grouped the module by theme in the same page command: "CLOCK" // to name them easly, first page : big horloge, weather of the day and MMM-Saint }, // 2nd page : 3 Calendar, Alarm, MMM-Traffic... "CALENDAR": { // 3th page : 3 weather modules (rain probability, forecast per day and 5 days forecast) pattern: "display work calendar", // 4th page : 4 news modules command: "CALENDAR" // for example }, "WEATHER": { pattern: "display the weather", command: "WEATHER" }, "INFORMATION": { pattern: "display information", command: "INFORMATION" }, "SPOTIFY": { pattern: "display music", command: "SPOTIFY" }, "PHOTOS": { pattern: "display my pics", command: "PHOTOS" }, "TO_DO_LIST": { pattern: "display to do list", command: "TODOLIST" }, "STOCKS": { pattern: "display my stocks", command: "STOCKS" }, "MAIN_PAGE": { pattern: "main page", command: "MAIN_PAGE" }, }, commands: { "PAGE_INCREMENT": { moduleExec: { module: (param) => { this.sendNotification("PAGE_INCREMENT"); } }, }, "PAGE_DECREMENT": { moduleExec: { module: (param) => { this.sendNotification("PAGE_DECREMENT"); } }, }, "PAUSE_ROTATION": { moduleExec: { module: (param) => { this.sendsocketNotification("PAUSE_ROTATION",""); }, }, }, "RESUME_ROTATION": { moduleExec: { module: (param) => { this.sendNotification("RESUME_ROTATION", ""); }, }, }, "SHOW_HIDDEN_PAGE": { moduleExec: { module: (param) => { this.sendNotification("SHOW_HIDDEN_PAGE","admin"); // You can have several hidden pages, just change the payload with }, // the same name of your hidden page in the MMM-Pages config in config.js file }, }, "LEAVE_HIDDEN_PAGE": { notificationExec: { notification: "LEAVE_HIDDEN_PAGE", payload: "admin", }, }, "CLOCK": { moduleExec: { module: (param) => { // Home_page is my page 0 indicated in the MMM-Pages config in config.js file }, }, }, "MAIN_PAGE": { notificationExec: { notification: "PAGE_CHANGED", payload: 0, }, }, "WEATHER": { notificationExec: { notification: "PAGE_CHANGED", payload: 1, }, }, "CALENDAR": { notificationExec: { // you can have as many pages as you want, just edit the payload with number page notification: "PAGE_CHANGED", payload: 2, }, }, "INFORMATIONS": { notificationExec: { notification: "PAGE_CHANGED", payload: 3, }, }, "SPOTIFY": { notificationExec: { notification: "PAGE_CHANGED", payload: 3, }, }, "PHOTOS": { notificationExec: { notification: "PAGE_CHANGED", payload: 4, }, }, "STOCKS": { notificationExec: { notification: "PAGE_CHANGED", payload: 5, }, }, "TODOLIST": { notificationExec: { notification: "PAGE_CHANGED", payload: 4, }, }, }, } exports.recipe = recipe
i try adding a MAIN_PAGE command but GA just sit not changing page.
Thanks,
-
payload : "0",
For main page
Because in your sample it’s eq to null value
And developer of this module don’t think to add null value to main page
In a long time I have solve it with “0” (string value) -
thanks that worked
-
@bugsounet Hello. The payload: “0” didn’t work for me. Recipe works fine except returning to main page. I tried to make this change to all folders (module’s config, my config, recipe) as well as only in the recipe but same result. Is it because now we are in V4 and not in V3? Also I would like to ask if it is possible to add a timer in tne recipe for some pages when is shown, after a while to return to main page. Thank you in advance.
-
@Anthony: It’s not related to GA (I have make any change for this)
It’s related to
MMM-pages
update
Just read theReadMe
file and apply notification rulesYou have a notification named
HOME_PAGE
-
@bugsounet Hello. The notification rules worked. Thank you very much.
-
Thank you very much.
-
I am new to coding so please pardon my silly question but where do you put this recipe. everywhere I put it MM says Fatal Error loading this file. Does it go in recipes under EXT-Google Assistant or recipes under EXT-Pages. Either way it shows Fatal Error. I added the path to confi.js at the end of the MMM-GooglreAssistant module like this
recipes: [
“…/…/EXT-YouTube/recipe/EXT-YouTube.js”,
“…/…/EXT-Spotify/recipe/EXT-Spotify.js”,
“…/…/EXT-Pages/recipe/EXT-Pages.js”
],
I named the recipe EXT-Pages
Please help, thankyou -
Hi,
I don’t understand really what do you search to dorecipes are based from
~/MagicMirror/modules/MMM-GoogleAssistant/recipes
(like the current path)
now why../../EXT-YouTube/recipe/EXT-YouTube.js
?it will invoque to go
EXT-Youtube
directory,recipe
in this directory and finaly openEXT-YouTube.js
file
for verify;cd ~/MagicMirror/modules/MMM-GoogleAssistant/recipes cat ../../EXT-YouTube/recipe/EXT-YouTube.js
and magical… recipe of youtube is displayed (from
~/MagicMirror/modules/EXT-YouTube/recipe/EXT-YouTube.js
)After, I don’t think that
MMM-Pages
Protocol is the same asEXT-Pages
ProtocolAnyway, I don’t think it’s related to this topic.