Skip to content

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

@FJ05

Description

@FJ05

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions