[RELEASE] Echo Speaks V4

Came here, of course, due to the Heroku email I received today... Found this little comparison of alternatives on Reddit:

Also wondering if we can dockerize the server application, as I wouldn't mind running my local version from my Synology NAS, I have many other containers running on there already... What's one more? :slight_smile:

2 Likes

From what I understand, the Heroku app takes care of maintaining the connection to Amazon and brokering the requests - it acts as a broker to offload the processing from the Hubitat.

While the HE skill is enough to control lights with Alexa, Echo Speaks lets you send requests back to your Amazon account -- requests like playing music on a Dot. The Heroku app is (currently) a necessary component of that equation.

So all that is happening with heroku being the case (have to deal with reality) can anyone who is running heroku server locally on say a RPi or windows document a step-by-step on how they did it and how to get Echo Speaks and HE to use it? Looking to get something set up by November! Donโ€™t know squat about NodeJS but can at least follow cookbook style instructions.

To clarify, you're using Heroku as a cloud platform to run what is probably a NodeJs app. You'd simply run the NodeJs app directly on your own always-on computer, such as an RPi. You'll need to have nodejs installed on your computer. Possibly along with something like pm2 to ensure your application restarts should it crash for whatever reason.

@tonesto7 has said he'll post instructions in the post linked to by @marktheknife just a few posts above yours.

FWIW, nodejs and pm2 are easy to install, and I use them to run a number of other nodejs applications I use to support my Hubitat hub.

4 Likes

Thank you for the clarification. Sorry I missed the previous post (probably too upset when I heard of Herokuโ€™s plans :scream: :rofl: ). So the local solution would basically take Heroku out of the equation and NodeJs would interact with the Alexa API directly? Sorry, it is clear that I am not at all clear or knowledgeable in this but would like to learn (always trying to learn). Thanks for your help!

1 Like

Yes, that is an accurate description.

1 Like

The local version is having problems getting the cookie/token from Amazon. If you know some command line things for npm and node then it's not that hard to run the server on Linux. Packaging it up all nice and pretty for those that don't have those skills is more than getting a docker container set up. Assuming it works again.

Hi @ccoupe. Can you elaborate on this (are you having problems with this and can describe, or can you refer me to some threads discussing this)? Again, I wish to learn as I am a complete novice regarding NodeJs. Thanks!

@moh - First I am not a NodeJs practitioner, but it is similar enough to many languages that I do know that I'm not intimidated by NodeJs. Once you get the server running you can watch the server logs and find the areas in the code of concern. However the echo-speaks-server uses a http server framework. I do not know the ins and outs of that code and I don't want to unless I really need to. There are also 'futures' and I really really really do not want to know that much. Unless I need to.

Getting the cookie/login-token from amazon was a common problem with previous versions of echo speaks. I could probably find a clue in the many messages above. If/when the 'official' version is out, I'll switch to it.

1 Like

Once I removed the cookie for alexa.com I was able to login to alexa, get the cookie and I can send a text to one of my echo's. I know some people are really anxious but there is a way forward. I'd prefer @tonesto7 do the remaining work on his container - it's not my place to grab his project and I'm the wrong person for long term support.

Hi all,
Here's a thread of the rabbit hole I went down to get the local server running on an RPi. It's not a 'for dummies' set of instructions but it does list the steps and I noted anything I came across to get it running. Been working fine (knock on wood) for months now. Hopefully this can help.

6 Likes

PS - I did propose some time ago a project (Raspberry companion for Hubitat) where a Raspberry Pi wold be configured with Docker and the community would provide containers for various functions, e.g. local mail server, local backup server, WebCore local and so on - and, of course, local Echo Speaks to replace Heroku!

The problem with at least some of that request is a few of those things (mail server, backup server) could be filled by several different solutions and not everyone would be happy with an all-in-one solution. There's a ton of different containers on Docker Hub (and a few other places like AC, GHCR, GCR, etc) you can use to fill in your needs. Getting Docker running on a Pi is the least of the problems, that's pretty easy (I'm using it locally under Ubuntu on my Pi).

It looks, at least, like there is effort to replace the Heroic dependency with the option for a local instance, so that will be a good option once it's properly supported.

If you have any questions about running Docker and other tools on the Pi, feel free to message me directly so we don't derail this topic more.

Would be nice to get a for dummies set of instructions for dummies like me

2 Likes

Hopefully a full blown docker version is in the works. If not then believe me, I'm no expert but the steps shown did work and I noted the tweaks I needed to make. It's been over half a year since I did it so don't remember any more gotchas although I'm pretty sure I wrote down everything needed at the time in the other thread.

2 Likes

Got my RPI out installed the latest OS and I am updating now.

So next I am going to try and figure out the GITHUB clone deal, wish me luck.

2 Likes

Assuming npm is already installed, for a raspberry pi: (adapted from a post by VilifiedFerret.

npm i https://github.com/tonesto7/echo-speaks-server
sudo npm install -g pm2
cd node_modules/echo-speaks-server
sudo pm2 start index.js
sudo pm2 list
sudo pm2 save
sudo pm2 startup
sudo pm2 save

Once that is running you need to configure insert the callback url from the habitat echo-speaks config page into http://RPI_IP_ADDRESS:8091 in your browser, then go back to the habitat echo speaks page and login to the local server.

Logging into the Amazon account via the local server took multiple attempts, but worked eventually.

11 Likes

Thanks, npm was not installed, so installing node.js and npm now.

Could you elaborate a bit on this part.

By go back to the habitat speaks page and login you mean in HE correct?

I assume I need to remove the heroku setup?

[edit]
Ok I think I figured this out.

When you say logging took several attempts. When I log in it says the cookie is retrieved but when I return to echo speaks it says I still need to login. Just keep trying?

Edit again

Looks like it is working

Yes, you need to reset the server setup as described in: echo-speaks-docs/support/server_removal

Once that is done, follow the server config guide but deselect the "Deploy server to Heroku" switch to use the local server instead: echo-speaks-docs/configuration/config_server

It will give you a callback url to enter in http://RPI_IP_ADDRESS:8091 . Then go back to the habitat page and close the popup. It will prompt you to login to your Amazon account.

Recommend you suspend the Heroku instance rather than removing it incase Heroku is no longer allowing new free instances to be created. This allows you to go back to Heroku if you have problems with the local server. Heroku offer a maintenance mode option in the dashboard for your deployed echo-speaks server you can use.

2 Likes