Echo Speaks - Heroku new deployment workarounds

NOTE: Heroku no longer has a free option, so you may need to give a credit card and pay monthly to setup a new deployment. If you have any sort of always-on computer at home you can use a local server for free: [GUIDE] Echo Speaks Server on Docker (or without)

Heroku new deployment workarounds for Echo Speaks

If you are trying to deploy a new Heroku server for Echo Speaks...
You may be getting this right after you deploy:
image

And/Or this when trying to log into Amazon:
image


Heroku is now adding another string to the url, and the "hostUrl" variable is not (cannot be) set to contain the full url upon deployment.

Example hostUrl set when deployed: echo-speaks-XXXXXXXXX.herokuapp.com
Fixed hostUrl: echo-speaks-XXXXXXXXX-YYYYYYYYYY.herokuapp.com

Heroku hostUrl Workaround

  • First deploy the server using the normal process.
  • Then go to https://dashboard.heroku.com/apps and log in if needed.
  • Click on your server instance to view it (echo-speaks-XXXXXXXXX)
  • Right-Click the "Open App" button and select to Copy Link
  • Click on the Settings tab
  • Click Reveal Config Vars
  • Click the pencil to edit the hostUrl
  • Clear the entry box and right click then paste
  • Remove the http:// from front and / from the end. Like this:
    image
  • Click Save Changes
  • Click More > Restart (Menu at top of page)
  • Click Open App button and then log in to Amazon

Echo Speaks App Server URL Workaround

Now we need to have a way to tell the ES app on Hubitat about the correct server URL.

  • On Hubitat go to Apps Code > Echo Speaks
  • Click Import Button and use this URL: https://gist.githubusercontent.com/jtp10181/2ae337b24df2e0bed593641f6096800b/raw/echo-speaks.groovy
  • Click Save
  • Now go to the Apps List > Echo Speaks
  • Click Alexa Login Service button
  • Click Manage Cookie Login Service
  • On your Heroku Dashboard right click Open App and select Copy Link
  • On Hubitat Paste the link into the Server Host Override settings box, and press enter
  • Example: image
  • Click the Amazon Login Page button and confirm it opens the Heroku app in the pop up.
  • Thats it! Should be fully operational now.

Here is the diff from the original code to my patch if you want to review it:
-- Revisions · Echo Speaks - Heroku Server Host Override · GitHub

Hope this helps you all get Echo-Speaks working again!

7 Likes

Works perfectly! Thank you.

2 Likes

Hey there, got everything to work and they're all showing on my hubitat now. But only problem I'm having is thag they're showing all offline, except one of my devices (firetv) that's the only showing online and wondering if they all should be showing online?

Mine all show as online. Can you send TTS messages to them from the devices that got created? That's a good way to test it.

No I can't and I think the reason is because they're offline

Do you have the devices showing as offline on a segregated VLAN or behind some sort of firewall or DNS blocking system (like pi-hole)? I suspect they might be having issues checking in to one of the amazon services so the system thinks they are offline.

BTW the offline problem really has nothing to with Echo Speaks, the app is only reporting to you the info it gets from Amazon. So Amazon thinks they are offline.

1 Like

Hello friends, I get this, but my speakers still work, should I change it or leave it as is?

With the cookie refresh not working, it may stop working at any time. Supposedly it is only supposed to work for a few weeks but a lot of people have reported it still works 200+ days later.

2 Likes

Sorry for the stupidity but don't really know what u mean by that. Very new to all this and doing as a hobby but all my devices at home are online and working normally. Except for two of them that I don't really use but all the other ones shows offline and are not working and tested all of them. Here some pictures to maybe help


When you say at the beginning of the lines that we implemented the server again, what do you mean, that everything is deleted and we reinstall it from scratch?

Its no a problem with Echo Speaks that I know of, it just gets the status info from the Amazon/Alexa server. So the app is being told the devices are offline by Amazon.

You might have better luck over on the actual Echo Speaks post or making a new post, maybe someone else has had this issue and will know how to fix it.

Fair warning, Heroku does not have a free option anymore so you may have to give them a credit card. You can do a local server free if you have an always on machine at home.

To re-deploy the Heroku server you would want to log into your Heroku dashboard, delete any existing sever instances. Then in the ES app on Hubitat reset the cookie server info Under Alexa Login Services > Manage Cookie Login Service > Reset Options > Reset Service Data. Turn that on then press done and close the app. Go back in and you can then re-deploy the server.

1 Like

I am paying 5 euros for the Heroku service, which I don't understand because the cookies are not updated, I just realized now. So would I have to delete everything and implement it again?

Thank you so much for your help and not sure if I should have said but I'm in the UK and the reason it wasn't working was I was putting amazon.co.uk but changed to amazon.com and now all of them are online and working. Thanks you so much for your help

2 Likes

No, you dont need to delete everything. I already explained what you should do above.

2 Likes

Thanks bro!

I have been having the damnest time getting the login to work and would appreciate any trouble-shooting help anyone could provide.

I am able to go through and edit the hostURL as outlined, save that, and restart. I then Open App and go through the Amazon login. It accepts my password, captcha, and Authenticator code but then spits back the following error...
Picture1

The logs confirm it's using the hostURL, but the status seems to show a 404...

I assume I must be missing a step somewhere, but I've tried this several times over the past week, re-reading the instructions each time, and I keep getting the same result. Any suggestions or guidance would be appreciated.

I think the library being used is outdated and only supports certain 2FA methods. I am using an authenticator app to get the 6 digit code for my account and that works. There was one other user who posted and was having issues, finally figured out that switching the 2FA method fixed it.

Do you mind my asking which authenticator app you're using? I'm currently using Google's on Android.

I use Authy on iOS. Should not matter which app, they all use the same method to generate the codes. Not sure why its not working for you.

I've followed the steps to update the heroku variable
imported the ES code, rebooted hub and i cannot ever get to the screen to update server override

I see it in the code....but cannot update....
How do i get to that screen?