homebridge-nest icon indicating copy to clipboard operation
homebridge-nest copied to clipboard

Hanging at Fetching Nest devices.

Open djfatal opened this issue 7 years ago • 32 comments

I started having trouble with the new API tonight. When I run homebridge it will hang at Fetching Nest devices. If I remove token from my config.json it will work in Legacy API.

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister [5/11/2017, 11:32:53 PM] Loaded plugin: homebridge-nest [5/11/2017, 11:32:54 PM] Registering platform 'homebridge-nest.Nest' [5/11/2017, 11:32:54 PM] --- [5/11/2017, 11:32:54 PM] Loaded config.json with 0 accessories and 1 platforms. [5/11/2017, 11:32:54 PM] --- [5/11/2017, 11:32:54 PM] Loading 1 platforms... [5/11/2017, 11:32:54 PM] [Nest] Initializing Nest platform... [5/11/2017, 11:32:54 PM] [Nest] Fetching Nest devices.

djfatal avatar May 12 '17 06:05 djfatal

Same issue here...

dvd2000k avatar May 12 '17 06:05 dvd2000k

Ditto -> stuck on fetching devices , crashed last night

Last time things like this happened was to do with nest, rather than the plugin, a short term fix was to fall back to legacy API, but i thought the plugin was supposed to be updated to be more robust to nest API tantrums???

/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)

PencilDH avatar May 12 '17 07:05 PencilDH

#110 #109 #106 ?? Seems like it's not crashing but just hanging now?

PencilDH avatar May 12 '17 07:05 PencilDH

For me it just hangs but it prevents homebridge from starting, perhaps it would be a good idea to implement some timeout to avoid this situation

julianrv avatar May 12 '17 07:05 julianrv

Same problem for me, was crashing in the night, and now it's hanging

fafoulon avatar May 12 '17 07:05 fafoulon

Same issue. Now I have to remove the plugin temporarily

luisiam avatar May 12 '17 08:05 luisiam

Did anyone try to fall back to legacy API of now? I didn't have time to check it out yet?

Edit: Yes it works......

Do do this

  1. make a back-up copy of your config.json ,
  2. in original song file just delete:
   		"token" : "c.5ABsTpo88k5yfNIxZlh...",
   		
   		"clientId": "developer client id",
   		"clientSecret": "developer client secret.",
   		"code": "Pin Code",

You will get an error but the API will fallback to legacy and home bridge will be up and running with all nest controls working too

PencilDH avatar May 12 '17 08:05 PencilDH

Same issue here. Resulting in installing everything from the ground up.... :)

I wanted to install a new configuration of Homebridge anyway. Strange thing is, the beginning of the configuration with creating a token with pincode still works.

I guess it has to do something with the status of the Nest itself. App of Nest is working just correctly.

Danno665 avatar May 12 '17 09:05 Danno665

Running home bridge on an rpi, tried to go to legacy as described above to no effect.

sleepyarmistice avatar May 12 '17 11:05 sleepyarmistice

@sleepyarmistice I run rpi and it works .... did you thing say [5/12/2017, 12:12:34 PM] [Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API] [5/12/2017, 12:12:34 PM] Falling back to legacy API. if not you didn't fall back to legacy...

PencilDH avatar May 12 '17 11:05 PencilDH

Oh, geez, no. I'll try it when I get home and it will most likely work.

On May 12, 2017, at 7:05 AM, Pencil DH [email protected] wrote:

@sleepyarmistice I run rpi and it works .... did you thing say Legay API on terminal, if not you didn't fall back to legacy?

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

sleepyarmistice avatar May 12 '17 12:05 sleepyarmistice

Ditto, same issue here. Even attempted to re-create the app on the Nest developer portal.

Legacy authorization still works fine.

neutrl avatar May 12 '17 12:05 neutrl

Same here...

d3bing avatar May 12 '17 13:05 d3bing

Same here, broke my setup. Legacy works

gerarddvb avatar May 12 '17 13:05 gerarddvb

Same issue starting last night. I don't think Homebridge itself is hanging because I'm still seeing log messages from my other devices, but trying to use the new Nest API causes all devices in the iOS Home app to show "No Response". Using the legacy auth for homebridge-nest works okay.

joe248 avatar May 12 '17 14:05 joe248

Same problem here removed nest and all other platforms work just fine.

Slepperpon avatar May 12 '17 15:05 Slepperpon

@PencilDH Yes the Legacy API is still working. Can't figure out why it hangs on the new API.

djfatal avatar May 12 '17 15:05 djfatal

Same issue

kcharwood avatar May 12 '17 15:05 kcharwood

Reverted to legacy mode for the time being. Any ideas on what the long-term fix.

starlessblack avatar May 12 '17 16:05 starlessblack

I'm tracking this thread as well as I have the same problems.

Gawls avatar May 12 '17 16:05 Gawls

Same issue, following

gizbod avatar May 12 '17 16:05 gizbod

Anyone try regenerating the client token of the homebridge nest plugin?

starlessblack avatar May 12 '17 17:05 starlessblack

Anyone try regenerating the client token of the homebridge nest plugin?

I have, didn't seem to change anything. I just fell back to legacy for now.

neutrl avatar May 12 '17 17:05 neutrl

I was actually using the camera's motion and smoke and co sensor with the new API. It was nice that when motion was detected I would get a notification with a camera image as well. But in legacy the only thing that works is the thermostat.

djfatal avatar May 12 '17 20:05 djfatal

it looks like this issue has been solved it working now...

safzal avatar May 12 '17 22:05 safzal

yup, revert to new API and back on track... guess it was Nest

d3bing avatar May 12 '17 23:05 d3bing

Good to know, will try it when I get home tonight! Thanks @safzal

djfatal avatar May 12 '17 23:05 djfatal

I activated it again, and it's also working for me now

fafoulon avatar May 13 '17 08:05 fafoulon

Getting the same issue - legacy API works fine. Completely recreated a new product at developer.nest.com, generates token fine, but hands when trying to connect.

Is there a fix for this?

RobotLimeLtd avatar Feb 06 '18 21:02 RobotLimeLtd

Same for me. Has anyone a solution?

Krocko avatar Feb 07 '18 08:02 Krocko

OK, a couple of things I'd try:

  1. use my fork, it has a lot of fixes from people merged in: npm install -g "https://github.com/chrisjshull/homebridge-nest"
  2. run homebridge with debug logging: DEBUG=* homebridge -D
  3. I don't think this is the issue people are seeing, but it should be noted that the NEST API has a rate limit that will just reject commands for a while if you trigger it.

Let me know how that goes, and share whatever logging you get.

chrisjshull avatar Feb 09 '18 07:02 chrisjshull

Somewhat embarassingly, I think it was option 3. from your list in my case. I left it a couple of days, and then tried again with my token, and homebridge started up fine, adding the Nest device.

I had had some spurious 2-factor auth text messages recently that seemed to indicate someone had tried to access my account which perhaps caused it to become locked.

I may try your fork out anyway, as I feel the plugin should handle this situation a little more gracefully.

RobotLimeLtd avatar Feb 12 '18 21:02 RobotLimeLtd