luc-ass / homebridge-evohome

Homebridge plugin for Honeywell Evohome
29 stars 16 forks source link

Cannot read property 'userID' of undefined #12

Closed tim-payne closed 7 years ago

tim-payne commented 7 years ago

I've just installed homebridge and homebridge-evohome on my mac and created config.json.

when invoking home bridge i get the following error, could you possibly advise what I've omitted to do?

[11/24/2016, 1:14:55 PM] Loading 1 platforms... [11/24/2016, 1:14:55 PM] [Evohome] Initializing Evohome platform... [11/24/2016, 1:14:55 PM] [Evohome] Logging into Evohome... [11/24/2016, 1:14:55 PM] [Evohome] Error during Login: TypeError: Cannot read property 'userID' of undefined at new UserInfo (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:6:23) at new Session (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:26:18) at /usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:190:11 at _fulfilled (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:749:13) at /usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:557:44 at flush (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

luc-ass commented 7 years ago

Could you please post your config.json (don't forget to anonymize your user/pass)?

You could also run it through JSONLint: http://jsonlint.com/

tim-payne commented 7 years ago

I ran it thru JSONLINT and it appears ok. Its as follows:

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },

"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

"platforms": [
    {
        "platform": "Evohome",
        "name" : "Evohome",
        "username" : "xxx@yyy.com",
        "password" : "xyzabc",
        "appId" : "91db1612-73fd-4500-91b2-e63b069b185c"
    }
]

}

tim-payne commented 7 years ago

Hi Lucas, any suggestions? When I ran sudo npm install -g homebridge-evohome I did receive this warning...... npm WARN deprecated node-uuid@1.4.7: use uuid module instead /usr/local/lib └── homebridge-evohome@0.1.5 Thanks.

luc-ass commented 7 years ago

Hm,perhaps an old version of node? Please have a look at the recommendations of homebridge itself and install one of these versions.

I have v4.2.1 installed

tim-payne commented 7 years ago

Unfortunately home bridge will no longer install with V4.2.1, it needs 4.3.2 now as a minimum. I installed 4.3.2 but unfortunately I still get the same error i.e. on installing homebridge-evohome npm WARN deprecated node-uuid@1.4.7: use uuid module instead and when running homebridge: Error during Login: TypeError: Cannot read property 'userID' of undefined

Would you possibly have any other suggestions? Am very keen to get this working

luc-ass commented 7 years ago

Well. I just saw that I hat the above error as well. Wasn't a problem for me so we need to keep on searching... what country is your account registered to?

tim-payne commented 7 years ago

I'm registered in the U.K. Thanks for your help

luc-ass commented 7 years ago

Sorry to ask the basics. Could you please try to log into https://international.mytotalconnectcomfort.com/Account/Login ? Please copy the credentials you used above to verify they are working.

The userID-part of the JSON makes me think something does not work with the login itself.

tim-payne commented 7 years ago

I've just installed it on another mac and this time it worked first time. Many thanks!

luc-ass commented 7 years ago

Still no idea why... :D I'll mark this as closed....

gekkie commented 7 years ago

You might want to update the readme doc. The appId is not optional and it's needs to be that uuid, I generated my own uuid and userId issues.

luc-ass commented 7 years ago

Haha, it is actually optional - it's just that you can not set it to something random. I'll remove it from the confit altogether ;)

plangin commented 6 years ago

I have the same issue.... homebridge-evohome used to work reliable 2 days with a german account. Now on almost every temperature change, I get this:

[2018-1-11 08:09:01] [Evohome] Evohome Failed: TypeError: Cannot read property 'userID' of undefined
at new UserInfo (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:6:24)
at new Session (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:26:18)
at /usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:194:11
at _fulfilled (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

My config.json:

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "platforms": [ { "platform": "Evohome", "name" : "Evohome", "username" : "my@mail.de", "password" : "*****", "appId" : "91db1612-73fd-4500-91b2-e63b069b185c" } ] }

Any ideas? :-/

brownad commented 6 years ago

Hi although it’s a great plugin it’s not up to date or fully there with features. I’ve tried and still using the homeassistant setup with their homebridge-homeassistant it has support for Evohome within the HASS itself. You can setup on the same box that runs homebridge. Might be worth the effort if you want something a bit more rounded.

Sent from my iPhone

On 11 Jan 2018, at 08:09, plangin notifications@github.com wrote:

I have the same issue.... homebridge-evohome used to work reliable 2 days with a german account. Now on almost every temperature change, I get this:

[2018-1-11 08:09:01] [Evohome] Evohome Failed: TypeError: Cannot read property 'userID' of undefined at new UserInfo (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:6:24) at new Session (/usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:26:18) at /usr/local/lib/node_modules/homebridge-evohome/lib/evohome.js:194:11 at _fulfilled (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:749:13) at /usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:557:44 at flush (/usr/local/lib/node_modules/homebridge-evohome/node_modules/q/q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)

My config.json:

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "platforms": [ { "platform": "Evohome", "name" : "Evohome", "username" : "my@mail.de", "password" : "*****", "appId" : "91db1612-73fd-4500-91b2-e63b069b185c" } ] }

Any ideas? :-/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

fredericvl commented 6 years ago

For the one's who are interested, I'm currently working on a fork of homebridge-evohome that uses a newer version of Honeywell API (with more options)

tim-payne commented 6 years ago

You couldn't possibly add support for more than one Evohome controller could you? :-)

brownad commented 6 years ago

That would be cool, planning to merge back to here?

Sent from my iPhone

On 11 Jan 2018, at 09:05, fredericvl notifications@github.com wrote:

For the one's who are interested, I'm currently working on a fork of homebridge-evohome that uses a newer version of Honeywell API (with more options)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

plangin commented 6 years ago

@brownad Thank you for the tip. Accidentally I found the explanation for the issue:

"Note: Scan interval is expressed in seconds. Omitting scan_interval may result in too-frequent polling and cause you to rate-limited by Honeywell."

So I assume, when changing the temperature too quick, Honewell's server does reject the request. This does also explain why it used to work fine in the beginning. During testing, I only used Siri commands to set temps, now I started using the Elgato EVE app, where you can change set temperatures quick by ticking several times per second on up or down buttons.

Idea for fix: Introduce also some kind of interval / delay to avoid server rejections. I will open a new issue.

fredericvl commented 6 years ago

@tim-payne I will have a look at multiple location support, but can't promise anything ;-) @brownad Definitely planning to merge back once it's complete!

brownad commented 6 years ago

Brilliant you have a few fans and thanks to @luc-ass for starting this project

Sent from my iPhone

On 11 Jan 2018, at 10:40, fredericvl notifications@github.com wrote:

@tim-payne I will have a look at multiple location support, but can't promise anything ;-) @brownad Definitely planning to merge back once it's complete!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

rooi commented 6 years ago

Great! I also found this https://github.com/simont77/fakegato-history I was hoping to include it in this version as well, but perhaps I should wait untill the merge...