Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiError: Problems resolving hue bridges, HTTP error status: 429 #230

Open
FJ05 opened this issue May 5, 2023 · 1 comment
Open

ApiError: Problems resolving hue bridges, HTTP error status: 429 #230

FJ05 opened this issue May 5, 2023 · 1 comment

Comments

@FJ05
Copy link

FJ05 commented May 5, 2023

When I use the example code shown in the documentations I get this error message:
ApiError: Problems resolving hue bridges, HTTP error status: 429

This is the example code:

const v3 = require('node-hue-api').v3;
const LightState = v3.lightStates.LightState;

const USERNAME = User
  // The name of the light we wish to retrieve by name
  , LIGHT_ID = 2
;

v3.discovery.nupnpSearch()
  .then(searchResults => {
    const host = searchResults[0].ipaddress;
    return v3.api.createLocal(host).connect(USERNAME);
  })
  .then(api => {
    // Using a LightState object to build the desired state
    const state = new LightState()
      .on()
      .ct(200)
      .brightness(100)
    ;
    
    return api.lights.setLightState(LIGHT_ID, state);
  })
  .then(result => {
    console.log(`Light state change was successful? ${result}`);
  })
;

This code worked fine for 5 minutes and then it just stopped working...

@peter-murray
Copy link
Owner

It is on Hue, they restrict the number of calls coming from an IP address to the cloud endpoint and expect you to cache the results, or use local mDNS discovery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants