3

I've tried several times installing Homebridge on a Raspberry Pi 3 to control Nest with Siri to no avail. I got it running on my Mac but can't get it running on the Pi, it seems there are several tutorials out there but point to older versions.

It looks like the issue is falling to installing the plugin. From when I did the using the terminal on my Mac, the first time using the ClientId and ClientSecret, after running homebridge, it returned a tokenId to use in their place but it doesn't appear that is happening and homebridge isn't recognized on the "Devices" app.

Installing Homebridge seemed to work ok, below are all the steps and resources used to get where I am. I started experiencing issues below at the line of ======'s. Thank you guys for any help you can offer!!!

Installation

Basic Setup

  • Ran: sudo apt-get update
  • Ran: sudo apt-get upgrade
  • Ran: g++ -v Returned: gcc version 4.9.2 (Raspbian 4.9.2-10)

You can follow the instructions here to get it (node-js) installed.

Install Node Commands:

  • wget nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv6l.tar.gz
  • tar -xvf node-v4.0.0-linux-armv6l.tar.gz
  • cd node-v4.0.0-linux-armv6l
  • sudo cp -R * /usr/local/
  • command node -v Returned: v4.0.0

Install Avahi

  • sudo apt-get install libavahi-compat-libdnssd-dev
  • Ran: cd ..

Proceed as Usual (section)

Ran: sudo npm install -g homebridge

I did receive the root access error and added --unsafe-perm

  • Ran: sudo npm install -g homebridge --unsafe-perm
  • Ran: homebridge

Returned the following:

pi@raspberrypi:~ $ homebridge
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 <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 <0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[6/6/2016, 5:19:33 PM] No plugins found. See the README for information on installing plugins.
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
┌────────────┐
│ 031-45-154 │
└────────────┘
Homebridge is running on port 51826.


So far, it appears all is working from here...

Installing Plugins

You can explore all available plugins at the NPM website by searching for the keyword homebridge-plugin.

  • 10: Copy the Product ID to your HomeBridge config as the clientId in the Nest config
  • 11: Copy the Product Secret to your HomeBridge config as the clientSecret in the Nest config
  • 12: Navigate to the Authorization URL
  • 13: Accept the terms and copy the Pin Code to your HomeBridge config as the code in the Nest config
  • 14: Run HomeBridge once (do not include the token in the config at this time) and you should find a log that says something like "CODE IS ONLY VALID ONCE! Update config to use {'token':'c.5ABsTpo88k5yfNIxZlh...'} instead." Copy the c.5ABsTpo88k5yfNIxZlh... portion to your HomeBridge config as the token in the Nest config

Get the following from: developers.nest.com

  • Product ID: Enter-Client-ID-Here-xxxxx
  • Product Secret: EnterClientSecretHere
  • Authorization URL: URL-HERE

Returns: PinCodeHere

Ran: sudo npm install -g homebridge-nest

Navigated to /usr/local/lib/node_modules/homebridge
Copied config-sample.json
Renamed new file: config.json

Modified the config.json file and saved to /usr/local/lib/node_modules/homebridge


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

"accessories": [{
}],

"platforms": [
{
"platform": "Nest",
"clientId": "Enter-Client-ID-Here-xxxxx",
"clientSecret": "EnterClientSecretHere",
"code": "PinCodeHere"
}
]

}

pi@raspberrypi:~ $ homebridge
* 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
[6/6/2016, 6:19:26 PM] Loaded plugin: homebridge-nest
[6/6/2016, 6:19:26 PM] Registering platform 'homebridge-nest.Nest'
[6/6/2016, 6:19:26 PM] ---
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

[6/6/2016, 6:19:26 PM] Homebridge is running on port 51826.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.