Closed mrose17 closed 11 years ago
Good idea! I'm working on it now. I hadn't seen the blinkstick. AWESOME.
many thanks! i have a couplel of netatmos and would love to be able to get them into node.js
best,
/mtr
Done! I think. Let me know if that works for you. (I also realized that the script contained one of my personal device ID's hard coded...it should now do the right thing and get the device for the current authorized user.)
thanks. i've forked it and am taking a look.
also, did you go through the process at http://dev.netatmo.com/dev/createapp to get the client id and secret? for someone developing a library and not (yet) an app, there are several questions that i really don't have answers to...
but, if that's what you did, i'll do the same.
thanks!
i went through the registration process.
if you go to https://github.com/mrose17/AtmoBlinker you'll see a fork of your code in which i have continued the process of extracting netatmo.js from AtmoBlinker and making it a node.js package of it's own. it's getting closer. i tried AtmoBlinker on my system and it seems to work ok. also, i made netatmo.js a little closer to the node.js coding conventions (as i understand them). in particular, note that all of the callbacks have a minimum of one parameter, an error.
feel free to pull this in if you want. i think it would be good to have a new repository just for node-netatmo separate from AtmoBlinker. since you wrote the code, you should probably create the repository and i can fork that and keep fine-tuning things.
best,
/mtr
Damn dude, this is awesome! Thanks. Yeah I'm mostly a front-end dev who dabbles in Node. I haven't delved into it enough to know the conventions yet…although that bizarre leading-comma-per-lin in object notation drives me a little batty (such as in the DEFAULT_LOGGER definition). :) What's the story with the "$" for…such as in the setConfig() function? I assume that's another convention, just curious what the pattern is.
I actually decided to keep the refreshTokenCheck interval and function out of the netatmo module because I originally felt it doesn't belong, but now I see that it's better to keep it.
I'd love to pull your work in, and will do so soon. I'll also split it out to be a separate repo. But, the work I did isn't comprehensive. I only made it work for my purposes, there is quite a bit of functionality to add, at least for getMeasure. I'm not getting a date range or setting a max limit of measurements. But I suppose that's what keeping it open source is for!
Corey Menscher clmensch@gmail.com http://corey.menscher.com
On Apr 27, 2013, at 5:49 AM, mrose17 wrote:
i went through the registration process.
if you go to https://github.com/mrose17/AtmoBlinker you'll see a fork of your code in which i have continued the process of extracting netatmo.js from AtmoBlinker and making it a node.js package of it's own. it's getting closer. i tried AtmoBlinker on my system and it seems to work ok. also, i made netatmo.js a little closer to the node.js coding conventions (as i understand them). in particular, note that all of the callbacks have a minimum of one parameter, an error.
feel free to pull this in if you want. i think it would be good to have a new repository just for node-netatmo separate from AtmoBlinker. since you wrote the code, you should probably create the repository and i can fork that and keep fine-tuning things.
best,
/mtr
— Reply to this email directly or view it on GitHub.
thanks very much!
short answer: go ahead and make node-netatmo, a separate repository. after adding a couple of things like a "correct" package.json, you can publish it to the npm repository, and then you will have a ton of folks helping you, including me...
longer answer: the node.js coding style is, frankly, a little jarring. at present, i have only one public repository, but since that serves as my introduction into the community, i made an extra pass making sure it looked like it came from the community.
regarding the '$' ... i wanted a way to make it very easy to update field that needed to be updated with a "secret" value. i always wanted to make it very clear to anyone who uses the package that they need to put in real values. there is almost certainly a better convention, but i haven't stumbled across it yet.
corey - thanks again for doing the work on this. i think it will get a lot of use, and i'm not worried at all about more people showing up to help with it.
best,
/mtr
OK I made a separate repo and published it to NPM. Let's hope I didn't screw this up. :) Now I need to update AtmoBlinker to use it.
Thanks for your help, and please remain involved! https://npmjs.org/package/node-netatmo
Corey Menscher clmensch@gmail.com http://corey.menscher.com
On Apr 28, 2013, at 11:38 PM, mrose17 wrote:
thanks very much!
short answer: go ahead and make node-netatmo, a separate repository. after adding a couple of things like a "correct" package.json, you can publish it to the npm repository, and then you will have a ton of folks helping you, including me...
longer answer: the node.js coding style is, frankly, a little jarring. at present, i have only one public repository, but since that serves as my introduction into the community, i made an extra pass making sure it looked like it came from the community.
regarding the '$' ... i wanted a way to make it very easy to update field that needed to be updated with a "secret" value. i always wanted to make it very clear to anyone who uses the package that they need to put in real values. there is almost certainly a better convention, but i haven't stumbled across it yet.
corey - thanks again for doing the work on this. i think it will get a lot of use, and i'm not worried at all about more people showing up to help with it.
best,
/mtr
— Reply to this email directly or view it on GitHub.
thanks! i've sent an email, so you have my email address.
i've done an import and it looks fine. later tonight i hope to send you a pull request with some docs.
hi. i was getting ready to write a node-netatmo package, but i see i'm late to the party...
would you consider splitting out the netatmo functionality (about 98% of blinky.js) into a separate file and then having blinky.js make use of that file.
if you needed a model, i suspect something like
might be a place to start.
just a thought, thanks!
/mtr
ps: the blink(1) is very cool. have you seen the blinkstick?