Amazon Echo Skill for OpenHAB available!

Hi @dapanda,

What does your ‘/home/alexa/node_modules/alexa-app-server/api/server.js’ look like? What version of node are you running?? Feel free to PM me these details and I am happy to help further.

Best regards,
.

@dapanda - my bad, after studying further my server.js does reference json.password. This is an additional security check baked in, which should match a randomly generated password you define in your config.js, just as you suggested!

Set the config.password (in apps/alexa-ha/config.js) to match… and then its used to access the endpoint:

Set your endpoint - this is a URL to your publicly accessible Alexa-App-Server’s skill endpoint. For example: ‘https://MY_FQDN/api/alexa-ha?password=CONFIG_PASSWORD’ or ‘https://MY_PUBLIC_IP/api/alexa-ha?password=CONFIG_PASSWORD’.

Hope this helps!
.

1 Like

I came across this nice feature on how to get echo to play netflix:

Thank you so much for your reply!

I have setup same password in both server and config files. Using the same password at address bar, but still getting the same error

TypeError: Cannot read property 'toString' of undefined

Which files would you like me to share? Both server.js and config.js?
Thank you for all your development time for this community! Your help is much appreciated!

Really want to get this working. Hopefully it works well enough to stop me from changing to Google Home :wink: My wife really wants me to stop spending on Home Automation. :joy:

have you guys seen this sweet project?

Hmmmm, for me “L.U.C.Y” and the big screen it runs on seems very intrusive (and power hungry)

Ignoring the size of it, the whole video was conceptual.

It doesn’t matter what device you stick a voice activated assistant in, it is the software that will make or break it. At the moment the only functional demo of the voice control is in the gallery when he asks LUCY to “show me some art” a picture appears on the display and the demo ends. Not impressive at all.

Not sure many will like the idea of having such a dominant presence on the wall to control their lights and thermostat, though I am sure there will be plenty that do. Good luck to them. They will need it in a market where you are going to be compared from launch to Amazon Echo, Google Home and Siri.

Got my puck today! ok dot. Pretty darn fun. Now the real fun! Thanks for the great thread and all the work!

what are the requirements for the ha server? can it run a zero or a pine?

thanks!

I got 2 dots today also! It’s a nice little device. I know i’m pretty exhausted, it’s been a very long day, but OMG this is complicated.

I’m tapping out for the night.

I’m stuck on this error:

~/node_modules/alexa-app-server/api$ node server.js
/home/alexa/node_modules/alexa-app-server/api/server.js:11
validate it...
         ^^
SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:974:3

Maybe we could make a script that install requirements(node.js and so on) and make a config file echo.cfg where you put in your credentials for all the needed tools. Just an idea to make it easier for newbies to get it running.

I also received by Dot yesterday. Having done most of the prep work beforehand I was hoping to get this working straight away. Although I’m pretty much there my main issue is with the Self Signed SSL Certificate. I’ve followed the instructions on here as well as the recommendation from Amazon but it’s not being accepted. Any ideas.

On a side note, I much prefer CentOS to Ubuntu. Has anyone got this working with CentOS yet? Rather than faffing around I’ve simply followed the instructions and built a VM with Ubuntu installed.

So I guess I was just to sleepy last night. This made more sense today. I was able to get the skill created and setup alexa-ha and started but i’m still unable to use this. Not sure what I did wrong but i think it’s on the skill creation side. When I test the skill I get the following response “The remote endpoint could not be called, or the response it returned was invalid.”. I tried setting the HTTPS endpoint to the FQDN name and my external IP address with no luck. When I look at my firewall logs I don’t see any attempts to connect from Amazon. If I RDP to a remote system and use the same URL in a browser I get a response and I see the traffic in my firewall logs.

The only thing I can think of is I didn’t set a password as I’m not 100% on how to do that. However, I would expect to at least see a connection attempt on my firewall. I’m not sure where to go from here can any one help?

Pretty minimal, as long as you can run NodeJS you should be fine with either!

That would be awesome. Wish I had the time to tackle this to simplify the setup for everyone…

Please share any error(s) you experience when submitting the SSL cert. I would suggest regenerating it from scratch when trying any different openssl options… Regarding CentOS, it should work just fine on any OS that can run NodeJS, but yes the setup instructions may be a bit different (yum instead of apt-get, configuration file paths, etc).

From recollection it must be on port 443 for this to work - an Amazon requirement… Also the skill tester didn’t always work for me in the past, so I wouldn’t rely on that directly for validating your setup. Regarding the password, try commenting out that check in index.js, but I doubt that is the problem based on your description. Then issue commands directly on your Echo to see it hit your firewall/endpoint. Best of luck!

.

Yea, that was my problem. Really sucks Amazon wont give us flexibility on port 443.

I have a few items defined in the config file and i’m able to issue verbal commands and control some of my devices, AWESOME!!! I see a potential problem when using multiple amazon accounts. Since the skills are link to the specific account it’s not available when switching profiles. Even after creating and installing the skill for all accounts the username and application ID will be different (just a guess). In theory if I change the index.js file to test in the positive and add an OR operator i should be able to use one endpoint for multiple skills. I’m not at that point yet thought so just a guess…

I’m curious, Is there anyway to use the Smart Home Skill API vs the custom so I don’t have to use a invocation name?

@d0t
The problem is there is no error reported when I submit the Self Signed SSL, the tick doesn’t turn Green. I’ve not resolved this by purchasing a wildcard SSL and uploaded that.

My next issue is when I run node server.js I get an error regarding the Certificate. So also I’ve now been able to submit my skill I can’t use it yet until I resolve this Certificate issue.

If anyone can point in the right direction on importing SSL Certificates and troubleshooting I’d appreciate

Thanks

Garry.

The included instructions for generating the cert didn’t work for me either. The dev portal just wouldn’t accept it. I’m on my phone so sorry for the vague directions, but some where on the cert page in the portal there is a link for help with the cert. There you’ll find step by step directions to create a cert. when done, open the cert and copy/paste the contents to the portal(copy everything). That worked for me and I was able to test however, it doesn’t light up as done like everything else. Hope that helps…

O, also in the server.js file you want to make sure the path and cert name is correct. If you follow my instructions above you’ll have to make changes here.

If you have a valid/trusted SSL certificate, you do not need to upload it to AWS. Uploading is only required for self signed certs!

Please share the error and as much detail as possible here; we will get it solved.

You do not need to submit your skill! This setup is designed to be a skill for you and only you to use; publishing it would make it available to the public.

@sc1982

Thanks a lot for helping out others here; sorry I missed your earlier question!

Smart Home Skill API cannot do much of what Alexa HA’s custom skill offers (custom commands/intents/responses/etc). @digitaldan and I have done some work with the Smart Home API as well - and will eventually publish an official OpenHAB skill which works with my.openhab.org to control your devices. This will make setup a breeze, and allow you to switch/dim stuff without using the skills invocation name. No time frame on when that will available yet though.

Do note that even today you could setup something similar by using the HA Bridge along with Alexa HA. This way you can switch/dim/etc without any invocation name, but still use Alexa HA when you want it! I’ve been using the two together for quite a while, but tend to use Alexa HA for everything…

Howdy all, I’m late to the party and looking to get my Amazon Echo working with openHAB. I must admin I am having a hard time following through the thread to figure out how to use the skill.

My openHAB is running on a windows machine (had media center already so saved me some time).
Is this the best option to make my attempt at this time?

Thanks!

You would probably want to have OpenHab and Alexa-HA on different machines, since you will need to open it to the internet (443 only).
You best bet is to follow Quickstart. Just set up some VM (VirtualBox or equipvalent) and install Ubuntu.