Alexa/ Node-RED "Hello world" example?

2,347 views
Skip to first unread message

Frank Marshall

unread,
Nov 14, 2016, 4:04:46 PM11/14/16
to Node-RED
I want to link my Alexa Dot to Node-RED

I followed Node-RED Alexa Home Skill Bridge at   https://alexa-node-red.eu-gb.mybluemix.net/docs#
but searching for 'Node-RED' in the Skills  reveals nothing.

I went to https://www.npmjs.com/package/node-red-contrib-alexa and got the nodes to show in my Node-RED web page but I see no simple example to get me started.

Can anyone get the above to run?

Can anyone share a "Hello wold" demo?

Thanks - new user. . .


Ben Hardill

unread,
Nov 14, 2016, 4:51:21 PM11/14/16
to Node-RED
Frank,

The Home Skill Bridge is in review by Amazon at the moment, hopefully it will turn up in the Skill list soon. The node was published to npm to allow the beta test team to install it.

As for the node-red-contrib-alexa node, you still need to have a Amazon developer account to create the skill which you then hook up to that node, which is not all that novice friendly. I'm also trying to get a couple of bugs fixed in it so it can run when Node-RED is deployed on Bluemix (or had the admin route changed)

Ben

Frank Marshall

unread,
Nov 15, 2016, 4:42:40 AM11/15/16
to Node-RED
Thanks - it might just be possible for a would be power user - I have an account.

I am amazed by the accuracy and I guess self improvement of my Alexa Dot. This is going to be very big. It would be even bigger if you could use it (or Google Now) just by talking to an always-on chest mounted microphone where ever you are. As a hearing aid user with bluetooth I am all set! But phones do not listen all the time like Alexa.

With Node-RED the Maker community can fuel the explosion.
. . . but with just a bit more help . .


Ben Hardill

unread,
Nov 15, 2016, 5:56:03 AM11/15/16
to Node-RED
Android phones can listen al the time for the 'OK, Google' keyword and the new Google Pixel phones have the full Google assistant hooked up to that.

I have a Google Home as well, just waiting for the APIs to go live in December

Csongor Varga

unread,
Nov 15, 2016, 7:13:04 AM11/15/16
to Node-RED
I am interested in the development of this topic. A friend of mine has an Alexa which he is not using. So I will get it from him to test it out for a few months. I would be interested to try it out.

Can you also use Alexa to announce stuff to you? Or it can only respond to a command?

Peter Scargill

unread,
Nov 15, 2016, 7:57:55 AM11/15/16
to Node-RED
I'm interested in this and got very excited when I saw this in the list of Node-Red nodes - then of course - nothing in the App set of Skills - so at least now we know why. 


The documentation does not help as lot - htere are some symbols for arguments which don't seem to have any description?I hope that will be resolved.

Also - we developed our own skill - which lets us pull words in from Echo - and do with them what we want, in turn returning text to Echo which it then speaks - so instead of the usual (and fairly useless) "ok" we can say "ok, the kitchen lights have now been turned on" - so you know that what you wanted actually has happened. I first realised the need for this when testing one of the simpler nodes elsewhere "Set the heat to 19" - it said OK but actually set it to 90. 

You really do need some feedback from the Echo - will this skill allow this?  

Ok why don't I just use our own skill - well we DO but it needs an SSL certificate. Wny is that a problem? Well it is marginally tricky - but then someone has recently wrote a script to make it easy to self-certify.. and that works well, but then I found out that my modem in Spain, despite disabling management and VPN will simply NOT redirect port 443 internally... why is THAT a problem? 

Because for reasons beyond me, Amazon INSIST on using port 443.  I can redirect any port for SSL - except 443.  Hoping this tool goes some way to getting around this.


On Monday, 14 November 2016 21:04:46 UTC, Frank Marshall wrote:

Julian Knight

unread,
Nov 15, 2016, 11:50:29 AM11/15/16
to Node-RED
"Set the heat to 19" - it said OK but actually set it to 90. - now that's an error that could ruin your day! :-)

Frank Marshall

unread,
Nov 16, 2016, 8:12:04 AM11/16/16
to Node-RED

Peter,

You say -

"Also - we developed our own skill - which lets us pull words in from Echo - and do with them what we want"

Have you published how you did this?

That would be a good start.

Frank Marshall

unread,
Nov 16, 2016, 8:24:27 AM11/16/16
to Node-RED

Ben,


"Android phones can listen al the time for the 'OK, Google' keyword"

