Homebridge Plug-in

I’ve ported over and heavily modified the Homebridge (HomeKit) plugin made by @pdlovelace.

Screen Shots

New Features

  • Full Local Network Communication

  • Added Alarm support for Hubitat Safety Monitor

  • Added inputs to define device types in HomeKit for the following:

    • Lights
    • Fans
    • Speakers (Not Supported in Home App) - Apple has really didn’t add much to this except mute and volume control
    • Window Shades (Currently works with the Generic Z-wave Drive)
    • Native HomeKit Irrigation Support (Rachio Only at the moment)
  • You can have Devices created for selected modes in HomeKit that will trigger modes. (They are On when the linked mode is active)

  • Added the ability to restrict HomeKit from creating temp devices for Contacts and Water Sensors

  • I've added support for pretty much every characteristic HomeKit supports that aligns with Hubitat capabilities

The Code and Instructions

10 Likes

Thanks for the update Tony!

This plugin has bridged so many gaps and all local. There’s little I can think of that you’d be able to workaround at this point. Camera support will be an obvious need, but that hasn’t come to HE yet.

One thing I do have to do is create a rule to turn toggle switches into momentary switches since HE Generic buttons do not show up in HomeKit. I don’t know where the limitation is, but it would be great to either have the capability to use buttons in HomeKit automations, or have the capability to specify a switch as momentary. Even if it had to be done in the config.json, it would be a welcome improvement over a rule for every momentary switch. For that matter, it would be great if I could just do that in HE, and that would solve the issue everywhere.

Other than that, I wish that I could use my Insteon sensors and i/o link with the Insteon-local plugin, but that’s nothing to do with your plugin.

I can certainly accomplish this. As this is very similar to how the mode switches work

2 Likes

I do not know if the problem comes from Homebridge or plugins. But when there is a restart of the HomeBridge, the devices that I had placed in rooms, leave rooms and return in the same room as the Homebridge. Is there a possibility to keep my devices in the rooms I chose.

Can you duplicate this issue with an official HomeKit device? I never experience this problem. Restart Homebridge all the time when I make changes. Might be an iCloud syncing issue. If a certified HomeKit device does the same thing, you can get support from Apple with the issue.

What are you running your homebridge instance under? Is this a docker instance?

No. install Homebridge Nfarina on Raspberry. With your plugins Hubitat and your plugins Smartthings. My lutron smart bridge is in (ex. room 1. and accessories device in Room 2.) and they never change place.

I'm glad it works well for you. I surely made a mistake some parts. I will try to start all over again.

Did you statically assign the data folder to be /var/homebridge?

no, I do not think so.

I'm checking tonight.

I used this

with a combination which includes this:

I used the Homebridge app on AppleStore. The application installs itself the homebridge in the Raspberry as well as plugins and automatic startup.

Well I’ve never even seen that before. Thanks for sharing.

we can install all the plugins that are available on NPMJS.COM and we can fill the config in the application and it is she who will upload it. It's going really well. I will see if my files that you spoke to me are in the right place. otherwise the application may move the config file.

Can't seem to get the plugin working. Homebridge is running and can be discovered by Home Kit, but no devices. I have home bridge and plugin installed on a Rpi.

