Giter Site home page Giter Site logo

Comments (13)

Apollon77 avatar Apollon77 commented on June 28, 2024 1

No code is correct.

If you set the Intervall to 0 then no auto refresh is done. Else it will be used it set to 7days if it has a falsy value (false, null, undefined)

from alexa-remote.

Apollon77 avatar Apollon77 commented on June 28, 2024

you could add the respinse code to the Exception so that we could see what exactly the response is about. But if amazon is returning this ... could Isee your code somewhere? I personally do not experience such an effect

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

yes, I've done that and am waiting for it to fail again (should be in about 15 hours).

I'm actually using your alexa-remote.js code as-is as part of a node.js web wrapper that implements the speak function. It's targeted for use as an Alexa TTS API by home automation systems such as Home Control Assistant. https://github.com/sleuth255/alexa-speaks

Your code is in the public folder. Problem occurs whether useWsMqtt is true or false. Interestingly, when the problem is occurring, your getDevices function still works fine. It is only the speech function that is failing.

from alexa-remote.

Apollon77 avatar Apollon77 commented on June 28, 2024

Why you do not use the lib as dependency but copy the code?!
Ok ... can it be that there is a time where too many requests are send too fast and amazon rate limiting kicks in?

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

I wouldn't think so. It fails even if I only send one command (see the logs above). I've had to work out how alexa-remote operates by looking at the code pretty much, so it was just easier to have it handy. Maybe I'm not setting everything up correctly? I'm directly using sendSequenceCommand with a "speak" function, init, and getDevices. from your code currently.

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

Hmmm... its still up. The only change I made was fix a problem with the refresh cookie interval. I now have the cookie being refreshed every 12 hours. Maybe the en-US locale/site requires a more frequent cookie refresh cycle than once every 7 days? Still, this doesn't explain why getDevices was still functional but the speak function was failing. I'll keep it running and if it lasts another day, I'll close the issue.

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

more on the bug which is that the default cookie timeout wasn't being set correctly on lines 95/96 of alexa-remote because the option name is being transposed to refreshCookieInterval.

from alexa-remote.

Apollon77 avatar Apollon77 commented on June 28, 2024

Last bug I thought was fixed already ... maybe your code relies on an old version of Alexa cookie lib and remote lib because you hard Code all deps.

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

shouldn't those two lines of code say this:

    if (this._options.cookieRefreshInterval === 0) {
        this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 7*24*60*60*1000; // Auto Refresh after 7 days

??

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

so

   if (this._options.cookieRefreshInterval !== 0) {
       this._options.cookieRefreshInterval = this._options.cookieRefreshInterval || 7*24*60*60*1000; // Auto Refresh after 7 days

is correct then. That's how I have it currently. changed from this:

    if (this._options.refreshCookieInterval !== 0) {
        this._options.refreshCookieInterval = this._options.refreshCookieInterval || 7*24*60*60*1000; // Auto Refresh after 7 days

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

I'll pull your library in as a dependency. It looks like my setting it to 12x60x60x1000 coupled with the above change has allowed the server to run for more 32+ hours and counting so far.

from alexa-remote.

Apollon77 avatar Apollon77 commented on June 28, 2024

Hm ... it is very strange that it should need refreshs that often.

from alexa-remote.

sleuth255 avatar sleuth255 commented on June 28, 2024

from alexa-remote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.