[GUIDE] Echo Speaks Server on Docker (or without)

Bingo that worked!
So the other question...what if on my nephews laptop that is not always on... if he cookies status good, when does echo speak refresh cookies....ie,. when not "good" or proactively while still "good".

Sorry one more q...with the callback having the option of cloud version...is there any chance that I could run a docker container in MN for a cookie server for my nephew in FL ?

Thanks again for all the help.
Tim

A lot of people have gone months with a broken server before they even notice, so I think it will be OK. As long as it is able to refresh it every once and while. He could also force a refresh every couple of weeks while the laptop is running.

The only problem might be that I think the "local" server does not support using an URL as the way for the ES app to contact it, so if your server IP changes then the app wont be able to find it. Might be able to get around it using my patch for Heroku so you can put in a custom URL, but may need to do a fake Heroku deployment and then change the URL to point to a DDNS for your remote server.

So I've had so much trouble with the pi, that I decided to setup port forwarding and want to setup another container with an echo server for my nephew in FL.
I did the following
docker run -e ipAddress=192.168.1.118 -p 8092:8092 --name echo-speaks-server-jeremy --restart=unless-stopped -d tonesto7/echo-speaks-server

when I look at the container ...it says its using port 8091 ...how do I get it to use port 8092

also is the name important ? i.e. is it ok to call it echo-speaks-server-jeremy ?

Thx
Tim

Yes the name can be anything.
The port you have specified is the port forwarding from outside the container to inside it. You also need to tell the server to listed on that port.

Add -e PORT=8092

docker run -e ipAddress=192.168.1.118 -e PORT=8092 -p 8092:8092 --name echo-speaks-server-jeremy --restart=unless-stopped -d tonesto7/echo-speaks-server

To do this you will need to remove the container you created first, so it can be created again with the proper command.

1 Like

thanks again for the help...so i using remote admin (soooo handy), I signed into his hub in FL and installed echo speak and then when I try and configure it, I get the message with the call back info that I need to put on the cookie server... but there is no other options for configuring...I don't see any where I can update the link so that his hub will access my cookie server over the internet ...I need to change it to match the ddns address of the cookie server. What am I missing... thx again !!!!

You could try my patched code here: Echo Speaks - Heroku new deployment workarounds

I do not remember if my patch will show up and work for a local server, or only when you do Heroku. That's why I said you might need to set it up as a Heroku setup but then just point it to your server instead.

1 Like

I imported your code and tried selecting Heroku but never got a chance to pick a serverHostOverride... I'm looking through the code but admittedly not good at it... is there a way for the serverHostOverride to be a box like
image

FYI to access the server remotely its something like

http://xxxxxxx.tplinkdns.com:8092/

well... not sure this will work.... i was expecting the cloud version of the callback to work.... but it did not ...should it ? I tried to execute in MN to go to the Hubitat in FL....from a browser (not sure if thats correct)

i believe the server also has to readch your nas/pi whatever is hosting.. if you can get that on a pass through from a public ip it should work

I have never attempted what you are trying to do, so I have no idea if it will actually work or not. It seems like it should be able to work but it was not coded with that approach in mind. One would think if you set the app up as if it were Heroku and change the server URL using my patched code, it might just work.

does anyone know if I should be able to issue the cloud callback from a web browser ..or is there a different method...
also ..anyone know how the cloud version works... is cloud.hubitat.com hosted by Hubitat Corp. and they somehow route that to the actual hubitat hub?

I have the ddns setup to my cookie server so the hub has a public IP to talk to ...but if I can't get the callback cloud version to work ..it will be back to the pi. My nephews router has no ability to do forwarding

Its possible that you have to do an http POST for it to work, which cannot be done from a browser.
I know it can work from a remote server, people use it with Heroku all the time. Also many people use the cloud url for local servers since that is what the app presents to you.

Yes it is hosted by Hubitat and the Hub ID and token supplied in the URL allows them to redirect requests to the proper hub through the cloud connection. No special router setup is needed for this, the hub talks to the cloud server and sets it up automatically.

1 Like

Great point about heroku working for remote. I will work on adding a dialog for entering hostoveride

I modified the code to allow input for the host override and put
image

The I created the docker container with

Then I went to
image

and clicked on amazon login... I logged in and had to answer what letters were on the screen ..got that right...then it texted a code to my nephew and I put that on an Alexa screen but it kept blanking... i finally entered it but alas got the following

image

HOW do I get past this....i am soooo close....
Any help appreciated..

Did you port forward 8092 from your routers public.ip to the nas or pi (whateve u r using) private ip?

yes, and I can get to the echo speak service on the public ip:8092
i chose 8092 as my own server is on 8091

what should the server port be for the callback? my page shows 8092 but I'm thinking it should be 8091 ...if so ..how do i set that

That port needs to be the port the server is on, the server basically tells the hub, this is how you reach me. It is telling it the IP as well, but you created an override for that. None of that is relevant anyway, the issue is with logging into Amazon.

A few people have had issues with the 2FA prompts on the cookie server, I am not sure what the issue is. I know the library that is used by the server has been updated quite a few times to fix issues when Amazon changes things, but the ES server has not been updated. The library has custom mods to it, so it cannot just be dropped in and updated (I tried). I suspect that would fix the issues.

Possibly if you disable 2FA on the amazon account it may let you get in? Then it could be enabled again afterwards I think without causing you to get logged out.

great idea on turning off 2FA..i will have my nephew do that and I'll try again...much grateful

Its not necces your nephews issue your screen shot is not showing succesful login .. it should look like this...