Hexagon / node-telldus

Node bindings for telldus-core
Other
34 stars 10 forks source link

a plea for help! #1

Closed mrose17 closed 10 years ago

mrose17 commented 10 years ago

hi. i couldn't find an email/twitter/etc. for you, so:

hexagon - would you be kind enough to help out a fellow node.js person and augment the read me.md file explaining how to get telldus-core built on a mac? presumably with that in place, your wscript will work well.

sorry and thanks!

marshall

Hexagon commented 10 years ago

Hi there,

I have no time for completing the readme at the moment, but right out of my memory i think it is as easy as installing npm and writing

npm install

... or ...

npm install -g

... for global install

Then you enter your project directory and write

npm link telldus-core-js

... to be able to include telldus-core-js in your project

mrose17 commented 10 years ago

thanks very much for getting back to me. i tried those steps earlier before deciding to bother you (-;

two questions:

  1. are you on a mac or linux or ?
  2. prior to running npm did you install any libraries from anywhere (e.g., the telldus core libraries)?

thanks,

/mtr

Hexagon commented 10 years ago

Hehe :)

  1. Linux only (does not own a max)
  2. Yeah, telldus-core has to be installed for this to work (http://developer.telldus.com/wiki/TellStickInstallationSource)

when the tdtool --list command works all should be ok.

What error message do you get on npm install ?

Hexagon commented 10 years ago

Seems like telldus-core is included with Telldus Center on Mac

mrose17 commented 10 years ago

now i understand: i misunderstood! i was thinking that doing an npm install would do all the heavy lifting of getting the telldus-core package, doing the compile/install, etc.

there error is what you'd expect for a system without the libraries:

npm http GET https://registry.npmjs.org/telldus-core-js npm http 304 https://registry.npmjs.org/telldus-core-js

telldus-core-js@0.0.6 install /private/tmp/node_modules/telldus-core-js node-gyp configure build

CXX(target) Release/obj.target/telldus/telldus.o ../telldus.cc:13:10: fatal error: 'telldus-core.h' file not found

include

     ^

1 error generated.

mrose17 commented 10 years ago

understood. i was just looking for a turn-key install: many of the folks who use the package that i would like to use telldus-core-js are good for "npm install -l" but aren't really skilled for downloads/compiles/etc...

Hexagon commented 10 years ago

Oh, no npm install does only take care of the node-side of things. Hope it runs smooth from now on :)

I'll make a complete readme in a couple of days, this were great feedback for that!

mrose17 commented 10 years ago

thanks!

Hexagon commented 10 years ago

@mrose17 , Could you try if a simple npm install telldus do work on mac now?

nilzen commented 10 years ago

It does work on mac!

nilzen commented 10 years ago

I guess the user needs Xcode installed to be able to build it though.

Hexagon commented 10 years ago

Thanks :+1:

nilzen commented 10 years ago

We/you/someone should look in to what's needed to get it working on Windows though, had a quick look earlier today but I got stuck quick when it came to linking the library. I guess it's C:\Windows\System32\TelldusCenter.dll that needs to be "linked" somehow?

nilzen commented 10 years ago

Haha just noticed you did a commit 14 minutes ago for Windows :+1:

Hexagon commented 10 years ago

Yeah, don't know what modifications might be needed to the .gyp file tough. Didn't even get the compiler going as there is some complication with node-gyp and 64-bit windows. I'll create an issue on that :)

mrose17 commented 10 years ago

hi. thanks for looking into this. requiring Xcode is fine; no one gets to compile anything on a mac these days without it…

i tried both this:

  npm -l install telldus

and

    npm -l install git://github.com/Hexagon/node-telldus.git

and got the same error as above, i.e., it doesn't attempt to download any telldus sources, it just goes straight to trying to compile telldus.cc

sorry!

Hexagon commented 10 years ago

I am afraid it isn't possible to script all prerequisites in this case, even on Linux you'll have to manually install telldus-core prior to running npm install telldus.

I'm not a 100% sure though, so @nilzen should give a 2nd opinon :)

nilzen commented 10 years ago

Yes installing Telldus Center from telldus.se is a prerequisite before installing telldus via npm.

mrose17 commented 10 years ago

thanks. ok, i'll install it on a VM and send a pull request with the exact installation instructions. i still wish we could build this from source, perhaps in the future.

thanks!

nilzen commented 10 years ago

@mrose17 I don't get what you are after, compiling Telldus Center from source? We don't want/can't to distribute the source for Telldus Center through npm.

mrose17 commented 10 years ago

all i want from source is telldus-core, not telldus-center. if we can build that from source (they have a github repository with a mirror, by the way), then that's great.

why build from source: because then i don't have to worry about toolchain/library incompatibilities between node and the telldus-core and the libraries they use.

if you look at a package like node-openzave, when you do the "npm install", it fetches the openzwave source, builds it, then builds the glue file, etc. that means i can just put node-openzwave in the dependencies section of my package.json and the user just has to go get a coffee… ditto for the noble package (BLE for node.js)

that's my goal here: i want to be able to add "node-telldus" to my package.json, and when the users of my package do "npm -l install", they don't have to do anything other than check email and twitter while everything gets built.

does that make sense? if i'm missing something, please let me know!

thanks!

nilzen commented 10 years ago

If you manage to get it working and it's ok with their licenses ut sounds great!

mrose17 commented 10 years ago

+1