My Alexa Remote 2. Tips and Tricks

I use Alexa Remote 2. I know its not being updated and theres newer out there, but now that I figured out its quirks, I dont wanna switch. Im making this as much for my knowledge when I inevitably forget in 6 months, as well as to help others.

  1. Speak at volume REGUALR only works on Gen3 echos. Gen4, whatever is in speak field will play at whatever volume the echo was already at.
    image

  2. Speak at volume SSML, will not speak at specified volume.
    image

  3. You can still get SSML type speak using REGULAR if you put the SSML in a template node and set the REGULAR speak to msg.payload
    image
    image
    image

  4. If you want to send a speech message and an echo is currently playing a song, sending the speech message with Speak At Volume will speak the message at the specified volume, then go back to whatever volume you were playing the music at.

But…

  1. If you want to play a sound (such as everytime a door opens) you will run into problems if your playing music on your echo when a door is opened. After the sound plays, your music will continue to play at that level. There is no “Play Sound at Volume” unfortunately.

I made this flow that checks to see if the echo is playing. If its not, it just plays the sound at volume 50, and stops there.


If it is playing, it saves the current volume to a global variable. Then stops, sets volume to 50, plays chime. Write global variable back to msg. Sends the previous volume back to the alexa. Waits .5 seconds (takes alexa time to process these commands. Without a dwell, more likely to get your music playing at increased volume for split second before new volume change takes effect). Then finally, play music again.
image


image
image
image

May seem like lots of work for a door chime, but my wife really wants it. And I dont like having to then tell Alexa to change the volume everytime the door opens.

Hope this may help someone else.

Heres a tab with all my examples:

