I’m getting the error message “unexpected token E”… I used the generate sha1 password and used that in the password field. My plain text username in the username field.
2016-01-19T22:25:43.547Z 9370a5d6-befb-11e5-b38f-752ca0eea547 discovery for accessToken enterAccessToken
2016-01-19T22:25:44.014Z 9370a5d6-befb-11e5-b38f-752ca0eea547 SyntaxError: Unexpected token E
at Object.parse (native)
at IncomingMessage. (/var/task/index.js:381:27)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)
That error message should come from line 380, but your stack trace says line 381. Make sure you haven’t accidentally changed anything else. You shouldn’t have to change the server name either - the updated version on github has the right server.
The error message is that your credentials are wrong. When you typed them in to the web page, you perhaps didn’t enter your username. You need to enter both username and password to get your access string. I’ve updated the web page on github to make that obvious. If you did enter both, perhaps you entered the values incorrectly?
If you have some coding skills, UI5 is actually much much easier to integrate. You don’t need all of the code to do the session tokens. Just make a call to https://sta1.mios.com/locator_json.php?username={username} in getAuthToken to get the relay server in JSON format, and then call to https://{relay server}/{username}/{password}/{serial}/data_request?id= for the discovery and device control requests. About half the code can come out because of the simpler UI5 security.
[quote=“martin12345, post:1, topic:189448”]I have written a native Amazon Echo integration for the Vera - i.e. it gets added as a Device Link, and the devices can be controlled just by saying “Alexa, turn Living Room on” and so on. It doesn’t require you to be running any local server like the bridge solution - it all runs from the Amazon cloud.
Martin[/quote]
If this is running in the cloud, then you won’t be able to run any voice command if your internet is down. Having a Vera to Alexa bridge on a PC or Raspberry PI should allow you to run a command locally even if the internet is down.
While I like the idea of having this running within Alexa (AWS based) I am reluctant so I stopped my testing and integration following your instructions.
[quote=“Pseudomizer, post:47, topic:189448”][quote=“martin12345, post:1, topic:189448”]I have written a native Amazon Echo integration for the Vera - i.e. it gets added as a Device Link, and the devices can be controlled just by saying “Alexa, turn Living Room on” and so on. It doesn’t require you to be running any local server like the bridge solution - it all runs from the Amazon cloud.
Martin[/quote]
If this is running in the cloud, then you won’t be able to run any voice command if your internet is down. Having a Vera to Alexa bridge on a PC or Raspberry PI should allow you to run a command locally even if the internet is down.
While I like the idea of having this running within Alexa (AWS based) I am reluctant so I stopped my testing and integration following your instructions.
Thoughts?[/quote]
No, that’s not correct. If your internet is down, your Echo can’t understand what you say in the first place. It needs an internet connection to turn your speech in to text that can be acted on. So neither the bridge solution nor the full solution will work if your internet is down.
The bridge solution depends on your Echo, Amazon’s service, a local computer and your vera all being working. The native solution takes one step out of that, and just needs your Echo, Amazon’s service, and your vera all being working. So it’s inherently more reliable.
[quote=“Pseudomizer, post:47, topic:189448”][quote=“martin12345, post:1, topic:189448”]I have written a native Amazon Echo integration for the Vera - i.e. it gets added as a Device Link, and the devices can be controlled just by saying “Alexa, turn Living Room on” and so on. It doesn’t require you to be running any local server like the bridge solution - it all runs from the Amazon cloud.
Martin[/quote]
If this is running in the cloud, then you won’t be able to run any voice command if your internet is down. Having a Vera to Alexa bridge on a PC or Raspberry PI should allow you to run a command locally even if the internet is down.
While I like the idea of having this running within Alexa (AWS based) I am reluctant so I stopped my testing and integration following your instructions.
Thoughts?[/quote]
As the last poster said, your forgetting the fact that ECHO doesn’t have any logic built in it. ECHO is a speaker, mic and wifi modual in a box and all internet based for it’s logic. You speak and the mic sends you voice to the internet for translation then it comes back to the speaker from the web. Without the internet ECHO alone can do nothing let alone the rest of the bridge to vera stuff.
The steps it takes (create free AWS account, create OAuth service, create Lambda function, send e-mail to Amazon) should take about half an hour, but if anyone else has feedback on how long it took them, I’d love to hear, as well as any suggestions for making it faster. Once you have finished those steps, you need to wait a day for the Amazon folks to flick the switch on their end. It can be a lot faster (took 15 mins the first time I e-mailed them), but don’t hold your breath waiting for an instant e-mail response from them.
I am stuck early on. Please see PDF. Did I guess the correct settings so far? When, how, do I email Amazon, and where do I locate the items you reference on page 2 of your instructions, to send to Amazon?
I received confirmation from Amazon but when I open the Alexa app and click on link with Vera, I get an error saying “an error occurred while attempting to link Alexa with the external provider. Please try again later.”
The test worked on lambda. I will try to go through all the steps again to make sure I have everything right.