KraigM / homebridge-nest

Nest plugin for HomeBridge
210 stars 72 forks source link

Can't get homebridge-nest to work #91

Open RAGR1 opened 8 years ago

RAGR1 commented 8 years ago

I have followed the directions on signing up for a Nest developer account and followed the step by step instructions in Terminal. I am a novice at this, so I get lost when the screen doesn't show what the directions say it should show. Here's the error I'm getting: any help is appreciated...

npm install -g homebridge-nest npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/homebridge-nest npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/homebridge-nest/node_modules/unofficial-nest-api npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/homebridge-nest/node_modules /usr/local/lib └─┬ homebridge-nest@1.1.2 └── unofficial-nest-api@0.1.4 (git+https://github.com/kraigm/unofficial_nodejs_nest.git#3cbd337adc32fab3b481659b38d86f9fcd6a9c02)

npm ERR! Darwin 16.1.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-nest" npm ERR! node v6.9.1 npm ERR! npm v3.10.9 npm ERR! path /usr/local/lib/node_modules/homebridge-nest npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/homebridge-nest' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/homebridge-nest' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/homebridge-nest' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /Users/Daddy/npm-debug.log


and when I run homebridge I get this:

11/17/2016, 2:26:24 PM] Loaded plugin: homebridge-nest [11/17/2016, 2:26:24 PM] Registering platform 'homebridge-nest.Nest' [11/17/2016, 2:26:24 PM] --- [11/17/2016, 2:26:24 PM] Loaded plugin: homebridge-yamaha [11/17/2016, 2:26:24 PM] Registering accessory 'homebridge-yamaha.YamahaAVR' [11/17/2016, 2:26:24 PM] Registering platform 'homebridge-yamaha.YamahaAVR' [11/17/2016, 2:26:24 PM] --- [11/17/2016, 2:26:24 PM] Loaded config.json with 0 accessories and 2 platforms. [11/17/2016, 2:26:24 PM] --- [11/17/2016, 2:26:24 PM] Loading 2 platforms... [11/17/2016, 2:26:24 PM] Initializing Nest platform... [11/17/2016, 2:26:24 PM] Fetching Nest devices. [11/17/2016, 2:26:24 PM] Initializing YamahaAVR platform... [11/17/2016, 2:26:24 PM] Getting Yamaha AVR devices. [11/17/2016, 2:26:24 PM] { Error: UNAUTHORIZED: {"error":"unauthorized","type":"https://developer.nest.com/documentation/cloud/error-messages#auth-error","message":"unauthorized","instance":"eae67e3e-6671-4864-913c-65d8d101d727"} at Error (native) at Yg (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:150:468) at Object.Cc (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:149:255) at /usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:182:177 at Rh.h.Jd (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:186:104) at Fh.Jd (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:176:364) at wh.Jg (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:174:280) at zh (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:168:464) at Client.Ka.onmessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:167:321) at Client.dispatchEvent (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:22:30) at Client._receiveMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api.js:134:10) at Client. (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api.js:34:49) at emitOne (events.js:101:20) at Client.emit (events.js:188:7) at Client. (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:451:14) at pipe (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:37:40) at Pipeline._loop (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:44:3) at Pipeline.processIncomingMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:13:8) at Extensions.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:20) at Client._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 Client._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 Client.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) cause: { Error: UNAUTHORIZED: {"error":"unauthorized","type":"https://developer.nest.com/documentation/cloud/error-messages#auth-error","message":"unauthorized","instance":"eae67e3e-6671-4864-913c-65d8d101d727"} at Error (native) at Yg (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:150:468) at Object.Cc (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:149:255) at /usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:182:177 at Rh.h.Jd (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:186:104) at Fh.Jd (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:176:364) at wh.Jg (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:174:280) at zh (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:168:464) at Client.Ka.onmessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/lib/firebase-node.js:167:321) at Client.dispatchEvent (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:22:30) at Client._receiveMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api.js:134:10) at Client. (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/api.js:34:49) at emitOne (events.js:101:20) at Client.emit (events.js:188:7) at Client. (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js:451:14) at pipe (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:37:40) at Pipeline._loop (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:44:3) at Pipeline.processIncomingMessage (/usr/local/lib/node_modules/homebridge-nest/node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/lib/pipeline/index.js:13:8) at Extensions.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:20) at Client._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 Client._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 Client.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) code: 'UNAUTHORIZED' }, isOperational: true, code: 'UNAUTHORIZED' } [11/17/2016, 2:26:24 PM] Falling back to legacy API. [11/17/2016, 2:26:25 PM] Found Yamaha RX-V475 - 03028573, "Yamaha" [11/17/2016, 2:26:25 PM] WARN: Got multiple systems with ID 03028573! Omitting duplicate! [11/17/2016, 2:26:25 PM] WARN: Got multiple systems with ID 03028573! Omitting duplicate! [11/17/2016, 2:26:26 PM] Away for Nest09AA01AC36150HT3 is: false [11/17/2016, 2:26:26 PM] Temperature unit for Nest09AA01AC36150HT3 is: Fahrenheit [11/17/2016, 2:26:26 PM] Current temperature for Nest09AA01AC36150HT3 is: 19.81 [11/17/2016, 2:26:26 PM] Current heating for Nest09AA01AC36150HT3 is: 0 [11/17/2016, 2:26:26 PM] Current humidity for Nest09AA01AC36150HT3 is: 28 [11/17/2016, 2:26:26 PM] Target heating for Nest09AA01AC36150HT3 is: 2 [11/17/2016, 2:26:26 PM] Target temperature for Nest09AA01AC36150HT3 is: 24 [11/17/2016, 2:26:26 PM] Away for Nest09AA01AC36150GD4 is: false [11/17/2016, 2:26:26 PM] Temperature unit for Nest09AA01AC36150GD4 is: Fahrenheit [11/17/2016, 2:26:26 PM] Current temperature for Nest09AA01AC36150GD4 is: 20.87999 [11/17/2016, 2:26:26 PM] Current heating for Nest09AA01AC36150GD4 is: 0 [11/17/2016, 2:26:26 PM] Current humidity for Nest09AA01AC36150GD4 is: 29 [11/17/2016, 2:26:26 PM] Target heating for Nest09AA01AC36150GD4 is: 2 [11/17/2016, 2:26:26 PM] Target temperature for Nest09AA01AC36150GD4 is: 26.5 [11/17/2016, 2:26:26 PM] Initializing platform accessory 'Nest09AA01AC36150HT3'... [11/17/2016, 2:26:26 PM] Initializing platform accessory 'Nest09AA01AC36150GD4'... [11/17/2016, 2:26:59 PM] Waited 30 seconds, stopping discovery. [11/17/2016, 2:26:59 PM] Discovery finished, found 1 Yamaha AVR devices. [11/17/2016, 2:26:59 PM] Initializing platform accessory 'Yamaha'... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[11/17/2016, 2:26:59 PM] Homebridge is running on port 51826.

