Alexa-Remote2 Initial Experience

I have been experimenting with Alex-remote2 and have found two approaches with the Alexa Event Node using device activity.

  1. Say "Alexa Simon Says" + the command. Alex will repeat the command to you.
  2. Create a routine on your smart phone where the executed action is a five second delay.

My test example is that I wanted to control the AC power inverter in my motor home from a Raspberry Pi 4.

So here are the routines that I created on my cell phone to cover the requested functionality.

Using this approach when you speak a command like "Alexa inverter status". Alexa will say OK and then a further response comes from node-red.

I very much like the flow from @ cymplecy

(How to get all Alexa requests WITHOUT any other skills)

That was easy to extend for my inverter (status, on, off) test case.

[{"id":"47202283.4729ec","type":"tab","label":"Alexa Voice","disabled":false,"info":""},{"id":"a1bea6c9.95d728","type":"alexa-remote-init","z":"47202283.4729ec","name":"","account":"","option":"initialise","x":340,"y":60,"wires":[[]]},{"id":"1b68cc72.8b45e4","type":"inject","z":"47202283.4729ec","name":"FlowStart","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":80,"wires":[["a1bea6c9.95d728"]]},{"id":"e72686bb.fa3c48","type":"alexa-remote-event","z":"47202283.4729ec","name":"","account":"","event":"ws-device-activity","x":140,"y":320,"wires":[["8e39d8f1.044a48","e899f799.e66528"]]},{"id":"7711b717.47f5c8","type":"switch","z":"47202283.4729ec","name":"Inverter Control:\\n Status\\n On\\n Off","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"inverter status","vt":"str"},{"t":"cont","v":"inverter on","vt":"str"},{"t":"cont","v":"inverter off","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":570,"y":440,"wires":[["659172d.d683e8c"],[],[]]},{"id":"659172d.d683e8c","type":"alexa-remote-routine","z":"47202283.4729ec","name":"Inverter is Offline","account":"","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"str","value":"Inverter is offline"},"devices":{"type":"msg","value":"name"}}},"x":870,"y":420,"wires":[[]]},{"id":"198b30d2.6dc55f","type":"inject","z":"47202283.4729ec","name":"Once a day Refresh","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 23 * * *","once":false,"onceDelay":"60","x":160,"y":160,"wires":[["3a978c4b.50b124"]]},{"id":"3a978c4b.50b124","type":"alexa-remote-init","z":"47202283.4729ec","name":"","account":"","option":"refresh","x":370,"y":160,"wires":[[]]},{"id":"1ee9167c.cc8daa","type":"change","z":"47202283.4729ec","name":"extract summary","rules":[{"t":"set","p":"name","pt":"msg","to":"payload.name","tot":"msg"},{"t":"set","p":"summary","pt":"msg","to":"payload.description.summary","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"summary","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":420,"wires":[["7711b717.47f5c8"]]},{"id":"e899f799.e66528","type":"debug","z":"47202283.4729ec","name":"ALL","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":340,"y":260,"wires":[]},{"id":"8e39d8f1.044a48","type":"switch","z":"47202283.4729ec","name":"Only pass SUCCESS messages","property":"payload.activityStatus","propertyType":"msg","rules":[{"t":"eq","v":"SUCCESS","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":420,"y":320,"wires":[["7f015c33.c37ef4"]]},{"id":"7f015c33.c37ef4","type":"switch","z":"47202283.4729ec","name":"Filter out noise","property":"payload.description.summary","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"str"},{"t":"eq","v":"alexa","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":130,"y":420,"wires":[[],[],["1ee9167c.cc8daa"]]}]

However this takes coordination between defining routines for your account and the node-red flows that you create.

Is there anyway that you can do a question/response interaction where all the content comes from node-red after the initial activation?

I am thinking of the following scenario:

  1. Routine "Alexa please call the butler", she says OK.
  2. Butler in a very English voice says "you requested my services, sir?"
  3. You then have a conversation like "motor home status"
  4. When you are done it times out with the question "Is there anything else, Sir?", etc.

Headless Raspberry Pi implementation notes:

  1. You must enter the Pi IP address so you can access from a remote browser to get the initial Alexa activation cookie.
  2. The file path input box must have a destination filename at the end of the path.

I am using a device on activity node and works for all my alexa devices, except for the Alexa application on my iPhone.

Any idea's?

Some quick feedback:

It helps to only have one device listening for device activity. In my case I have multiple node-red instances as I work towards my final solution.

So I simply write the request and trigger response to the MQTT on my motor home.

That way I have the Alexa flow running on my home network and it is not attempting to do Alexa functionality over a cellular link.

1 Like

I have a mix of GUI related flows and automation flows. On a Raspberry Pi it helps to have the functionality separated between rpi's.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.