Alexa Routine speak (node-red-contrib-alexa-cakebaked)

Hi all,

I want to get notified by alexa voice when something is triggered. I am using node red and the node mentioned above.

Everything works for a maximum of 1 or 2 days. Then there are no more voice notifications. Solution: I go to the alexa routine node, change something, re-deploy. Fine (for 1 or 2 days).

Does anyone know how to make it work without this workaround?

Best regards
Chris

move to applestruddel. Cakebake is no longer being maintained

OK, thanks! I will give it a shot.

Are you using spoken notifications with applestruddel and alexa?

sure, they work really well. Just to make the node more robust, I added this flow to NR and it’s been almost flawless since. In fact I added it when I was using cakebaked and I’m still using it.

[{"id":"8d5e6c19.b0249","type":"comment","z":"6cd0b2f8.4bb6fc","name":"Reinicia alexa la cuenta alexa si no funciona","info":"","x":530,"y":60,"wires":[]},{"id":"513dd1b5.698fd","type":"inject","z":"6cd0b2f8.4bb6fc","name":"4 horas","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"14400","crontab":"","once":true,"onceDelay":0.1,"topic":"A","payload":"refresh","payloadType":"str","x":160,"y":170,"wires":[["4af276ab.50fe68"]]},{"id":"ad6e6ce2.6e106","type":"inject","z":"6cd0b2f8.4bb6fc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"Started!","payloadType":"str","x":160,"y":230,"wires":[["f4722d3a.83fc4"]]},{"id":"c4204271.22e2","type":"inject","z":"6cd0b2f8.4bb6fc","name":"5 Minuto","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"A","payload":"true","payloadType":"bool","x":160,"y":300,"wires":[["390c17bf.e13308"]]},{"id":"f4722d3a.83fc4","type":"change","z":"6cd0b2f8.4bb6fc","name":"set","rules":[{"t":"set","p":"payload","pt":"msg","to":"alexa","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":230,"wires":[["969e134e.022a1","9c70705f.af0d8"]]},{"id":"969e134e.022a1","type":"function","z":"6cd0b2f8.4bb6fc","name":"Valorizza","func":"global.set(\"alexa\", msg.payload);\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":210,"wires":[[]]},{"id":"49229144.b0447","type":"function","z":"6cd0b2f8.4bb6fc","name":"","func":"//var x=global.get(\"Rain\");\nglobal.set(\"Alexa__\",0); \nif(msg.payload!=true)\n{\n msg.payload=\"refresh\";\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":320,"wires":[["3c1ff04.e80871"]]},{"id":"de3397e0.a96178","type":"alexa-remote-init","z":"6cd0b2f8.4bb6fc","name":"","account":"7c02d978.c2de98","option":"initialise","x":860,"y":200,"wires":[["692301fc.fb76c"]]},{"id":"692301fc.fb76c","type":"change","z":"6cd0b2f8.4bb6fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.csrf","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":190,"wires":[["83f7886a.4a9438"]]},{"id":"83f7886a.4a9438","type":"function","z":"6cd0b2f8.4bb6fc","name":"","func":"async function delay(timeMs) {\n  await new Promise(resolve => setTimeout(resolve, timeMs));\n} \nvar newInit = msg.payload;\nvar oldInit = global.get(\"alexa\");\nif (newInit != oldInit)\n{\n global.set(\"alexa\", msg.payload); \n msg.payload=\"refresh\";\n await delay(20000);  \n return msg;\n}\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1200,"y":190,"wires":[["1e442b7d.c2de15"]]},{"id":"6576f31f.dea88c","type":"alexa-remote-other","z":"6cd0b2f8.4bb6fc","name":"","account":"7c02d978.c2de98","config":{"option":"checkAuthentication"},"x":510,"y":320,"wires":[["49229144.b0447"]]},{"id":"390c17bf.e13308","type":"delay","z":"6cd0b2f8.4bb6fc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"0","randomLast":"5","randomUnits":"seconds","drop":false,"x":320,"y":300,"wires":[["6576f31f.dea88c"]]},{"id":"2928bceb.7bc434","type":"catch","z":"6cd0b2f8.4bb6fc","name":"Check Authentication","scope":["6576f31f.dea88c"],"uncaught":false,"x":120,"y":340,"wires":[["383dce50.fa9c62"]]},{"id":"383dce50.fa9c62","type":"delay","z":"6cd0b2f8.4bb6fc","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":320,"y":340,"wires":[["6576f31f.dea88c"]]},{"id":"9daa9719.e22fa8","type":"catch","z":"6cd0b2f8.4bb6fc","name":"Initialise","scope":["de3397e0.a96178"],"uncaught":false,"x":160,"y":110,"wires":[["aff93015.2c7e3"]]},{"id":"aff93015.2c7e3","type":"delay","z":"6cd0b2f8.4bb6fc","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":110,"wires":[["8f910d7b.f5d5d"]]},{"id":"8f910d7b.f5d5d","type":"change","z":"6cd0b2f8.4bb6fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"refresh","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":110,"wires":[["1c7e7e04.dacaf2"]]},{"id":"3c449a39.1d29e6","type":"link in","z":"6cd0b2f8.4bb6fc","name":"","links":["1e442b7d.c2de15","3c1ff04.e80871","1c7e7e04.dacaf2","4af276ab.50fe68","9c70705f.af0d8"],"x":755,"y":190,"wires":[["de3397e0.a96178"]]},{"id":"9c70705f.af0d8","type":"link out","z":"6cd0b2f8.4bb6fc","name":"","links":["3c449a39.1d29e6"],"x":415,"y":250,"wires":[]},{"id":"1e442b7d.c2de15","type":"link out","z":"6cd0b2f8.4bb6fc","name":"","links":["3c449a39.1d29e6"],"x":1305,"y":190,"wires":[]},{"id":"3c1ff04.e80871","type":"link out","z":"6cd0b2f8.4bb6fc","name":"","links":["3c449a39.1d29e6"],"x":805,"y":320,"wires":[]},{"id":"1c7e7e04.dacaf2","type":"link out","z":"6cd0b2f8.4bb6fc","name":"","links":["3c449a39.1d29e6"],"x":575,"y":110,"wires":[]},{"id":"4af276ab.50fe68","type":"link out","z":"6cd0b2f8.4bb6fc","name":"","links":["3c449a39.1d29e6"],"x":275,"y":170,"wires":[]},{"id":"7c02d978.c2de98","type":"alexa-remote-account","name":"","authMethod":"proxy","proxyOwnIp":"192.168.1.29","proxyPort":"1234","cookieFile":"/config/.storage/authentication","refreshInterval":"3","alexaServiceHost":"alexa.amazon.es","amazonPage":"amazon.es","acceptLanguage":"es-ES","onKeywordInLanguage":"on","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

I removed cakebaked and installed applestrudel just now. I will keep and eye (and ear) on it to check, if it works without interruptions in the future. I will keep you informed. Thanks for the tip anyway.

Still not working after a certain time. I have just added a “Alexa initialization node” that is triggered every 6 hours. Let’s see.

I hope you get it working :crossed_fingers:

Thanks for your help! It seems to be working!
Best regards
Chris

“on device activity” has stopped working for me today. Are you having this problem?

Sorry, what does “on device activity” mean? As I don’t know it, I might not have this problem.

Whithin the Alexa event node there’s the option “on device activity”. It’s really usefull because you can capture events that happen on your echo devices, like last called device or the transcription of your voice requests, problem is it is the node that fails the most over time. It’s coming and going as of now for me. Works a few hours, down a few others…

Hi,
I am having the same issue as you however the initialization node is refreshed twice a day. This is really annoying.
Have you find a workaround? I must admit that I haven’t installed applestruddel because Cakebake was already a fork from the initial one and I don’t see improvements with this version vs the initial one.
Thanks