Giter Club home page Giter Club logo

Comments (6)

peter-murray avatar peter-murray commented on June 6, 2024

The error will bubble up the promise chain, so you can catch it and deal with it when you get it.

What are you querying that is taking more than 10 seconds for the bridge to respond? I have encountered issues like this on my bridge in the past, but a restart of the bridge cleared the issue and restored performance.

The timeout is in there to ensure that if/when there is a mistake with the parameters to the bridge that the connection will not hang forever.

I will look into some options for specifying this in a sensible way for end users and look to release an update to the library soon.

from node-hue-api.

mwallnoefer avatar mwallnoefer commented on June 6, 2024

Indeed, a setting would be very fine: so we could increase or switch off this option.
Thank you!

from node-hue-api.

volkerrichert avatar volkerrichert commented on June 6, 2024

@peter-murray: I have the timeouts very often. One second it reacts instantly, the next second the bridge take more than 10 sec to react on the pressed button on the hue remote. I tried to deactivate my integrations but nothing helps. Restating the bridge does not help. atm I have 4 LED blubs, 3 osram plugs and a RGBW Controller (FLS-PP3) from Dresden electronic.

Any idea?

from node-hue-api.

peter-murray avatar peter-murray commented on June 6, 2024

@volkerrichert there can be a number of reasons for load on your bridge and slow responses, but mostly it is either down to excessive polling or posting to the bridge. The bridge is a fairly lightweight device and it does not take too much to overload them, something like 10 light state changes posted separately over a second could easily do it.

You do not mention, which bridge you have, the older ones, they are circular are slower than the new rounded square pucks, so that might be something to consider. There is also a few things internally to do with scenes and groups that can require a bit of a clean up from time to time, especially when developing against them. The hue app on iOS has some options for cleaning up some of those. Also make sure you are up to date with the updates, these usually make things better, except for a few early mess ups from Philips.

Ideally you want to work in batches for changing states, I.e put all the changes, on, Color, brightness for each light into a request rather than post them all separately, and avoid polling the bridge heavily to discover states. I think also there are some state retrieval endpoints that are fairly heavy as they return all values of all things, which should be avoid being queried heavily.

Then there is also the possibility that there might be something wrong with the bridge, but you would have to be able to prove that using no integrations before you could engage with Philips on that one.

from node-hue-api.

volkerrichert avatar volkerrichert commented on June 6, 2024

I found the reason. Querying a bulb group cause this behavior. I don't know if this ist located in ths lib, in node-red-contrib-node-hue or the bridge (i have V2). After switching to one bulb from that group it runs like silk.

from node-hue-api.

peter-murray avatar peter-murray commented on June 6, 2024

I doubt it will be this library, as I am merely a thin wrapper around the exposed api itself. I don’t do multiple queries except in extreme edge cases, and those are mainly for configuration.

It would probably be worthwhile raising an issue with node-red library developers so it can be resolved.

from node-hue-api.

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.