Read the statement by Michael Teeuw here.
Hi, there is a new Alexa Module
-
@JoChef2 its because the exec() is launching A program… but the program is NOT a shell (sh., bash etc), and only THEY understand the | and && syntax… vcgencmd does not… it executes what it knows ‘display_power 1’ ,and ignores the rest
now, you CAN execute a script directly as long as it contains the processor name at the front
#!/bin/sh or #!/bin/bashexec(“/home/pi/MagicMirror/modules/MMM-AlexaControl/scriptname”)
or the script has to be in the path environment varible.
(unlike windows, the ‘current directory’ is NOT included in the path (for security reasons))if the script does NOT contain the processor path&name
then you have to launch the shellexec(“/bin/bash -c “command string with pipe and logic chars””)
-
got it working thanks!
if(action === 1){ exec('/home/pi/monitor_on.sh'); }if(action === 0){ exec('/home/pi/monitor_off.sh');
forgot to put the path :confounded_face:
Thanks buds!
-
Hi, mmm-alexacontrol is ok, i’m change pages,etc.
Can I ask alexa for something and alexa replies in the compliments module?
thanks -
@minomit Hi, no that’s not directly possible with my module because it emulates only smart home devices and haven’t anything to do with the speech of Alexa. It’s possible that you add to the compliments module notification support and then you can create devices with my module that sends notifications to the compliments module. You can complete this with routines in the Alexa app. So then you have a few sentences. But I think that’s not the thing you asked for. If you want to see all the answers of Alexa you should use MMM-awesome-alexa. I’m not sure if my module works with it but that’s the only way I see to realize that. Maybe someone else have a better idea.
-
@JoChef2 Will this module work with a google home mini?
-
@sgarg15 Hi, I don’t know if it works with a google home mini because I don’t have one. But I think the wemos devices I emulate should work with a google home. So test it. You could use the default config and test the preconfigured devices. Let me know if it works.
-
@JoChef2 I dont think it works, i downloaded it and did npm install, and my config is like this
{ module: 'MMM-AlexaControl', position: 'middle_center', config:{ image: false, pm2ProcessName: "MagicMirror", vcgencmd: "vcgencmd", } },
and my google home mini is unable to detect the magic mirror
-
@sgarg15 how do u discover devices w a mini?
-
@sdetweil you usually go into the app and then click set up new device and it searches for a device and for me when it searches it cant find any device
-
@sgarg15 is it looking for a particular device type? These look like wemo, now Belkin plugs