Automatically set shuffle & repeat when requesting music through voice command

This works with echo speakers or ¿any speaker? linked to your amazon account. You will need: node-red-contrib-alexa-cakebaked

In the switch nodes you need to set parts of the most common sentences you use to request music through voice. For example, if you usually say “Alexa, play my playstlist X from Spotify”, you can set one switch node with “play my playlist”, or even two, one with the former and another with “from Spotify”, just to avoid false positives. Set there your most characterisctic way of requesting music. The rest is done by the flow.

With this flow, whenever you request music thorugh voice it will automatically set shuffle and “repeat all” for that speaker plus it won’t start from the first song from the playlist, it’ll start randomly.

[{"id":"bfdad228.42de","type":"alexa-remote-event","z":"b3e0d080.4aac7","name":"","account":"bb44c27d.b8d5a","event":"ws-device-activity","x":190,"y":420,"wires":[["8b74b13.31da85"]]},{"id":"8b74b13.31da85","type":"switch","z":"b3e0d080.4aac7","name":"","property":"payload.description.summary","propertyType":"msg","rules":[{"t":"cont","v":"mi playlist","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":355,"y":420,"wires":[["b31352c9.1b49b"]],"l":false},{"id":"dfc35cd1.7d795","type":"alexa-remote-echo","z":"b3e0d080.4aac7","name":"","account":"bb44c27d.b8d5a","config":{"option":"command","value":{"device":{"type":"flow","value":"payload.deviceSerialNumber"},"what":"shuffle","value":{"type":"bool","value":"true"}}},"x":540,"y":420,"wires":[["ab6d358f.ceae68","173dc9b3.1fb4f6"]]},{"id":"b31352c9.1b49b","type":"change","z":"b3e0d080.4aac7","name":"","rules":[{"t":"set","p":"payload.deviceSerialNumber","pt":"flow","to":"payload.deviceSerialNumber","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":415,"y":420,"wires":[["dfc35cd1.7d795"]],"l":false},{"id":"ab6d358f.ceae68","type":"delay","z":"b3e0d080.4aac7","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":655,"y":440,"wires":[["8dbba22.42c726"]],"l":false},{"id":"8dbba22.42c726","type":"alexa-remote-echo","z":"b3e0d080.4aac7","name":"","account":"bb44c27d.b8d5a","config":{"option":"command","value":{"device":{"type":"flow","value":"payload.deviceSerialNumber"},"what":"repeat","value":{"type":"bool","value":"true"}}},"x":780,"y":440,"wires":[[]]},{"id":"173dc9b3.1fb4f6","type":"alexa-remote-echo","z":"b3e0d080.4aac7","name":"","account":"bb44c27d.b8d5a","config":{"option":"command","value":{"device":{"type":"flow","value":"payload.deviceSerialNumber"},"what":"next"}},"x":710,"y":400,"wires":[[]]},{"id":"bb44c27d.b8d5a","type":"alexa-remote-account","name":"Edu","authMethod":"proxy","proxyOwnIp":"192.168.1.29","proxyPort":"1234","cookieFile":"/config/.storage/authentication2","refreshInterval":"1","alexaServiceHost":"alexa.amazon.es","amazonPage":"amazon.es","acceptLanguage":"es-SP","userAgent":"","useWsMqtt":"on","autoInit":"on"}]