Creepy Alexa for Halloween

It's Halloween, turn your Alexa into a creepy monster and make it talk back at you and play random sounds across the house scarying everyone around. enter image description here

Tutorial here!

Features:

  • Talkback messages
  • Random scary noises
  • 1000s of noises to pick from
  • Custom replies and triggers
  • random replies

You will need the following nodes:


Settings

  • Add new text enter text talkback
  • Add noise enter noise url without the number count and the rest of the message and enter the number of clips

More about me:

If you want to get the latest updates to this project you can follow me via your preferred social media:

And if you feeling like buying me a coffee or supporting me in a more continuous way:

I hope you have enjoyed the project!

[{"id":"bb8b83ce.c4e01","type":"tab","label":"Creepy Alexa","disabled":false,"info":"It's Halloween, turn your Alexa into a creepy monster and make it talk back at you and play random sounds across the house scarying everyone around.\n![enter image description here](https://notenoughtech.com/wp-content/uploads/2020/10/thumbnail-2.jpg)\n\n\n [**Tutorial here!**](https://notenoughtech.com/alexa/creepy-alexa/)\n \n\n**Features**:\n\n - Talkback messages\n - Random scary noises\n - 1000s of noises to pick from\n - Custom replies and triggers\n - random replies\n\nYou will need the following nodes:\n\n - node-red-contrib-alexaremotev2 \n - [Alexa dev sounds](https://developer.amazon.com/en-US/docs/alexa/custom-skills/ask-soundlibrary.html) \n \n---\n\n# Settings\n\n - **Add new text** enter text talkback\n - **Add noise**  enter noise url without the number count and the rest of the message and enter the number of clips\n - \n  ## More about me:\n\nIf you want to get the latest updates to this project you can follow me via your preferred social media:\n\n-   [Facebook](https://www.facebook.com/NotEnoughTECH/)\n-   [Twitter](https://twitter.com/NotEnoughTECH)\n-   [Instagram](https://www.instagram.com/notenoughtech/)\n-   [YouTube](https://www.youtube.com/user/Polepositionpage)\n\nAnd if you feeling like buying me a coffee or supporting me in a more continuous way:\n\n-   [Paypal](https://www.paypal.me/notenoughtech)\n-   [Patreon](https://www.patreon.com/NotEnoughTECH)\n\nI hope you have enjoyed the project!"},{"id":"c1a43788.0fac08","type":"group","z":"bb8b83ce.c4e01","name":"Talkback","style":{"stroke":"#0070c0","fill":"#dbcbe7","label":true,"label-position":"n","color":"#001f60"},"nodes":["758a8d86.5ef924","1e8f8e72.f63282","23c55003.73588","91d830e0.89023","188f2d1e.7afee3","b64b3a2a.a44b28"],"x":34,"y":99,"w":952,"h":149.5},{"id":"c21abd4.2a6d34","type":"group","z":"bb8b83ce.c4e01","name":"Random scary noises","style":{"stroke":"#ff0000","fill":"#ffdf7f","label":true,"label-position":"n","color":"#001f60"},"nodes":["5f817031.26e5f","e92dd64c.b7af68","68d7a39a.bec04c","d8e489e0.04d1b8","433679ec.4eda88","2d593bfd.9f6cf4","94971106.c3ef3","3ede95ba.79b39a"],"x":54,"y":339,"w":892,"h":162},{"id":"758a8d86.5ef924","type":"alexa-remote-routine","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"","account":"9d26c7ce.162eb8","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"devices":{"type":"msg","value":"device"}}},"x":880,"y":200,"wires":[[]]},{"id":"1e8f8e72.f63282","type":"alexa-remote-event","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"","account":"9d26c7ce.162eb8","event":"ws-device-activity","x":150,"y":200,"wires":[["b64b3a2a.a44b28"]]},{"id":"23c55003.73588","type":"inject","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"Add new text","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello","payloadType":"str","x":150,"y":140,"wires":[["91d830e0.89023"]]},{"id":"91d830e0.89023","type":"function","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"","func":"var newMessage = msg.payload;\nvar getAll = flow.get(\"answers\");\n\ngetAll.push(newMessage);\nflow.set(\"answers\", getAll);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\n\nvar x =  flow.get(\"answers\");\n\nif(x === undefined){\n    flow.set(\"answers\",[]);\n}","finalize":"","x":330,"y":140,"wires":[[]]},{"id":"188f2d1e.7afee3","type":"function","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"Random answer","func":"var array = flow.get(\"answers\");\nvar count = Math.floor(Math.random() * array.length);\nmsg.device = msg.payload.deviceSerialNumber;\nmsg.payload = \"<speak><amazon:effect name=\\\"whispered\\\">\"+ array[count]+\"</amazon:effect> </speak>\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":200,"wires":[["758a8d86.5ef924"]]},{"id":"b64b3a2a.a44b28","type":"switch","z":"bb8b83ce.c4e01","g":"c1a43788.0fac08","name":"Routine Name","property":"payload.description.summary","propertyType":"msg","rules":[{"t":"regex","v":"off","vt":"str","case":true},{"t":"regex","v":"on","vt":"str","case":true},{"t":"regex","v":"lights","vt":"str","case":true}],"checkall":"true","repair":false,"outputs":3,"x":420,"y":200,"wires":[["188f2d1e.7afee3"],["188f2d1e.7afee3"],["188f2d1e.7afee3"]]},{"id":"5f817031.26e5f","type":"inject","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"Add noise","props":[{"p":"payload"},{"p":"number","v":"15","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"<audio src=\"soundbank://soundlibrary/monsters/ghosts_demons/ghosts_demons_","payloadType":"str","x":180,"y":380,"wires":[["e92dd64c.b7af68"]]},{"id":"e92dd64c.b7af68","type":"function","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"","func":"var newMessage = {\"noise\" : msg.payload, \"count\": msg.number};\nvar getAll = flow.get(\"noises\");\n\n\ngetAll.push(newMessage);\nflow.set(\"noises\", getAll);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is \nvar x =  flow.get(\"noises\");\n\nif(x === undefined){\n    flow.set(\"noises\",[]);\n}","finalize":"","x":370,"y":380,"wires":[[]]},{"id":"68d7a39a.bec04c","type":"inject","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"","props":[{"p":"payload"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":460,"wires":[["2d593bfd.9f6cf4"]]},{"id":"d8e489e0.04d1b8","type":"alexa-remote-routine","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"","account":"9d26c7ce.162eb8","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"devices":{"type":"msg","value":"deviceID"}}},"x":840,"y":460,"wires":[[]]},{"id":"433679ec.4eda88","type":"function","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"Random answer","func":"// pick random Alexa\nvar devices = flow.get(\"alexaDevices\");\nvar randomAlexaSet = Math.floor(Math.random() * devices.length);\nmsg.deviceID = devices[randomAlexaSet];\n\n//pick random noise set\nvar array = flow.get(\"noises\");\nvar randomNoiceSet = Math.floor(Math.random() * array.length)\nvar src = array[randomNoiceSet].noise;\nvar number = array[randomNoiceSet].count;\n\n//pick random sound\nvar randomSound = Math.floor(Math.random() * (number))+1;\n\n//compose message\nif (randomSound < 10)\n    {\n    var message = src + \"0\" + randomSound +\"\\\"\\/>\";\n    }\nelse\n    {\n    var message = src + randomSound +\"\\\"\\/>\";\n    }\n\nmsg.payload = \"<speak>\"+message+ \"</speak>\";\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar x =  flow.get(\"alexaDevices\");\n\n\n// define your Alexa devices here\nvar y = [\"Alexa1\", \"Alexa2\"];\n\nif(x === undefined){\n    flow.set(\"alexaDevices\",y);\n}","finalize":"","x":640,"y":460,"wires":[["d8e489e0.04d1b8"]]},{"id":"2d593bfd.9f6cf4","type":"random","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"","low":"1","high":"10","inte":"true","property":"payload","x":340,"y":460,"wires":[["94971106.c3ef3"]]},{"id":"94971106.c3ef3","type":"switch","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"7","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":460,"wires":[["433679ec.4eda88"]]},{"id":"3ede95ba.79b39a","type":"comment","z":"bb8b83ce.c4e01","g":"c21abd4.2a6d34","name":"30% chances every min","info":"","x":400,"y":420,"wires":[]},{"id":"9d26c7ce.162eb8","type":"alexa-remote-account","z":"","name":"","authMethod":"proxy","proxyOwnIp":"192.168.1.107","proxyPort":"3456","cookieFile":"","refreshInterval":"3","alexaServiceHost":"alexa.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-UK","userAgent":"","useWsMqtt":"on","autoInit":"off"}]

Flow Info

Created 4 years, 6 months ago
Rating: not yet rated

Actions

Rate:

Node Types

Core
  • comment (x1)
  • function (x4)
  • inject (x3)
  • switch (x2)
Other
  • alexa-remote-account (x1)
  • alexa-remote-event (x1)
  • alexa-remote-routine (x2)
  • group (x2)
  • random (x1)
  • tab (x1)

Tags

  • alexa
  • alexaremotev2
  • halloween
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option