Comments (15)
It works again without any changes. I suppose there was an issue with the server.
from netatmo.
I sometimes get this, too. But then, it do not work for at least 1 or 2 days. Could this be a API-Limit problem? Too many request per time?
from netatmo.
@skrollme it could be. The code returns No response
when the server sends nothing back but with an error status.
If this happens to you again, could you catch the server response to the format of the response. I've noticed inconsistent API patterns with this API.
from netatmo.
I will give my best, @karbassi. After the last "soft ban" I reduced the apps which were allowed to access my netatmo-account. IFTTT, WeatherUnderground, MacToolbar-Widget, ... all gone.
from netatmo.
Currently I'm facing this error often again.
I'm using https://github.com/guidone/node-red-contrib-netatmo-dashboard (dependency: netatmo).
from netatmo.
It seems that there are some server problems at netatmo's api (see their support-account at twitter). For me its sometimes working, sometimes not...
from netatmo.
It's quite annoying. I'm working on the node-red-node in order to handle this error properly.
from netatmo.
@karbassi I can currently reproduce the problem:
pi@raspberrypi:~/nodetest $ node test.js
events.js:160
throw er; // Unhandled 'error' event
^
Error: Authenticate error: No response
at netatmo.handleRequestError (/home/pi/nodetest/node_modules/netatmo/netatmo.js:46:15)
at netatmo.<anonymous> (/home/pi/nodetest/node_modules/netatmo/netatmo.js:115:19)
at self.callback (/home/pi/nodetest/node_modules/request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (/home/pi/nodetest/node_modules/request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
The response - right before calling this.handleRequestError - is undefined when logged via console.log(response)
The case was reproduced via an simple test-script:
var netatmo = require('netatmo');
var auth = {
"client_id": "123456789",
"client_secret": "12345678901234567890",
"username": "mail@me",
"password": "password"
};
var api = new netatmo(auth);
api.getStationsData(function(err, devices) {
console.log(devices);
});
from netatmo.
@skrollme
have a look here: https://github.com/karbassi/netatmo#catching-errors-and-warnings
from netatmo.
@karbassi thanks, I will try it next time the problem occurs. currently the netatmo api works for me again.
from netatmo.
Glad it's all been straightened out. 👍 😄
from netatmo.
I got an answer from Netatmo Support to my questions about possible soft bans, API limits, and so on. Besides the Rate Limits page you probably already know he writes this. Just in case you are interested:
...
and yes, your IP address could get banned for 24h, if it exceeded 30 requests that tend to 4xx errors within a minute. In order to solve this issue, we advise to follow the recommendations below:
- Spread your user requests, do not make all your request at the same time every X minutes. Spread the load per user.
- When you do a Oauth2, you receive an expires_in value that tell you when the token expires. With this information, you will have to anticipate and refresh the token before doing any requests.
- If an error 4xx is received please make sure not to repeat the request, rather show an error message in the App in order to correct this issue before redoing the request.
from netatmo.
Seems to me they have been having problems with one of their servers.
$nslookup api.netatmo.net
Name: api.netatmo.net
Addresses: 195.154.172.147
195.154.179.238
They seem to rely on DNS round-robin to handle load balancing. The problem is that when the first server is down the netatmo node package does not continue and try the next one. This actually seems to be an issue with node as it caches the DNS lookup and keeps trying the first IP forever.
wget and curl goes on and tries the next one if the first does not work. If you could build some sort of error handling that goes on to the next server in your API that would be great.
from netatmo.
I'm receiving two error messages:
Authenticate error: Status code503"
and
getStationsDataError error: Status code503
The interval is 5 minutes!
from netatmo.
@skrollme I'd welcome a PR for throttling API requests. Such as limiting the SDK to make X
API requests in Y
seconds.
E.g.: 10 requests in 1 minute
.
@paaland Could you submit a PR with your suggested changes for me to look at?
from netatmo.
Related Issues (20)
- Add "homesdata" API HOT 1
- Add "homestatus" API
- Add "setroomthermmode" API
- Add "setroomthermpoint" API
- Add "switchhomeschedule" API
- Add "synchomeschedule" API
- Add "renamehomeschedule" API
- Add "deletehomeschedule" API
- Add "createnewhomeschedule" API
- Add "partnerdevices" API
- Add "setpersonsaway" API
- Add "setpersonshome" API
- Add "addwebhook" API
- Add "dropwebhook" API
- Replace request with axios HOT 1
- 👋 Looking for maintainers HOT 17
- Question: Options and callback parameters HOT 4
- Write tests HOT 2
- getHealthyHomeCoachData with empty options
- Client credentials grant type deprecated HOT 5
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 netatmo.