[{"id":"89982d24fdc04f6a","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"dbad571728ae6e9f","type":"inject","z":"89982d24fdc04f6a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":115,"y":621,"wires":[["b1d7d657b87b2620"]]},{"id":"b1d7d657b87b2620","type":"api-current-state","z":"89982d24fdc04f6a","name":"Echo office playing?","server":"ab3e2c53.e3491","version":2,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.echo_office","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":145,"y":666,"wires":[["b5410ea5fdb10d29"],["713af7f838ce81b9"]]},{"id":"713af7f838ce81b9","type":"alexa-remote-routine","z":"89982d24fdc04f6a","name":"Door chime","account":"f0ce5fbc.18734","routineNode":{"type":"node","payload":{"type":"serial","children":[{"type":"volume","payload":{"value":{"type":"num","value":"50"},"mode":{"type":"str","value":"set"},"devices":["G6G0XG11030205CT"]}},{"type":"sound","payload":{"sound":{"type":"str","value":"bell_02"},"devices":["G6G0XG11030205CT"]}}]}},"x":367,"y":666,"wires":[[]]},{"id":"b5410ea5fdb10d29","type":"change","z":"89982d24fdc04f6a","name":"Write current volume to global variable","rules":[{"t":"set","p":"office_volume","pt":"global","to":"data.attributes.volume_level","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":413,"y":621,"wires":[["7e0c180cc9562c1a"]]},{"id":"7e0c180cc9562c1a","type":"alexa-remote-routine","z":"89982d24fdc04f6a","name":"Door chime","account":"f0ce5fbc.18734","routineNode":{"type":"node","payload":{"type":"serial","children":[{"type":"stop","payload":{"devices":["G6G0XG11030205CT"]}},{"type":"volume","payload":{"value":{"type":"num","value":"50"},"mode":{"type":"str","value":"set"},"devices":["G6G0XG11030205CT"]}},{"type":"sound","payload":{"sound":{"type":"str","value":"bell_02"},"devices":["G6G0XG11030205CT"]}}]}},"x":673,"y":621,"wires":[["e4ee0dd23d1a57ca"]]},{"id":"e4ee0dd23d1a57ca","type":"change","z":"89982d24fdc04f6a","name":"Write global variable to volume","rules":[{"t":"set","p":"office_volume","pt":"msg","to":"office_volume","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":905,"y":621,"wires":[["c4d9efb1ca157982"]]},{"id":"c4d9efb1ca157982","type":"api-call-service","z":"89982d24fdc04f6a","name":"Set volume back to previous","server":"ab3e2c53.e3491","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.echo_office","data":"{\"volume_level\":{{office_volume}}}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1192,"y":621,"wires":[["85b15b3b180b31fe"]]},{"id":"85b15b3b180b31fe","type":"trigger","z":"89982d24fdc04f6a","name":".5","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":".5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1391,"y":621,"wires":[["fee0517e5053f8ef"]]},{"id":"fee0517e5053f8ef","type":"api-call-service","z":"89982d24fdc04f6a","name":"Play","server":"ab3e2c53.e3491","version":3,"debugenabled":false,"service_domain":"media_player","service":"media_play","entityId":"media_player.echo_office","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1517,"y":621,"wires":[[]]},{"id":"d69a752a4927d99f","type":"inject","z":"89982d24fdc04f6a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":115,"y":450,"wires":[["184874b621f0a812"]]},{"id":"184874b621f0a812","type":"template","z":"89982d24fdc04f6a","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<speak>\n    <voice name=\"Ivy\">This will speak at volume</voice>\n</speak> ","output":"str","x":285,"y":450,"wires":[["14103ce73f9df225"]]},{"id":"14103ce73f9df225","type":"alexa-remote-routine","z":"89982d24fdc04f6a","name":"","account":"f0ce5fbc.18734","routineNode":{"type":"speakAtVolume","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"volume":{"type":"num","value":"5"},"mode":"set","devices":["G6G0XG11030205CT"]}},"x":507,"y":450,"wires":[[]]},{"id":"83fbd67b7f84468c","type":"alexa-remote-routine","z":"89982d24fdc04f6a","name":"Speak at 30","account":"f0ce5fbc.18734","routineNode":{"type":"speakAtVolume","payload":{"type":"regular","text":{"type":"str","value":"Speak at 30"},"volume":{"type":"num","value":"30"},"mode":"set","devices":["G6G0XG11030205CT"]}},"x":305,"y":144,"wires":[[]]},{"id":"0f9e366329d93303","type":"inject","z":"89982d24fdc04f6a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":115,"y":144,"wires":[["83fbd67b7f84468c"]]},{"id":"8adfd99c1939e5d9","type":"comment","z":"89982d24fdc04f6a","name":"This will speak at volume 30, at least on gen3 echos","info":"","x":228,"y":99,"wires":[]},{"id":"ad793828dd1c0689","type":"comment","z":"89982d24fdc04f6a","name":"SSML wont speak at volume","info":"","x":148,"y":252,"wires":[]},{"id":"c9b1d2070ce94e65","type":"alexa-remote-routine","z":"89982d24fdc04f6a","name":"SSML speak at 5","account":"f0ce5fbc.18734","routineNode":{"type":"speakAtVolume","payload":{"type":"ssml","text":{"type":"str","value":"<speak>     <voice name=\"Ivy\">This will not play at volume 5</voice> </speak> "},"volume":{"type":"num","value":"5"},"mode":"set","devices":["G6G0XG11030205CT"]}},"x":324,"y":306,"wires":[[]]},{"id":"4b95351b8f064cba","type":"inject","z":"89982d24fdc04f6a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":115,"y":306,"wires":[["c9b1d2070ce94e65"]]},{"id":"cc1a166f635cfc15","type":"comment","z":"89982d24fdc04f6a","name":"You can SSML speak using REGULAR option, with a template","info":"","x":258,"y":405,"wires":[]},{"id":"de5fb51748a61dbe","type":"comment","z":"89982d24fdc04f6a","name":"Check to see if Alexa is playing before triggering door chime","info":"","x":258,"y":585,"wires":[]},{"id":"ab3e2c53.e3491","type":"server","name":"AvilaSmartHome","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"f0ce5fbc.18734","type":"alexa-remote-account","name":"","authMethod":"proxy","proxyOwnIp":"192.168.86.215","proxyPort":"3456","cookieFile":"Auth","refreshInterval":"15","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"}]