[pi@raspberrypi:~/.homebridge $ homebridge
[2018-5-19 15:08:07] Loaded plugin: homebridge-hubitat-tonesto7
[2018-5-19 15:08:07] Registering platform 'homebridge-hubitat.Hubitat'
[2018-5-19 15:08:07] ---
[2018-5-19 15:08:07] Loaded config.json with 0 accessories and 1 platforms.
[2018-5-19 15:08:07] ---
[2018-5-19 15:08:07] Loading 1 platforms...
[2018-5-19 15:08:07] [Hubitat] Initializing Hubitat platform...
[2018-5-19 15:08:07] [Hubitat] Fetching Hubitat devices.
[2018-5-19 15:08:07] [Hubitat] update_method: direct
[2018-5-19 15:08:07] [Hubitat] Invalid Response from API call
[2018-5-19 15:08:07] [Hubitat] Unknown Capabilities: []
Setup Payload:
X-HM://0023ISYWYN313
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

Keep getting a error from API call. Below is the config.json file:-

{
"bridge": {
	"name": "Homebridge",
	"username": "A1:23:B4:56:78:CD",
	"port": 51827,
	"pin": "031-45-154"
},
"description": "JSON API",
"platforms": [{
	"platform": "Hubitat",
	"name": "Hubitat",
	"app_url": "10.14.122.248/apps/api/195",
	"access_token": "ed38b618-d1b3-4c97-b684-86559169bc75"
}]

}

Any ideas?

I have "accessories": [], after "description":,
That might be required.

Also, add http:// before your IP

Just a warning - I'm on a Mac, so don't copy my text or you'll get the fancy comma. I use Atom text editor. Really nice because it'll show you issues in your JSON file.

"accessories[]" isn't needed.

It's used to define entities individually. "platforms[]" is the method used when Homebridge can get the device detains itself. I've used the accessories method for one of the other controllers I have and it's a tedious way to go. Just like "platforms" also has the singular "platform" for each controller, "accessories" gets an "accessory" for each device. Avoid it if you can :slight_smile:

Make sure the port matches your rpi's port config. You're using a custom port of 51827 vs the standard 51826.

Did both, but still not working. What's concerning is that there is a message that says "Invalid Response from API call". What could i be doing wrong that's giving this message?

That could be my problem, but just can't wrap my head around this. Here is my setup:-

Rpi IP - 10.14.122.148
Hubitat - 10.14.122.248

Below is my son file:
{
"bridge": {
"name": "Homebridge",
"username": "A1:23:B4:56:78:CD",
"port": 51827,
"pin": "031-45-154"
},
"description": "JSON API",
"platforms": [{
"platform": "Hubitat",
"name": "Hubitat",
"app_url": "10.14.122.248/apps/api/196",
"access_token": "7577794b-8eac-45b9-9785-0db7c4a8f2e9",
"direct_ip": "10.14.122.248",
"direct_port": 8000
}]
}

After calling home bridge, this is what i see:

pi@raspberrypi : ~/.homebridge $ homebridge

[2018-5-21 00:48:00] Loaded plugin: homebridge-hubitat-tonesto7

[2018-5-21 00:48:00] Registering platform 'homebridge-hubitat.Hubitat'

[2018-5-21 00:48:00] ---

[2018-5-21 00:48:00] Loaded config.json with 0 accessories and 1 platforms.

[2018-5-21 00:48:00] ---

[2018-5-21 00:48:00] Loading 1 platforms...

[2018-5-21 00:48:00] [Hubitat] Initializing Hubitat platform...

[2018-5-21 00:48:00] [Hubitat] Fetching Hubitat devices.

[2018-5-21 00:48:00] [Hubitat] update_method: direct

[2018-5-21 00:48:00] [Hubitat] Invalid Response from API call

[2018-5-21 00:48:00] [Hubitat] Unknown Capabilities: []
.....[barcode]
[2018-5-21 00:48:01] Homebridge is running on port 51827.

[2018-5-21 00:48:01] [Hubitat] Direct Connect Active On: ( 10.14.122.248:8000)

Can you see what i'm doing wrong?

Try this...

{
"bridge": {
"name": "Homebridge",
"username": "A1:23:B4:56:78:CD",
"port": 51827,
"pin": "031-45-154"
},
"description": "JSON API",
"platforms": [{
"platform": "Hubitat",
"name": "Hubitat",
"app_url": "http://10.14.122.248/apps/api/196/",
"access_token": "7577794b-8eac-45b9-9785-0db7c4a8f2e9",
"update_method": "direct",
"direct_ip": "10.14.122.248",
"direct_port": 8005
}]
}

1 Like