[RELEASE] Echo Speaks V4

ES Tile - @thebearmay - I use your ES Tile driver and forked it to customize the colorization for status and some html layout stuff.

Was hoping you might consider revisiting this driver? If you can parse out the values of HTML into attributes so I can drop my fork and use @garyjmilne Tile Builder? My whole intent is to drop all my forks/customizations and just pull data.
Regarding the attrib Local Server - instead of Local Server - can we have Server with 2 values = Heroku or Local?
Thanks for your consideration.

Let me take a look at it, shouldn't be too difficult to add an attribute option.

1 Like

Thanks for the tips, I will try and look at this as soon as I can and do some local testing. I can put together a PR if it seems to help.

@leo_charles The fix you pointed to as far as I can tell was already handled in the ES Server. In fact they have a list of 5 url paths to rotate through one of which is the /spa/index.html page. I tested all 5 and two of them are not working which would explain the random 404 errors when trying to log in. If you just refresh the page a couple of times eventually it works. I may eventually play around with merging all the changes to the alexa-cookie code from the upstream code from Apollon77.

Going to play around with the Heroku deployment I think, according to their info I should only get charged a few cents an hour? So I guess for just testing I should not get charged much I hope.

2 Likes

@jshimota - version 0.0.3 is out on my github - adds the attribute serverLocation, but you'll need to be running the latest HE Beta firmware to run the code.

thank you for the information.

@tonesto7 I have figured out the issue with the Heroku deployment. This was hours of debugging until I figured out the break point, added some extra logging and then it was obvious!

Heroku is now adding another string to the url, and the "hostUrl" variable was not set to contain the full url upon deployment. So however you are setting that hostUrl when deployed, that needs to be fixed. I have not figured that part out yet, just a workaround to make it work afterwards.

Actual http page for the deployed server: https://echo-speaks-XXXXXXXX-YYYYYYYYY.herokuapp.com/

Example hostUrl set when deployed: echo-speaks-XXXXXXXX.herokuapp.com
Fixed hostUrl: echo-speaks-XXXXXXXX-YYYYYYYYY.herokuapp.com

Anyone can work around this fairly easily:

  • 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
  • Right-Click the "Open App" button and select to COPY URL
  • 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.
    image
  • Click Save Changes
  • Click More > Restart (Menu at top of page)

After that I was able to log in on the ES sever and my ES App on HE picked up the cookie!

@leo_charles I am not sure why you are having issues with a local deployment, mine and presumably others are all working fine.

@tonesto7 I had an idea overnight, I am going to see if the server can just detect the host url instead of manually setting it.

4 Likes

Thanks for looking into this. I suppose I just got unlucky a dozen times with the 404s. It seems like I’m not the only person out there encountering this. Also, I’m assuming the automatic cookie refresh might hit one of these 404s which disconnects ES for Amazon.

As for Heroku, I used it until they implemented charging and I’m not sure what they are asking for. I figured the server code is lightweight on my NAS resources and I’d much rather host the cookie handling in house.

Now that I understand it a little more I might be able to figure out the random 404 errors on a local server as well. I don't think it is using the rotating list of urls for the initial sign in, that seems to be just for the future refreshes. I will dig into it a little more when I can and see if there are other improvements to be made.

What capability does the beta firmware enable that you are utilizing?

Not utilizing any additional capabilities so much as adapting to the changes the beta makes under the covers to allow the driver to function. All of my hubs are running the beta at the moment so ...

This fixes the exact issue that I was having. Thank you so much!

1 Like

@thebearmay, I don't know if anyone else has the same problem or if I did something wrong - most likely hypothesis!

The tile is static with the refresh information from the date I reinstalled it, and reports that subsequent refreshes were missed, although Echo Speaks reports that the refreshes occurred normally.

Tile information

Echo Speaks information

Even the process of clearing the cookie and server login information and adding new cookie is not reported, although the server address and port are correct, as well as the app URL callback token.

Any ideas?

Hit refresh HTML on the ES Tile device page.

Also, try decreasing the poll rate.

I already tried it without success, @jkudave... I also tried to save the preferences and the device, and also tried reloading the driver.

I think @thebearmay might need to look into it at this point.

Hi Team.... I have essentially the same 404 issues. This post is just a marker so I can see when replies occur. I'm hoping that a solid solution can be developed in terms of the server and cookie. For me, I am a complete novice in terms of programming other than getting my devices to work and doing automations in WebCore and Rule Machine.

Because of that I really hope there is complete instructions on how to get this all functional. I use ES via HPM.

Self hosted server or Heroku?

@jtp10181 : I'm OK with any solution that works but it needs to be relatively easy for a layman to complete with step-by-step instructions.

I will have to completely redo the Server portion of the app. I can't get logged into the Heroku dashboard and find my "instance".

My cookie was last updated over 200 days ago. Strangely enough, all the ES Devices are working perfectly. I just get error messages from the ES App (via the Log) every 15 minutes.

Essentially, it is all functional and @jtp10181 put together some excellent guides on how to get a self hosted ES server or Heroku based server functional. Many, including myself, run local instances of ES server on various platforms. Mine is running on Docker.

1 Like

It can work on local or Heroku, but in order to give proper advise I needed to know which one you were having problems with. If you want to try and setup your own local server I have a guide for that: [GUIDE] Echo Speaks Server on Docker (or without) Some prior knowledge is assumed, it is not fully comprehensive.

For Heroku I have a solution for the 404 errors posted up above: [RELEASE] Echo Speaks V4 - #1717 by jtp10181

Funny thing is that I barley even use this app. I have a few TTS alerts setup and that's about it. But it is fun to tinker with and figure out, to help everyone else. I learned a lot of about Docker in an effort to figure it out for the community.

3 Likes