-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebridge-Nest failed today after working for quite some time. #107
Comments
I am seeing the same thing:
|
I have tried a fresh install of everything, redoing the token process, even making a new product in the Nest API. |
Same here. Not working since today. Same error message as the others... |
Looks like it occurred for some people under issue 106 which was closed as if just started working on its own. The thought was an issue on Nests end. |
I agree. Definitely something on Nest's end. I guess the question is if this is temporary like #106 or a permanent change in their APIv2. |
I had also tried a complete reinstall before posting. Have it back up and running using the legacy API for the time being. |
only the legacy api seems to be working for me as well. not sure if nest servers or whats up. |
Same issue here. If Nest's v2 API has some intermittent failures it would be nice to have this js defensive so it doesn't crash homebridge... |
Hello I will just add that I am having the same issue, does anyone understand why this is happening? As we all have Dev accounts we could start logging this issue with nest if this is defiantly their problem? I also second the option to make the script more robust so it doesn't crash the home bridge server... Yesterday I didn't know how to turn off the light at home, I had to go and turn them off using the wall switches, imagine?! 👎 |
+1 |
Interestingly, I can make curl calls and get responses back just fine. I haven't dug into the code enough to understand the difference between the standard read API calls and the calls that the plugin is making, but the API itself seems fine (using the same token that I generated initially during the plugin setup). One thing I noticed -- the error coming from faye-websocket-node is similar to this issue: faye/faye-websocket-node#38 The firebase that is used by homebridge-nest is v2.3.2, which includes a version of faye-websocket from before that fix. I made that (one-line) fix by hand (rather than upgrading both firebase and faye-websocket), and homebridge started up fine and is working. So, my guess is that a change has happened on the Nest end with how they handle closing out websocket clients. The older version of faye-websocket doesn't handle this well, returns that error, and that error isn't caught anywhere. If I get some time later today, I'll put together a quick pull request that updates firebase to a more recent version (which will pull in a more recent version of faye-websocket), but that will require a bit of testing to make sure that the firebase methods haven't changed much between versions. In the meantime, if you make that one line change, it should get everything back up and running (at least it has for me, at least for the last hour) |
Thank Ryan, it got ride of the error but now it won't go past the fetching nest devices. I believe the websocket is the root cause of this error |
For now I removed the Nest platform in config.json of Homebridge. Homebridge runs again fine. |
@conradhagemans You can just make it fall back to legacy API by removing the token and it will work as usual no need to remove the whole device! |
I found upgrading the version of websocket-driver used (similar to @rtoohil ’s suggestion) from 0.5.2 to 0.5.3 solved the issue for me. Running the below commands: cd /usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/ sudo rm -rf websocket-driver cd ../ sudo npm install [email protected] --save And restarting Homebridge should allow you to continue using the newer API via a token. |
Works indeed again with upgrade of websocket-driver. Thank you Smolyneux! |
Upgrading as per smolyneux worked as well. I had to edit the config file as to get it to run on the legacy API, I had to remove all but the user name and password, but had just save multiple copies so that was just cut an paste the file in place and load it. Marked as closed with the solution of updating the websocket-driver! |
Sorry to open this up again but is this working now with the new API after updating the web socket as instructed above? I'm using the legacy API at the moment. |
It's working with the new API for me as of right now. |
Excellent - thank you. I might update. Out of curiosity what's the difference between the old and new api within HomeKit? Using the Legacy one now for a couple of days and not seen any difference. I know the old API isn't being developed anymore but neither is the new one by looks of it. Cheers |
Thanks @smolyneux! This worked for me too. |
I have done above steps and it worked for a couple of minutes and its not working.. Please advise if its still working your end.. Cheers Update:- I run this via forever and I think it times out and tries to restart the script as it takes a while to grab the nest info and finish loading homebridge. I won't use forever lol |
Still working perfectly post updating websocket-driver. In the troubleshooting steps originally of nuking and reinstalling everything I now have my two nest protects working with HomeKit too as I was running such an old version of the nest plugin that it only worked with the thermostat prior to the failure. |
Pull request with working shrinkwrap. |
I tried the websocket-driver fix but now have the same problem as @digitalkyle - homebridge won't start up as it seems to get stuck at the fetching stage. FWIW my websocket-driver module is under /usr/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/ on Ubuntu if that makes any difference.... |
That's exactly the problem I had yesterday that I posted about earlier. I removed it from my config and ran homebridge overnight without it then this morning I put the next info back in the config file exactly the same and it worked?!? Bizarre - although Homebridge has crashed today though which doesn't usually happen.
On 14 Jan 2017, at 21:27, Jim <[email protected]<mailto:[email protected]>> wrote:
I tried the websocket-driver fix but now have the same problem as @digitalkyle<https://github.com/digitalkyle> - homebridge won't start up as it seems to get stuck at the fetching stage. FWIW my websocket-driver module is under /usr/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/ on Ubuntu if that makes any difference....
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#107 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APQCADTwsgv2CITUO2dwaNDxCwxEMd4Oks5rST3VgaJpZM4LdU4b>.
|
I've had home bridge up and running for well over a year now with limited issues. Haven't done much in the way of updating. I tried to reinstall assuming there could be an update since I last did it and the error remains. Checked with the nest developer site and checked the authorization token and set that back up incase that was causing an issue and have checked permissions there. Everything seems fine...
Here is what it is failing with currently...
XserveServer:~ Tennant$ homebridge
[1/6/2017, 11:07:38 PM] Loaded plugin: homebridge-nest
[1/6/2017, 11:07:38 PM] Registering platform 'homebridge-nest.Nest'
[1/6/2017, 11:07:38 PM] ---
[1/6/2017, 11:07:38 PM] Loaded config.json with 0 accessories and 1 platforms.
[1/6/2017, 11:07:38 PM] ---
[1/6/2017, 11:07:38 PM] Loading 1 platforms...
[1/6/2017, 11:07:38 PM] Initializing Nest platform...
[1/6/2017, 11:07:38 PM] Fetching Nest devices.
/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/websocket_extensions.js:133
this._pipeline.processIncomingMessage(message, callback, context);
^
TypeError: Cannot read property 'processIncomingMessage' of undefined
at instance.processIncomingMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/websocket_extensions.js:133:19)
at instance._emitMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:442:22)
at instance._emitFrame (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:405:19)
at instance.parse (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:144:18)
at instance.parse (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/client.js:56:58)
at IO.write (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/streams.js:80:16)
at TLSSocket.ondata (_stream_readable.js:528:20)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at TLSSocket.Readable.push (_stream_readable.js:110:10)
at TLSWrap.onread (net.js:523:20)
The text was updated successfully, but these errors were encountered: