Read the statement by Michael Teeuw here.
[Guide] Control MM via Google Home
-
@smackenzie5
I don’t know anything about OnScreenMenu. Have you any link to inspect?
I think your “fire” would be wrong. “NotificationReceived” is not usual type of notification conventions. Anyway if i see how Onscreenmenu works I may tell you more. -
@Sean
OnScreenMenu is one of the 3rd Party modules here:
https://github.com/shbatm/MMM-OnScreenMenuI used notificationReceived because it was similar to your example of SHOW_ALERT.
From alert.js - show_alert: function(params, sender) {
From MMM-NotificationTrigger.js - notificationReceived: function (notification, payload, sender) {
Maybe not correct but that’s why I did it.Here’s where I got the example used for the content of notification and payload:
https://github.com/shbatm/MMM-AlexaOnOff/blob/master/README.md
Again, maybe not correct but that’s why I did it.{ module: 'MMM-OnScreenMenu', position: 'bottom_right', }, { module: 'MMM-AlexaOnOff', config: { devices: [{ name: "Magic Mirror", on: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOn' } }, off: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOff' } }, }] } }
Thoughts?
Thanks,
Scott -
@smackenzie5
As far as I read OnScreenMenu module,
it needs notification like this;- notification : ONSCREENMENU_PROCESS_ACTION
- payload:
- “actionName” : “monitorOn”
So you can make your IFTTT & NotificationTrigger recipe like this;
IFTTT recipe{ "notification": "MONITOR_ON_FROM_IFTTT", "payload": null }
MMM-NotificationTrigger
module: "MMM-NotificationTrigger", config: { useWebhook: true, triggers: [ { trigger: "MONITOR_ON_FROM_IFTTT", fires: [ { fire: "ONSCREENMENU_PROCESS_ACTION", payload: {"actionName": "monitorOn"} } ] } ] }
I didn’t test those codes on real machine so there could be some syntax error, but I believe you can understand the concept
-
@Sean
You sir, are a freakin’ genius - it works perfectly.
Thanks again for all the effort. -
@Sean If possible could you give an example of how our config file should look like if we wanted to use the google home to turn on and off the monitor?
-
Also if i were using MMM-Remote-Control besides MMM-OnScreenMenu, how would it work?
-
@Sean So i followed all the steps and looked at the conversation you had with smackenzie, but i still cant get my monitor to turn off, here my
config.js{ module: 'MMM-OnScreenMenu', position: 'bottom_right', }, { module: "MMM-NotificationTrigger", config: { useWebhook: true, triggers: [ { trigger: "MONITOR_OFF_FROM_IFTTT", fires: [ { fire: "ONSCREENMENU_PROCESS_ACTION", payload: {"actionName": "monitorOff"} } ] } ] } },
IFTTT request
{ "notification": "MONITOR_OFF_FROM_IFTTT", "payload": null }
and here the log when i say Magic (the keyword)
reqpost? { notification: 'MONITOR_OFF_FROM_IFTTT', payload: null }
-
@sgarg15 if you open the developers window console, you should see the notifications being sent
-
@sdetweil the notification is being but it isnt doing anything to the monitor
-
@sgarg15 so, the onscreen module should be configured to receive and process this, right?
ONSCREENMENU_PROCESS_ACTION