SmartThings Community

Hello, Home HomeKit (and Siri!) control via homebridge


(Pizzinini) #541

I did not include it… this way if I make a change to my network and I ever need to reboot Homebridge it can select a new IP address automatically.


so does your config file look the same but without those two lines?

(Pizzinini) #543

Yes, the post above is my configure.json file.


ok I think i’ve got it working!

I uninstalled homebridge and the legacy plugins and reinstalled homebridge and the ST addon(?). I think my issue was the the ST addon didn’t install properly probably because I didn’t use -g but I did use -g for global install for homebridge - thats my best guess. I did get “no root access, try again as admin” when trying to install the ST addon but when I tried running Homebridge anyway it said it was contacting ST so I thought maybe it had worked anyway? IDK this whole thing was not as easy as it just was now but I’ll take it!

Thanks for the help! I’m going to try out some devices and play with it now that my devices showed up.


I’m on the original shard too (if I’m understanding it correctly. I use graph.api.smarththings).

I got it working! I ditched the two lines about direct update method and direct IP and uninstalled and reinstalled. I think the problem was that I didn’t properly install the ST addon of homebridge.

(Justin) #546

I’ve installed the app and everything works perfectly but I have 1 question:

**Is the app capable of recognizing a camera? ****** My own answer seems to be no because when I try to add my cameras, Home sees them as motion sensors (which they are as well) and there is no ability to set the device as a camera.

(Pizzinini) #547

You may be able to integrate the camera into Homebridge through a separate plugin instead of through Smartthings.

You can find package for your camera here:

I have done this for my Nest Thermostats (see post 298 above).

(Justin) #548

Got it. Followed the directions to install the nest-homebridge plugin, when I get to the last step which reads as follows:

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
You should be able to restart HomeBridge and it should succeed with the new token.

Where is this log where I can find the token

When I load homebridge, this is the message I see:

*** 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 <>
*** 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 <>
[8/16/2017, 2:38:51 PM] Loaded plugin: homebridge-nest
[8/16/2017, 2:38:52 PM] Registering platform 'homebridge-nest.Nest'
[8/16/2017, 2:38:52 PM] ---
[8/16/2017, 2:38:54 PM] Loaded plugin: homebridge-smartthings
[8/16/2017, 2:38:54 PM] Registering platform 'homebridge-smartthings.SmartThings'
[8/16/2017, 2:38:54 PM] ---
[8/16/2017, 2:38:54 PM] config.json (/root/.homebridge/config.json) not found.

(Pizzinini) #549

The token should be available in your Nest developer account:

(Justin) #550

Actually everything BUT the token is in the developer account.

The instructions (from GitHub) led me to believe the token would be generated by running homebridge.

(Pizzinini) #551

OK, I understand now,

From your log above it looks like the config.json is not found. With out this Homebrigde will not have the Nest credentials to create the code.

(Justin) #552

Yes, I see that too… I don’t understand that as homebridge with HomeKit works flawlessly so the HomeKit plugin seems to locate the config.json file.

(Justin) #553

So I got the config.json thing figured out. I received my token and entered it into config.json. I then restarted the RPI and then entered homebridge. This is my log:

[8/17/2017, 1:24:25 PM] Initializing Nest platform...
[8/17/2017, 1:24:25 PM] Fetching Nest devices.
[8/17/2017, 1:24:27 PM] Software version for Jonathan's Room  Camera is: 205-600055
[8/17/2017, 1:24:27 PM] Away for Jonathan's Room  Camera is: 0
[8/17/2017, 1:24:27 PM] Initializing platform accessory 'Jonathan's Room  Camera'...

Yet I do not see the camera in HomeKit? Any thoughts?

(Pizzinini) #554

I found this link with a description from someone who actually made it work. You have to scroll down a bit.


I’m having some problems with the install. I am getting the below message:

[2017-8-22 00:21:13] Loaded plugin: homebridge-smartthings
[2017-8-22 00:21:13] Registering platform ‘homebridge-smartthings.SmartThings’
[2017-8-22 00:21:13] —
var username = config.bridge.username;

TypeError: Cannot read property ‘username’ of undefined
at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:202:31)
at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:52:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:573:30)
at Object.Module._extensions…js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)

The config.json file i used was copied directly from the smartapp as per this -

“description”: “JSON API”,
“platforms”: [{
“platform”: “SmartThings”,
“name”: “SmartThings”,
“app_url”: “”,
“app_id”: “xxxxxx-5e51-4f31-b9e9-6020198a8f7d”,
“access_token”: “xxxxxx-262a-48ac-80a4-fa18aac9908c”

Anybody know what i did wrong and how do i fix this?

EDIT: Finally got it working using this config.json -
“bridge”: {
“name”: “Homebridge”,
“username”: “G0:52:A8:35:81:ED”,
“port”: 51827,
“pin”: “031-45-154”

"description": "JSON API",
"platforms": [{
	"platform": "SmartThings",
	"name": "SmartThings",
	"app_url": "",
	"app_id": "xxxxx-5e51-4f31-b9e9-6020198a8f7d",
	"access_token": "xxxxx-262a-48ac-80a4-fa18aac9908c"


Not sure it will work as i’m doing this remotely. Will try it when i get back.

EDIT: All up and running wonderfully!

(Brianmay) #556

This project is awesome!
Javascript obfuscator

(Brianmay) #557

Finally got it working. This project is awesome. I use this to validate JSON: JSON Formatter

(Tyler Britten) #558

Is there a way to enable showing routines via homebridge too?

(Pizzinini) #559

I dont think there is a way to do this directly. Routines are different than the Homekit equivalent scenes.

You could create a virtual momentary switch in smartthings and trigger it in Homekit though. THe Samrtthings routine can be triggered when the switch is turned on.

Please see my post 453 above for an example.

(Pizzinini) #560

Since a couple of days ago I started getting a timeout error when adding devices to the JSON Complete API smart app if I have more than ~20 devices in the configuration.

java.util.concurrent.TimeoutException: Execution time exceeded 20 app execution seconds: 69400571204968 @ line 313

It looks like this is a time out (I think Smartthings has a 20 sec limit for smartapp execution) when discovering the capabilities for the devices.

Does anyone else see this? Is there a way around this (without reducing the # of devices)?