Comments (6)
@cflurin I can't seem to replicate this, but based on this comment, it may be that your have an invalid code, expired code, or missing args.
The Netatmo documentation states that the
invalid_grant
error is shown "In case of error (invalid code, expired code, missing args)"
Update the test.js
auth variable and run npm test
in this project root. What do you get? Can you paste me logs?
from netatmo.
@karbassi:
Thanks for your reply.
Actually I'm using node-red-contrib-netatmo-dashboard that uses your netatmo.js, generally it works but sometimes it crashes.
Do you mean the Catching Errors and Warnings
code? if yes, I reproduced the issue setting a wrong password, here is the logs:
Netatmo threw an error: Error: Authenticate error: invalid_grant
from netatmo.
... I used your original test.js (to reproduce the error I've set a wrong password):
pi@rpi4:~/netatmo-test/node_modules/netatmo $ node test
(node:8459) Warning: Possible EventEmitter memory leak detected. 11 authenticated listeners added. Use emitter.setMaxListeners() to increase limit
events.js:160
throw er; // Unhandled 'error' event
^
Error: Authenticate error: invalid_grant
at netatmo.handleRequestError (/home/pi/netatmo-test/node_modules/netatmo/netatmo.js:46:15)
at .<anonymous> (/home/pi/netatmo-test/node_modules/netatmo/netatmo.js:115:19)
at Request.self.callback (/home/pi/netatmo-test/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/home/pi/netatmo-test/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/home/pi/netatmo-test/node_modules/request/request.js:1001:12)
at IncomingMessage.g (events.js:286:16)
from netatmo.
What happens when you use the right password?
from netatmo.
It works perfectly, but as I said above with node-red-contrib-netatmo-dashboard I request the data every 10 minutes, this works for a long time (days) until node-red crashes with:
Error: Authenticate error: invalid_grant
from netatmo.
... I've added this code:
api.on("error", function(error) {
node.error('Netatmo threw an error: ' + error);
});
to node-red-contrib-netatmo-dashboard on my test system. It seems to work.
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.