Homebridge Plug-in

$ sudo npm update -g --unsafe-perm homebridge       
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge
+ homebridge@0.4.45
added 13 packages from 10 contributors, removed 4 packages and updated 4 packages in 28.278s

$ sudo npm i -g homebridge-hubitat-tonesto7      
+ homebridge-hubitat-tonesto7@1.5.2
added 2 packages from 3 contributors, removed 1 package and updated 7 packages in 3.667s

HomeKit stayed running through it all :slight_smile:
I tested by... after all that updating of Homebridge on my Mac Mini (server).. by turning offthe light in this room from an iOS Home app. :smiley:
Not "fragile" at all.


So home bridge logs in Hubitat show that there's an open event on my contact sensor. The tile in the Home app on my phone never updates to reflect that.

2018-11-07 20:19:35.142:debugSending DEVICE Event (Living Room Multi | CONTACT: open) to Homebridge at (


close @cstory777 -- we're on a Mac so it's:

$ ls /usr/local/lib/node_modules/homebridge-hubitat-tonesto7
README.md accessories index.js jsconfig.json lib node_modules package.json smartapps


must be somewhere else on node for Mac. /usr/lib/node_modules/ contains a bunch of python files


Port 8000?

it's been on 8005 for all of Hubitat's life as far as I know. Did you override the defaults in your config.json?

Are other things working? just not the sensors (contacts)?


Straight from "systemctl status homebridge":

Nov 07 20:03:42 windu homebridge[1856]: [2018-11-7 20:03:42] [Hubitat] Direct Connect Is Listening On

Everything else works fine. The same sensors even give me the correct temps.


I'm on 8005 too. Change yours to 8005 just for grins?


Why would I do that when literally everything else works? Again, the exact same sensors are reporting the correct temps and that goes over 8000 as well.


Because it's non destructive. Just a wee test :wink:

One of us...One of us...


My Contact Sensor is an Ecolink Door sensor with a liquid level switch wired into the internal port all mounted inside a waterproof (supposedly) container. The container is mounted to the inside of the skimmer cover. I then customized a contact sensor driver to ADD alternate words: LOW and FULL. The EcoLink sensors don't do temp.

This is now called a Pool Level Sensor :slight_smile: by my driver.

There's nothing special in my flow of data, I guess is my point and thus your contact sensor not being picked up on the Homebridge side is quite odd.


Normally my Homebridge runs as a LaunchAgent... I stopped that and fired it up from the command line.

Then I ran a test of the sensor and got what I'd expect on the Homebridge server:

2018-11-7 17:39:03 > [2018-11-7 17:39:03] [Hubitat] Change Event: (A Pool Level Sensor) [CONTACT] is open
2018-11-7 17:39:08 > [2018-11-7 17:39:08] [Hubitat] Change Event: (A Pool Level Sensor) [CONTACT] is closed

I've shown the logs on the Hubitat side up there on post 213 and the logs on the Homebridge side of the connection. Of course mine's working and there's nothing even a little bit interesting about the logs other than they occur. :slight_smile:


Well, you don't have to look far back in the thread to see that I'll tear it all down to make it work that way I want.

Backup the accessories and persist directories, take a full page screen shot of the app config (I wish we could export that config), backup the app code and tear it all down!

-Paste in the latest code and refresh the Oauth including the client.
-Remove the app and reinstall. Delete the current accessories and persist directories (make sure you've done that backup though).
-Get the new token and api directory number from the app config, then fix your config.json
-Fire it up and see if the sensors show up right.

That's what I would do anyway. If that worked, I would try replacing the accessories and persist directories with the backups and then start homebridge again and see if they still work.


Changing to 8005 lost every device. AWESOME!


BS it's "non destructive". The installation instructions on his repo even clearly say 8000!

Anyone with an actual LEGIT idea??? Once I get my devices back that is.


Hey sorry that happened. You just need to install -g homebridge-hubitat-tonesto7

Mine broke too, but I hadn't changed the port. I think it was poking around in the index.js file that did it to mine. Maybe you were looking at your index.js too in trying to help me?

Anyway, I changed mine to port 8000 and it still runs. So if you just reinstall the plugin all should be fixed. But please do backup the persist and accessories directories before you go any further.


Lost everything.... Devices, automations, routines, etc.... Great advice you give!


I've changed the port before and just did it again. Didn't harm a thing.

Here's the output from my console.

[11/7/2018, 9:08:53 PM] Homebridge is running on port 45525.

[11/7/2018, 9:08:53 PM] [Hubitat] Direct Connect Is Listening On


Here I am back on 8005

[11/7/2018, 9:17:04 PM] [Hubitat] update_method: direct

[11/7/2018, 9:17:04 PM] Homebridge is running on port 45525.

[11/7/2018, 9:17:04 PM] [Hubitat] Direct Connect Is Listening On

All still good. Sorry you're having trouble. If you opened the index.js file like I did, I honestly suspect that is the cause.


Lol is there some weird juju on a Mac that breaks things when you look at a file?


At this point I couldn't give a flying you know what as to what you're seeing. I took your advice and "simply" changed the port to 8005 and now I'm redoing everything because of it.

Oh, and when I got it back up and running I added one single device. Yup, a contact sensor and guess what??? It always says closed.... Genius!!!!