Closed AnduriI closed 9 years ago
Hi @sweetpi,
I'm quite new to pimatic. To receive my weather sensors I just duplicated one of the weatherX.js and adopted it to fit my requirements. Could you please explain me how to do the "coffee things" needed? I never used coffee script.
No worries. Simply do the changes you have done to the js files for the coffee too. Coffeescript is just an alternative syntax for js (docs: http://coffeescript.org/). You can compile coffeescript to js by using gulp with the gulpscript which is part of the repo (docs: http://gulpjs.com/).
ok read a litte in the coffescript and gulp docs. But what coffee file to edit... ? I used the file in \pimatic-app\node_modules\pimatic-homeduino\node_modules\homeduino\node_modules\rfcontroljs\lib but there is no coffee file with content that looks like the protocols.
@AnduriI clone this repository instead and look in src
instead of lib
.
ok I created a new weather9.coffee and edited the controller.coffee same way as with the .js But I didn't get the compiling working. I'm a windows user, so not that familiar with all this linux stuff. Without step-by-step tutorial I wouldn't got pimatic working... :-) Maybe the compiling is not necessary or you can give me a good tut-link where to copy to files for compiling and so on?
Looks almost right, you can test compilation online: http://js2.coffee/.
Make sure you indent correctly (2 spaces)
OK I checked the idents, didn't knew that was important. Don't know how to exactly use the js2.coffe website. I tried with my js code, but this thing give me a complete different layout with variable definitons as t0 = undefined instead of the var t0 in js. Is it necessary in coffee to predefine your variables?
Is it necessary in coffee to predefine your variables?
no. I've fixed the indentions, merged and published your changes :)
Hi @AnduriI,
thanks for the pull request. Please always edit the coffee files. The js files are generated from the coffee files by running
gulp
. Could you add the missing coffee files?