cymplecy

AlexaSimonSays

Sep 5th, 2020
2,327
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [{"id":"c679347d.56b0d8","type":"debug","z":"e5ae4482.675138","name":"FILTERED","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"summary","statusType":"msg","x":570,"y":40,"wires":[]},{"id":"58370b45.1a9504","type":"alexa-remote-event","z":"e5ae4482.675138","name":"","account":"77608731.ade338","event":"ws-device-activity","x":130,"y":100,"wires":[["9b70a934.27edf8","25163a7e.de31a6"]]},{"id":"5aa60c7e.717c54","type":"link out","z":"e5ae4482.675138","name":"Alexa phrase","links":["5b55735.0f3a28c","78da7ca0.30d154","b6e43d2f.a424f","d9e4a221.919df","9a7052c1.cedf4","67027652.26ec28","15dd023b.2df83e","c31ab2eb.412cb","72c96ae6.0153f4","1b063c01.b563d4","346bedd9.144902","fbd99b92.7188c8","cf06e3f1.56f08","378cc2c7.879d1e","d4c787bc.f02aa8"],"x":570,"y":100,"wires":[],"icon":"font-awesome/fa-arrow-right","l":true},{"id":"9b70a934.27edf8","type":"debug","z":"e5ae4482.675138","name":"ALL","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":330,"y":40,"wires":[]},{"id":"25163a7e.de31a6","type":"function","z":"e5ae4482.675138","name":"Filter","func":"if ((msg['payload']['activityStatus']) == 'SUCCESS') {\n  if ((msg['payload']['description']['summary']) == '') {\n    return;\n  }\n  if ((msg['payload']['description']['summary']) == 'alexa') {\n    return;\n  }\n  if ((msg['payload']['description']['summary']) == String('simon says ') + String(flow.get('lastSpeak'))) {\n    return;\n  }\n  msg['name'] = (msg['payload']['name']);\n  msg['summary'] = (msg['payload']['description']['summary']);\n  msg.summary = msg.summary.replace(/alexa /gi, '');\n  msg['payload'] = (msg['summary']);\n  if ((msg['payload']).indexOf('simon says ') + 1 > 0) {\n    msg.payload = msg.payload.replace(/simon says /gi, '');\n  }\n  return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":330,"y":100,"wires":[["c679347d.56b0d8","5aa60c7e.717c54"]]},{"id":"77608731.ade338","type":"alexa-remote-account","z":"","name":"SimonSays","authMethod":"proxy","proxyOwnIp":"192.168.0.23","proxyPort":"3456","cookieFile":"alexaremote2.txt","refreshInterval":"0","alexaServiceHost":"alexa.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-UK","userAgent":"","useWsMqtt":"on","autoInit":"on"}]
RAW Paste Data