I read elsewhere that they have to be showing the home screen - the first one you see before swiping to see the apps menu.
That seems to be all mine does too.

I wonder if there will be an Alexa app for phones like OK, Google.

Following makermusings I have emulated the WeeMo and can do off and on to 16 devices living in a Pi.
Alexa  can make any Bash/Python etc  script run provided you use on and off in the command.
http://www.sunspot.co.uk/Projects/raspberrypi_LAN_master/Alexa/Alexa.html

 

Peter Scargill

unread,
Nov 16, 2016, 1:42:41 PM11/16/16
to Node-RED
Hi Frank... ok hang on....

Here it is - 

Ben Hardill

unread,
Nov 16, 2016, 1:49:24 PM11/16/16
to Node-RED
Peter,

What's not obvious?

% = set percentage
+% = increment percentage
-% decrement percentage

same for temperature and all the icons have mouse over text to explain.

And as I said in the defect, the node was published to allow Amazon to test it, once it's approved it will appear in the skill list.


On Tuesday, 15 November 2016 12:57:55 UTC, Peter Scargill wrote:

Stuart Poulton

unread,
Nov 17, 2016, 2:22:45 AM11/17/16
to Node-RED
Peter - Great write-up, certainly gives lots of scope for interactions with Alexa .

As there are two sides to this coin, I thought I'd  highlight here is a difference that you approach and Ben's approach gives. That being the pattern of words used (both of which have good use cases), Lets look at the simple example of turning  the lounge lights off

The two approaches would be as follows

"Alexa, tell the house lounge lights off" - Peter

"Alexa, lounge lights off" - Ben

So why the difference, there is already a defined home skill pattern (which Ben makes use of) that has a limited set of functionality and is mainly aimed at things you can turn on, off, up or down, limited use, but does it make for an easier interaction ?

At the end of the day for those of us developing our own solutions it's a question of personal choice, and capability to design a working system. 

But thank you both (Peter, and Ben) for bringing voice interaction to our node-red environments.

Stuart


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/24ebd0c4-3ad4-4cf6-9a0f-fb74f43e1e21%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Peter Scargill

unread,
Nov 17, 2016, 3:30:24 AM11/17/16
to Node-RED
Hi there Stuart

There is indeed room in this world for both mechanisms.

Alright - there are a number of solutions out there, easy to use and without messing with HTTPS which will let you do:

"Alexa, lounge lights off"

to which the response will be "OK" and for many that will be fine and I am certainly not knocking the effort that people have put in to make this work.

Remember X-10 - the original home control protocol (or one of them). You could turn a light on and unless you were there, just hope that it worked. Of course in that situation if you were in the room you KNEW whether or not it had worked and so that would be fine.

Let's take a slightly different example.

"Alexa turn the bedroom heating to 19 degrees".

Trust me when I tell you that when it says "OK" it could quite easily have turned the bathroom heating to 90 degrees.

And that is because of an annoying feature of Alexa in that it accepts the words you speak OR any similar sounding word in the dictionary.

So - would it not be better if Alexa responded "Ok, I've set the bedroom heating to 19 degree".

Indeed with an early background in computer adventures I'm just about finished with a version that can remember the object in question and do something like:

"Alexa tell computer to turn the bathroom heating to 19 degrees and the kitchen light on"
"Alex tell computer to turn it off"

(Clearly referring to the last used object - remind anyone of original Adventure?)

That is what our version does - and if it does not understand it says "Sorry, computer thought you said 'ballroom eating 90 degrees'". You can then very easily pop into Node-Red and add ballroom as an alternative to bedroom if you wish - or start speaking more clearly.

When you are playing with this on your own it's fine - you can adjust your voice accordingly but when you hand the reins over to your married partner - in my case my wife who's accent is very different to mine (I'm UK she's US) the LAST thing you want is "you spent WHAT on this thing?"  

And that is the focus of the direction that we went in with this. By being able not only to parse the sentences coming out but return any arbitrary text and variable information back. The only thing we're missing is the ability to constantly interact - it's a case of one sentence in - one sentence back - and as soon as someone improves on that while staying in Node-Red, our code will go in the bin :-)

Regards

Pete.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Ben Hardill

unread,
Nov 19, 2016, 3:00:49 PM11/19/16
to Node-RED
When setting temperatures with the smart home skills Alexa replies with the temperature it's been set to and you can set accepted ranges, so it should never let you set a horrifically out of whack value.
Reply all
Reply to author
Forward
0 new messages