I have built a message system using and ESP12 and 2-line LCD display. It receives MQTT messages via Node-Red and can send an acknowledgement back.
It's a teenager notification unit!
I open a Node-Red UI on my mobile device, type in a message (e.g. Your dinners ready) and that get sent from Node-Red to his display, it also flashes an LED and sounds a loud buzzer. He presses a button on top to silence it which also sends an MQTT message back to Node-Red which displays an 'OK' acknowledgement on the UI.
Works great.
Now, is there a way I can do it with Amazon Alexa, i.e., ask Alexa to send "your dinners ready" which can be received by Node-Red and then forwarded as an MQTT string as per above. Maybe it could also receive the acknowledgement and Alexa could say "Message Acknowledge".
If this can be done, which plug-in (node) would be best.
I have looked at some of the nodes, but there are 2417 listed so would appreciate anyone pointing me in the right direction to which one could be used (if it is capable that is).
I am asking for help with which node to choose, not actually how to write the flow to do it (not yet anyway).
I would imagine it would have to go through an external service for the voice to text part rather than local.
Alexa would need the ability to understand the spoken expression ("your dinner is ready"). Otherwise, it will reply with something like "I don't know how to do that."
For example, if you said "Turn on dinner" it would understand it because it has an inherent skill to turn devices on and off. However, it wouldn't be able to comply with the request because it would look for a device called "dinner" and fail to find it.
You would need to create a custom skill and, as far as I know, there's no node available for that.
I am using node-red-contrib-alexa-remote2 to listen for a specific type of phrase and then perform an action. If I say "turn on the light", or "turn light on", the node detects the phrase, determines which Echo device heard it and then turns on that location's default light. This provides "room-awareness" and allows me to say "turn the light off" in different rooms (where Echos are located) and Alexa will turn off the correct, default light for that room.
Why this works is because of Alexa's inherent skill for turning devices on/off. What's needed is to define "light" as a recognizable device to Alexa and I use another node, node-red-contrib-amazon-echo, to do that.
More information about what I described can be found here.
In your case, you could use node-red-contrib-alexa-remote2 to listen for any phrase that begins with the word "announce". Alexa has an inherent skill for handling announcements. Your flow could then extract the actual announcement and, if it matches a desired phrase (such as "dinner is ready") it can proceed to publish it to an MQTT topic. However, because you commanded Alexa to perform an announcement, it will speak the announcement to all Echos. If you wish to suppress the actual announcement, I don't think that's possible.
Thanks for the info.
I did suspect it couldn't be done but was hoping that somewhere, there was a sort of speach to text thing lurking somewhere.
I could use the on/off function, have different messages pre-programed then just could issue a command such as 'alexa, turn 1 on' and that could initiate node-red to send a message preprogramed as for that command.
It would probably function fine that way for standard messages. 'Dinner is ready' , 'bed time', etc.
In terms of Alexa, "speech to text" is a skill. If you want Alexa to understand:
Alexa, circulate the pool.
Alexa, reverse the pump.
Alexa, transfer fifty dollars to John's bank account.
you will need to create new skills for that.
Whereas text-to-speech is readily available (in node-red-contrib-alexa-remote2), speech-to-text constitutes creating a new skill and, to my knowledge, there's no node that can create new skills. Creating a new skill is an involved process (beyond the scope of this discussion).
EDIT
You could use node-red-contrib-alexa-remote2 to detect when this phrase is spoken:
Alexa, circulate the pool.
and then proceed to do something like publish it to MQTT or turn on a pool pump or whatever. HOWEVER, without having a skill to understand "circulate the pool", Alexa will reply "I don't know how to do that".
I just recently started playing around with routines in the Alexa App. It seems to me there is a combination with the routine process that might work for your use case.
I believe Cathprotech's requirement is to simply say "Your dinner is ready" and not "Tell the Teapot dinner is ready". Can the Custom Q&A blueprint allow you to leave out the "Tell the something" part?
I think the only option really is just to have pre-programed messages (some of which I already have).
Then use it as though I was turning a light on or off, I could maybe have 2 messages per command.
I could say, 'Alexa, kitchen light on' or 'Alexa, kitchen light off' but call them message 1, so I could say 'Alexa, message 1 on' which could send a pre-programmed message but also have 'Alexa, message 1 off' which I think could send a different pre-programmed message.
This is what I have on my Node-Red UI at the moment.
I don't have many pre-programmed because I use the 'enter message' section. This I can access from any device in my home and my wife can even access over the internet from work.
I'm thinking of making a second unit to place at the bottom of the stairs so we can receive short text messages and reminders as it is very easy to implement.