Homebridge Plug-in

Thanks @SmartHomePrimer, @tonesto7 updated the code to 1.5.5 and I'm using that now.

you guys can exclude specific capabilities for a specific device in the config.json

"excluded_capabilities": {
       "HUBITAT-DEVICE-ID-1": [
          "Switch",
          "Temperature Measurement"
       ]
}
1 Like

Yes, but @walksonair said Presence Sensor cabability wasn’t being excluded. So I offered an alternative.

I'm trying to exclude temperature measurements from my window sensors but can't seem to get them removed. Any help would be much appreciated. I used the device ID from the Hubitat logs.

"excluded_capabilities": {
"HUBITAT-DEVICE-ID-96": [
"Temperature Measurement"

This doesn't do it?

58%20AM

Tonesto's example of "HUBITAT-DEVICE-ID-1" is replaced by "96" in your case.

No I have that turned on and they still show up. That’s why I was trying to exclude them in the config. I also tried just “96” in my config and the temp still showed up.

1 Like

That toggle never seems to work for me either...

I updated to the latest version today and am still getting the same continuous arming in home kit. Hubitat shows armed.

I have the same but havent had time to open up an issue on Github. Can you do that for us @black01gt ?

Me too.

Done

1 Like

WARNING:

For those of you using a Mac for Homebridge, do not upgrade to Mojave.

$ homebridge
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:583:19)

It won't start for me.

I installed it on a RPi I had available while I try and track it down.

1 Like

You can't use print working directory anymore in Mojave ?

No, that was a typo. :frowning:

I got it working, finally.

I had to uninstall everything, including a manual uninstall of node & npm.

Then get the latest of everything (node.js v10.13.0 & npm v6.4.1)

Installing Homebridge again node-gyp complains:

$ sudo npm i -g homebridge
/usr/local/bin/homebridge -> /usr/local/lib/node_modules/homebridge/bin/homebridge

> curve25519-n@1.4.0 install /usr/local/lib/node_modules/homebridge/node_modules/curve25519-n
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/john/.node-gyp/10.13.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/curve25519-n/.node-gyp"

I changed to:
sudo npm i -g --unsafe-perm homebridge

and after a thousand warnings, it compiled node-gyp and completed the install.
And worked:

$ homebridge
[11/23/2018, 12:57:36 PM] config.json (.homebridge/config.json) not found.
[11/23/2018, 12:57:36 PM] No plugins found. See the README for information on installing plugins.
Setup Payload:
X-HM://0023ISYWYCBIK
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

I copied back my saved persist and accessories directory/files and the saved config.json and a restart of Homebridge worked. All my devices were back, but not in their assigned rooms.

I used "Controller" (the $5 app that does backups of HomeKit) and restored it BUT that is not ideal. It put everything back in the rooms BUT 1) left everything in Favorites too. So I had to go into each tile and turn that off. Would have been just as easy to correct the room at the same time. 2) Automations didn't restore fully. The invite to my wife's phone is gone, so I'll have to do that a 23rd time.

I shut the RPi and it's back to running on my Mac again.

I think (but not positive) that the rooms get messed up, even with the persist and accessories directories backed up, when the HomeKit code changes. If you know what it was before, you could try changing that then restore the backed up directories.

I did this once before and forgot to record what the HomeKit code was before, so i was screwed and had to do the same thing you're doing right now. I never tested the hypothesis that going back to the same code would fix the room assignments because I didn't want to have to go through that again.

Don't think so, but could be wrong.

Apple's HomeKit is actually just a DB. They outlined the schema for the DB and APIs to access that schema, but everything else was left to apps programmers. Catch-22, no apps, no one could make great use of it, leading to zero programmers wanting to invest. Apple then came out with the Home App (years too late) and we're using it.

So.. I believe the room assignments are in the HomeKit DB and of course, here on the Hubitat/Homebridge side, we have nothing like that. So it's my thinking that the "zeros" we have for rooms get sent to HomeKit and the DB is promptly overwritten with.. nothing. I do not believe Homebridge has a facility for rooms, so I'm not saying Homebridge is doing something wrong. I'm saying, when Homebridge registers each device, most of the time that does NOT cause the Room field in the HomeKit DB to be blanked. But once in a while, it does.

Accessories and persist (files within) are part of the total, but somewhere there's something to get tripped over and the DB does start blanking.

That is just the imaginary explanation, weaving through the meager clues I have to build a "story."

1 Like

So we need to find that DB!

But, I have restored the entire Mac from Time Machine backup to avoid having to setup those rooms all over again. I hate doing it on my phone and my laptop is too old not to upgrade to Mojave, so I'll never get Home on the laptop until I upgrade.

There's that web app (forget the name) to configure via desktop/laptop, but I didn't want to do insecure install from scratch to get it, so have never bothered with it.

The DB is readily available. That Controller App reads it and backs it up.. but not everything and not well.

2 Likes

Oooooh have you tried a restore from the controller app? I've noticed it picks up long dead scenes. Seems slightly concerning.

Yes, I did a save /backup using the controller app 10 minutes before wiping everything off.

Took about 30 mins to get all the Node.js and NPM pieces off. Then about 20 mins to put it all back with a test as each component finished.

The Controller app needs, one at a time, for me to stitch the HomeKit name to the Homebridge name, even though they are 100% matches. That takes another 20 mins for 42 devices.

I did get 4 extra somethings.. maybe it was a scene.. I didn't memorize, just deleted without really looking.

My Automations, which are presence, didn't restore the presence sensor(switch). The frame of the automation was there but I had to pick person and switch for each.

3 Likes