Comments (15)
With the deprecation of the UPnP and the addition of mDNS, it looks like I will need to add that to the library as an alternative approach for discovery now.
from node-hue-api.
I have released a new version with mDNS support, see here for details #221 (comment)
from node-hue-api.
Same for me, identical error status and message. My script has been working fine for months until today.
from node-hue-api.
It is not the library; https://developers.meethue.com/rate-limiting-status-code/
from node-hue-api.
I have a complete lack of visibility to the use case here and the full manifestation of the error, can you provide some more context and a reproducible way for this error to be created?
from node-hue-api.
This is the code: https://github.com/lexicalunit/busylight/blob/main/cli.js
Essentially I'm just doing:
const results = await discovery.nupnpSearch()
const host = results[0].ipaddress
const secure = await api.createLocal(host).connect(settings.username)
const light = (await secure.lights.getLightByName(options.light))[0]
const state = stateFromOptions(options)
await secure.lights.setLightState(light.id, state)
from node-hue-api.
I'm experiencing the same issue when trying to develop an extension using this package. When I started today, everything was alright. But after several uses of discovery.nupnpSearch()
I'm now getting the exact same issue.
For the record, all I've used for this error to appear up until this point is discovery.nupnpSearch()
.
from node-hue-api.
From the Hue documentation it looks to be active as of now:
NOTE 1 – UPnP (or more specifically the UPnP subset Simple Service Discovery Protocol (SSDP)) used to be available as another discovery method but has been deprecated in favor of mDNS and will be disabled in Q2 2022.
from node-hue-api.
That deprecation warning should no impact this particular endpoint, as the nupnp search is reaching out to the Hue cloud to get the data back for the known register bridges, https://discovery.meethue.com
They will have some level of rate limiting on this endpoint to stop abuse, but I cannot see any details on a rate limit documented anywhere. Do you know how many calls you are making before this starts to trigger?
from node-hue-api.
I managed to reproduce the rate limiting by hitting just the end point around 10 times in less than a minute. Hue are clearly protecting this endpoint now more than they used to, and it is technically an unauthenticated endpoint, so is a reasonable safety measure I guess to stop abuse...
That said, nothing that I am going to be able to remedy here, it is enforced by Hue themselves, I will take a look into the headers to see if there is any extra data about the rate limits, but nothing that I can change from the library side, Hue own the endpoint and can do whatever they like here.
from node-hue-api.
I just did a quick test and the limit seems to be 12. The thirteenth request fails. I don't know what the timeframe is.
from node-hue-api.
Nothing useful in the returned headers indicating a window, number of api calls remaining or reset time:
from node-hue-api.
I found this snippet buried in the Hue docs
The rate limit of using the discovery endpoint is maximum one request per 15 minutes per client. Typically it should be much less than that because the discovered IP can be stored and only rechecked when a request times out (as the ip might have changed). More regular ip scanning can always be done with mDNS.
from node-hue-api.
Works great on my end! Discovery takes about 4s for me, every time. So maybe the default timeout could be a little more than 5s.
from node-hue-api.
Works great for me too!
from node-hue-api.
Related Issues (20)
- Error when using Webpack / Electron HOT 1
- Example typo
- Touchlink activation HOT 1
- Cant get this to work with React.JS HOT 2
- Export as esm module HOT 20
- mDNS Discovery HOT 4
- Cannot import createLocal using TypeScript HOT 3
- Example doesn't work HOT 2
- api.sensors.updateSensorConfig not working due to un-settable params included in request HOT 3
- Failed to create sensor from bridge model: Error: Unknown type 'zllrelativerotary' to create Bridge Model Object HOT 3
- MDNS Discovery not working (Empty Array) HOT 12
- Implement RGB support for groups HOT 1
- Hue API V2
- ApiError: Problems resolving hue bridges, HTTP error status: 429 HOT 1
- bridge-validation.ts is missing bridgeid
- setLightState sets bri to 1 [esmodules] HOT 1
- Cannot be used in browser due to a minor issue
- Please make Rate Limiting configurable HOT 3
- Getting Value, '65520' is not within allowed limits: min=-255 max=255 for 'id' when using Philips Hue-Bridge adapter in iobroker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-hue-api.