Read the statement by Michael Teeuw here.
How to send a notification
-
This post is deleted! -
Hi Sam,
My replies are getting flagged as spam apologies for the delay. But I think I found where the Selfie script sends out the notification. Do you think the other scripts I sent earlier are configured correctly?
-
@hango Hi Hango!
Ok so I’ll add that first line to my MMM-SelfieShoot.js (the module that needs to be actioned by another)
And the second will be inside the MMM-AlexaControl.js? I’ll test it now :)
-
Did it there but doesn’t seem to appear in Alexa, The other functions such as restart and monitor off/on works but I’m having trouble having this appear/ work.
-
@alyx so in alexacontrol, you have to create a notification device
notifications: [ { name: 'Notificaition 1', port: 11100, OnOff: false, notification: ["NOTIFICATION", "PAYLOAD"] } ]
name is the thing Alexa will know
the tcp/ip port number to use for Alexa to contact this machine
and the notification info should look familiarthen u restart MagicMirror
( in the MagicMirror startup messages you should see a line listening on ??? where ??? is the port number you used in the notification entry)
and then Alexa discover devicesthen whatever name is, should be discovered.
then you invoke it with
Alexa, turn on xxxx
where xxxx is the name of your device
(because alexacontrol creates fake wemo electric outlets)note that notifications shown above is a list [], so each {} is a notification device
and this stuff goes in the alexacontrol module
config:{}
section -
@sdetweil I have that set up al;ready but my alexa cant discover it for some reason. If you need you can see it in my config.js file above
-
@alyx nice, but you missed one key point
and this stuff goes in the alexacontrol module
config:{}
sectionu have in the general module section not in the module config
-
@sdetweil Ah! that worked thanks :) Next issue it doesnt call the module when activated lol
-
@alyx so, now open the developers window, ctrl-shift-i, and look at the console tab
u may be able to see some module report the notification
or install my samplemodule as it reports all notifications received
https://github.com/sdetweil/SampleModulein the Alexa app u can control devices manually, so that makes testing a lot easier
-
@sdetweil Hi sam,
Great so i can see that the notification isnt being sent via the dev console, it shows up via Alexa app but isnt communicating to the MM. Would you happen to know the cause?
{ module: 'MMM-AlexaControl', position: 'middle_center', config:{ image: true, deviceName: "mirror", pm2ProcessName: "mm", vcgencmd: "hide", startPort: 11001, refresh: true, restart: true, //stop: true, reboot: true, shutdown: true, monitorToggle: true, //cecAddress: "0.0.0.0", //usb: false pages: 3, notifications:[ { name: 'Next page', port: 11102, OnOff: false, notification: ["PAGE_INCREMENT", 'payload'] }, { name: 'Previous page', port: 11103, OnOff: false, notification: ["PAGE_DECREMENT", 'payload'] }, { name: 'Selfie', port: 11104, OnOff: false, notification: ["SELFIE_SHOOT", 'payload'] } ], } },