swissmanu / harmonyhubjs-client

A Node.JS library which allows you to interact with your Logitech Harmony Hub.
https://github.com/swissmanu/harmonyhubjs-client
MIT License
155 stars 42 forks source link

Can't login #15

Closed Eric2XU closed 8 years ago

Eric2XU commented 8 years ago

Not sure whats going on but when I try to run the example I get this error. This could be my mistake, having used a different project where I provided the email and password I am very unclear where they would be set on this project. Any help would be great.

D:\NodeJS\Code\Harmony\node_modules\harmonyhubjs-client\lib\login\hub.js:63 if(response.identity && response.identity !== undefined) { ^

TypeError: Cannot read property 'identity' of undefined at Client. (D:\NodeJS\Code\Harmony\node_modules\harmonyhubjs-client\lib\login\hub.js:63:15) at emitOne (events.js:77:13) at Client.emit (events.js:169:7) at Client.onStanza (D:\NodeJS\Code\Harmony\node_modules\harmonyhubjs-client\node_modules\node-xmpp-client\index.js:224:14) at emitOne (events.js:77:13) at Connection.emit (events.js:169:7) at Connection.onStanza (D:\NodeJS\Code\Harmony\node_modules\harmonyhubjs-client\node_modules\node-xmpp-client\node_modules\node-xmpp-core\lib\Connection.js:370:14) at StreamParser. (D:\NodeJS\Code\Harmony\node_modules\harmonyhubjs-client\node_modules\node-xmpp-client\node_modules\node-xmpp-core\lib\Connection.js:226:14) at emitOne (events.js:77:13) at StreamParser.emit (events.js:169:7)

swissmanu commented 8 years ago

there is a just released version 1.1.7 of harmonyhubjs-client which forces node-xmpp-core to use a modified version of ltx as described in #10, #11 and #12.

which version of harmonyhubjs-client do cause your problems?

Eric2XU commented 8 years ago

"version": "1.1.6"

Ill give the new version a try, but where do I provide a password to the harmony hub logon or is one not needed?

swissmanu commented 8 years ago

no, there is no password needed anymore since logitech changed the way how to authenticate with the hub. see 6b6ff4be9cf4b0eea709b41a38d80a7c4bcee9d2 for more details.

let me know if the latest version works for you.

swissmanu commented 8 years ago

Version 1.1.8 should fix the mess with node-xmpp-* and ltx.

Please make sure you are using the latest version of npm (npm install npm -g) and try to install the newest version 1.1.8 of harmonyhubjs-client (release notes here: https://github.com/swissmanu/harmonyhubjs-client/releases/tag/v1.1.8)