ryck commented 8 years ago

This is usually caused by a permissions issue.

You can either use sudo (quick and dirty) or change the ownership of you /usr/local to you (also quick, but much cleaner)

Quick & Dirty sudo npm install -g homebridge-nest

Proper way sudo chown -R $USER /usr/local && npm install -g homebridge-nest

RAGR1 commented 8 years ago

Thank you ryck. That worked great. I'm still getting the "Falling back to legacy API" notice on the Nest platform. Any ideas?

[11/17/2016, 4:48:14 PM] { [Error: UNAUTHORIZED: {"error":"unauthorized","type":"https://developer.nest.com/documentation/cloud/error-messages#auth-error","message":"unauthorized","instance":"1a980a8b-d9ed-452e-93cf-491155a8c404"}] cause: { [Error: UNAUTHORIZED: {"error":"unauthorized","type":"https://developer.nest.com/documentation/cloud/error-messages#auth-error","message":"unauthorized","instance":"1a980a8b-d9ed-452e-93cf-491155a8c404"}] code: 'UNAUTHORIZED' }, isOperational: true, code: 'UNAUTHORIZED' } [11/17/2016, 4:48:14 PM] Falling back to legacy API. [11/17/2016, 4:48:16 PM] Away for Nest09AA01AC36150HT3 is: false [11/17/2016, 4:48:16 PM] Temperature unit for Nest09AA01AC36150HT3 is: Fahrenheit [11/17/2016, 4:48:16 PM] Current temperature for Nest09AA01AC36150HT3 is: 20.28999 [11/17/2016, 4:48:16 PM] Current heating for Nest09AA01AC36150HT3 is: 0 [11/17/2016, 4:48:16 PM] Current humidity for Nest09AA01AC36150HT3 is: 28 [11/17/2016, 4:48:16 PM] Target heating for Nest09AA01AC36150HT3 is: 2 [11/17/2016, 4:48:16 PM] Target temperature for Nest09AA01AC36150HT3 is: 24 [11/17/2016, 4:48:16 PM] Away for Nest09AA01AC36150GD4 is: false [11/17/2016, 4:48:16 PM] Temperature unit for Nest09AA01AC36150GD4 is: Fahrenheit [11/17/2016, 4:48:16 PM] Current temperature for Nest09AA01AC36150GD4 is: 20.79999 [11/17/2016, 4:48:16 PM] Current heating for Nest09AA01AC36150GD4 is: 0 [11/17/2016, 4:48:16 PM] Current humidity for Nest09AA01AC36150GD4 is: 29 [11/17/2016, 4:48:16 PM] Target heating for Nest09AA01AC36150GD4 is: 2 [11/17/2016, 4:48:16 PM] Target temperature for Nest09AA01AC36150GD4 is: 26.5 [11/17/2016, 4:48:16 PM] Initializing platform accessory 'Nest09AA01AC36150HT3'... [11/17/2016, 4:48:16 PM] Initializing platform accessory 'Nest09AA01AC36150GD4'...

inzlabs commented 7 years ago

I have the same "Unauthorized" situation here. I wonder if it is because NEST doesn't like homebridge? maybe on their developer side? or how can we fix this? or this is not a problem?