MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. NateDee
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    N
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 0

    NateDee

    @NateDee

    0
    Reputation
    393
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    NateDee Unfollow Follow

    Latest posts made by NateDee

    • RE: API requests stop firing after a couple hours for custom module

      @mochman after 10 hours it’s still running and updating! I think that did the trick! It would always freeze during the overnight hours, I’m guessing I was having some hiccup for when no buses and trains were running. Do you have a thread open for your issue?

      @pinsdorf I had logs running, including logging json respones, but I never saw any errors the requests would just stop.

      posted in Troubleshooting
      N
      NateDee
    • RE: API requests stop firing after a couple hours for custom module

      Mochman are you using a setTimeout() or setInterval() function to schedule your requests? I was using a setTimeout() and just switched over to setInterval(), I will let you know how it goes. Mine pretty much always cuts out within a few hours.

      From the javascript docs, setTimeout() calls the function once, and I rely on a call to a scheduleUpdate() function to call setTimeout() after each successful request. If any hiccup in the request, setTimeout() won’t be called again. However, setInterval() calls repeatedly unless told to stop, so no dependency on any successful runs.

      I’ll update you if that does the trick for me.

      posted in Troubleshooting
      N
      NateDee
    • API requests stop firing after a couple hours for custom module

      Hi All,

      Just got my mirror up and running, I am still working on my custom MMM-CTA module, a module for Chicago public transit. My issue is after a couple of hours of flawless running, the module stops sending API requests. I have a scheduleUpdate() function handling the repeating requests.

      You can view my code here: https://github.com/NateDee/MMM-CTA

      It’s still a work in progress but, has anybody had similar issues? No errors in my console logs, the requests just stop firing after about 2 hours. I’m a bioinformatician so a bit of a jack of all trades, master of none, and somewhat new to JavaScript.

      Thanks for any help!

      posted in Troubleshooting
      N
      NateDee