Echo Speaks / Heroku end anxiety support group. See one solution below. 🙂

To answer @hal3’s question the reason Heroku or now a “computer server service” is required is that Amazon doesn’t have an official API to speak on an Echo. To get around this solutions like Echo Speaks have to generate an authentication cookie so it can invoke the TTS speak command via unofficial APIs as if you are doing this via computer web browser. The authentication cookie expires periodically so this service will reauthenticate to keep Echo Speaks working.

Given this is using unofficial APIs this could stop working at any time, addressing @djh_wolf’s question. Echo Speaks has been around for several years using these APIs so hopefully this won’t happen.

2 Likes

Thanks!

I have portainer running and logged in from my PC!

I will have to play with it a bit to see what I can do.

I've been playing with alternatives and for the time being I have Echo Speaks disabled. The handful of announcements that I want have been well served with Alexa routines. Not local is OK for me, None of the announcements are mission critical and our internet service is very rarely interrupted.
The Alexa skill, My Audio, enables playing an uploaded mp3 from Alexa based on a trigger from Hubitat. Audio files are uploaded to https://personalaudio.in/ I wanted to try an mp3 of the old AOL "You've got mail."

From the author of the skiii,
" Hi Bill,

Thanks for using my skill.

It is possible to use the skill in routine, lot of my users are using it, I have attached the snapshots of a sample routine and steps below:-

The steps are :-

  1. Let's create a new routine with the name "morning"

  2. Under the step "When this happens ", select "Voice" and enter phrase "Good morning".

  3. Under the step "Add Action" add "Customised" Action and enter the "Open my audio and play game", here "game" is my invocation name.

After 1-2 minutes, you can test this routine on your device."

Screenshot of my Alexa routine.

2 Likes

Progress!

I had to generate a public SSH key and link it to my Github account.

Moving forward

remote: Enumerating objects: 1615, done.
remote: Counting objects: 100% (468/468), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 1615 (delta 427), reused 419 (delta 419), pack-reused 1147
Receiving objects: 100% (1615/1615), 764.00 KiB | 4.47 MiB/s, done.
Resolving deltas: 100% (1081/1081), done.

I believe they are a brand of trousers

2 Likes

Ok, I have gotten my local Echo Speaks server working. In my case, I created it inside of a LXD container. You can use a Pi or a VM also. I tried the Docker container solution and it worked fine, but was more complicated than needed.

In my case, I used a LXD container that was Ubuntu 22.04.

So, on my LXD container, I simply installed the app with these steps.

sudo apt install nodejs
sudo apt install npm
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

You will want to set a static address on the instance where the Echo-Speaks server is running.

Next you will want to go to your Echo-Speaks app page on the Hubitat skill and choose the reset options loggle.


Once you toggle the reset data option, click the next and the done to exit the app page.

When you go back into the app, turn off the toggle to deploy to Heroku and you will get this screen.

Next, click on the "Deploy Server"
image

You will get a popup screen with a callback URL.

Copy the entire section in gray and then visit your Echo Speaks URL on the local server you built which will have your address with port 8091. In my case http://172.16.3.3:8091.

Paste the callback URL into the last field labelled callback URL and then click save settings.
You can exit this screen.

When you exit the screen with the gray block for the call back URL that you copied, the app should change to a screen like this.

When you click the amazon login page option, you will get a screen like this:

Click the go to login page option.

Once you type in your credentials, your screen should look like this.

At this point, you can exit that login screen and your Echo-Speaks app page on your echo speaks skill should refresh and look like this:

This means that Echo Speaks is working and using your local network (non-Heroku Cloud) for its login/cookie server.

VERY IMPORTANT: So, mine failed to tell me that I had logged in when I exited the login screen saying I was logged in. If this happens to you, simply reboot your LXD instance, your VM instance or your Pi and try the login again. That's what ultimately fixed it for me.

Hope this helps!

12 Likes

Went through this process and am stuck at

sudo pm2 startup

I get an error message “Init system not found”. Anyone knows what this means? TIA!

Ralph, normally the pm2 startup error would only happen if you are trying to run node.js under windows which is not supported.

@vmsman - great write up, I was able to follow it and get the server running on my Linux box. I didn't use LXD container (not familiar with containers), but was able to install the nodejs, npm and started the index.js.

Everything went pretty smoothly until I got stuck on the Amazon login (as you indicated), I ended up just stopping then restarting the index.js and then re-tried the Amazon login... and it worked.

sudo pm2 stop index.js
sudo pm2 start index.js

I mainly use Echo Speaks for controlling devices that only integrate with Alexa and not Hubitat. I use the "Voice CMD As Text" option and create routines in HE to control these Alexa only devices... and have become dependent on it.

Anyway... So happy to have my own local server and be free from Heroku, thanks again!

2 Likes

Thank you for the detailed instructions!

Are you saying that I can run this on my Pi in Pi OS without a container - like Docker in my case? That would simplify things for me.

I was not thinking about a static IP but that makes sense. I'm guessing a static local IP address for the Pi on my network, like 192.168.1.11, is not what we are talking about.

I am on Google Fiber. I know that there are various ways to set up a (free) static IP using outside services. If anyone knows a link to a good static IP service and a recipe I would certainly appreciate the information.

I may have asked this before. Is there a way to setup Alexa speaks on a windows 10 computer? I have one on 24/7.
If there is please include directions.
Thanks in advance.

Setup a VM that runs Linux. And install it there.

1 Like

I have no idea how to accomplish this.

1 Like

No, a LAN IP address for your RPi that doesn’t change. Don’t worry about your public/WAN IP address.

“Static IP” can be a confusing term, in that “static” means unchanging. But your router is probably using DHCP to assign IP addresses on your LAN. So what you want is a DHCP reservation, which is done in your router’s settings page.

The RPi continues to use DHCP, but it’s IP address won’t change because you told the router to always give it the same one.

“Static IP” in networking terminology means something different. So ignore that for now.

If you’re using a Pro (not home) version of Windows it’s easy with built-in (but optional to enable) features like Windows Subsystem for Linux and Hyper-V.

If you’re using a home version of windows, it’s not that hard but you may need to install an app like VMWare to create the VM.

1 Like

Yes, my instructions assume that you will not be using Docker. The downside of using the Pi in this way might be that it would be perhaps a little harder to use the Pi for other applications at the same time. All that Docker does is to provide application virtualization through isolation in a container.

Scott, interesting use case. I use several Webcore pistons in my environment to facilitate calls to Echo Speaks for several informational and reactional speech responses. For me, I make Alexa simply a peripheral to HE. That means that I have the Hubitat skill enabled on Alexa, but I try not to specifically pair devices with Alexa. Part of that is that I want local control for all of my devices. Some time stop by my YouTube channel https://youtube.com/@scottibyte.

1 Like

Got it. thanks!
I am familiar with fixed IP addresses on my LAN.

1 Like

Yup that’s what UniFi calls DHCP reservation :+1:.

1 Like

OK, any suggestions on a lightweight version of Linux? I haven't done this before, will probably have to spend some time on Youtube to figure this out.