@sdetweil
I do have a real Echo device…
Yes I’m familiar with the MMM-AlexaControl module but it seems that you can’t send customized notifications to other modules.
So basically all I want is to say something like “Open Youtube and search for xy”.
Read the statement by Michael Teeuw here.
Posts
-
RE: MM Alexa speech to text
-
MM Alexa speech to text
I want to control other modules on my Magic Mirror with my Alexa device and interact with them.
Is there a way to turn speech to text so I can communicate with the other modules?
Is there maybe already a module for it?I had an idea to create a new Alexa Skill on the Amazon Alexa developer account and somehow send the information to my Magic Mirror but I’m not quite sure how this should work.
Any suggestions?
-
RE: Async Functions inside node_helper.js
@mmrize
Thank you very much!!! It’s working now. :) -
Async Functions inside node_helper.js
I wrote a little MagicMirror module which web scrapes a website with puppeteer.
Therefore I’ve used async functions to fetch the data.
It’s working fine but as soon as I send it back to my main.js file it appears as a Promise and I can’t process the data.Any suggestions how to wait for the data before sending it to the main.js file?
... socketNotificationReceived : function(notification, payload) { var self = this switch(notification) {case"CASE_1": text = scrape("https...") this.sendSocketNotification("text",text) break}} ... async function scrape(url){ try{ const browser = await puppeteer.launch() const page = await browser.newPage(); await page.goto(url) const [el] await page.$x("...") const txt = await el.getProperty("textContent") const rawTxt = await txt.jsonValue browser.close() return rawTxt} catch { return "ERROR"}}