Giter Club home page Giter Club logo

Comments (5)

alistairg avatar alistairg commented on June 8, 2024

OK - I tracked this one down. It's rate-limiting on the hub. I've got a lot of bulbs (~40 on each hub). After returning the status for the first 16 bulbs, the hub kills the connection - which causes the error above.

IIRC you can return the state for all bulbs in a single call, and then iterate.... will look to changing that, and doing a PR.

from homebridge.

madmod avatar madmod commented on June 8, 2024

I have a PR in progress for this if you can wait a day. Nevermind my PR is for rate limiting the requests not the status updates. I might not have time today but I can work on that too if someone else doesn't beat me to it.

from homebridge.

maddox avatar maddox commented on June 8, 2024

IIRC you can return the state for all bulbs in a single call, and then iterate.... will look to changing that, and doing a PR.

I'd love to see how we can implement this in an Async world and one in which HomeKit asks individually. Wink also can fetch everything at once. In fact, the lib being used doesn't even use an individual endpoint, it just grabs everything and cherry picks the device, lol.

While API limits aren't an issue, it just feels gross.

I just wasn't sure about how to really mange this outside of just cacheing and ACCIDENTALLY returning from the cache because of latent requests, lol.

from homebridge.

madmod avatar madmod commented on June 8, 2024

I have a plan for grouping requests for changing scenes but it will take a while to do it right. For getting the state of all bulbs node-hue-api has a fullState() call that is expensive but less expensive than getting the state of all 40 bulbs individually.

from homebridge.

madmod avatar madmod commented on June 8, 2024

Also for the rate limiting I am using the excellent bottleneck module if someone else is working an a PR for this.

from homebridge.

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.