Possible Route to Home Kit?

Thatā€™s what I saw and then later discovered it was because my keys were wrong in the config.json

In my case it was because I was clicking on ā€œView the configuration data for Homebridgeā€, copying the info, but then jumping over to Homebridge and pasting it in, without remembering to go back to Hubitat and click the back arrow, then Done

Setup an Apple TV 4 last night. Works perfectly to sync Hubitat virtual switches in Homebridge with Insteon devices exposed in HomeKit via the Insteon-Local Homebridge plugin. Insteon devices triggered via a Pico in Hubitat react almost instantly. Best of all, this is a completely local setup, that also allows remote access to Hubitat devices!

This is a nice option until direct Insteon integration is available.

1 Like

Could this mean the beginning of a HomeKit Integration without the need of HomeBridge?

https://www.forbes.com/sites/davidphelan/2018/03/31/the-one-thing-nobody-has-told-you-about-apple-ios-11-3-why-the-homekit-upgrade-is-a-game-changer/#3be5a2de64c4

Possibly for the masses.

What is very appealing about Homebridge for hobbyists like us is, integrations are ready quickly. Even if theyā€™re not perfect, many of us donā€™t care. We just want them for certain purposes, and often the Homebridge plugin fits the bill perfectly. My Insteon integration is exactly that scenario. I canā€™t dim from Hubitat, but donā€™t use that functionality often enough from anywhere outside of one of the dimmer switches to care. The only thing I do wish I had was local integration of Insteon sensors with Homebridge.

Homebridge IS HomeKit for the impatient, as it was originally billed. Official HomeKit without the MFi chip is simply Apple getting with the program, and finally conceding that IoT integration requires compromise. Plus they want to sell more Homepods.

Ok. I give up. I keep getting this error when I attempt to start homebridge:

/usr/local/lib/node_modules/homebridge/lib/api.js:122
      throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
      ^

Error: The requested platform 'Hubitat' was not registered by any plugin.
    at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:122:13)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:45)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

You are using @tonesto7's plugin, correct? Have you ever used Homebridge previously (e.g. with the old ST plugin) ? What platform are you running it on?

Also, if you can share your config.json file (obscure your private key), that would help us to assist you in debugging the issue.

Yes

Yes. It worked when on ST

Pi 3

{
    "bridge" : {
    "username" : "{myUserName}",
    "name" : "Homebridge",
    "pin" : "***-**-***",
    "port" : 51826
    },
    "description": "JSON API",
    "platforms": [
        {
            "platform": "Hubitat",
            "name": "Hubitat",
            "app_url": "http://{IP}/apps/api/581/",
            "access_token": "{myToken}"
        }
    ]
}

I am running on a PI3 as well, running latest version of Raspian Stretch, NodeJS, etcā€¦ (i.e. a very clean, fresh install a few days ago.)

My config.json is as follows:

{
    "bridge": {
        "name": "Homebridge",
        "username": "{my username}",
        "port": 51826,
        "pin": "xxx-xx-xxx"
    },
    
    "description": "JSON API",
    "platforms": [
        {
            "platform": "Hubitat",
            "name": "Hubitat",
            "app_url": "http://192.168.1.144/apps/api/616/",
            "access_token": "{my token}"
        }
    ]
}

which looks pretty much identical to yours, I believe, except the order of a few lines (which shouldnā€™t hurt anything.)

If you try to run the smartthings plugin instead, does it start without errors? Just trying to determine if the issue is with Homebridge OR the Hubitat pluginā€¦

I removed the plug in and installed it again. Everything is working now.

2 Likes

Had HomeKit running for about a week, works pretty great. Had a few questions/thoughts:

  1. Anyone notice duplicate devices? I have two devices for lights (ie. Barn lights)

  2. (Way more important), is there a way to limit the attributes that come from hubitat into ST. For instance, I have 5 doors leading out to my back yard each is a contact sensor but now I have 5 temperature sensors that I donā€™t need. This limitation existed in ST.

Anyone else have an experience where a restart of the home kit container (or RPI) caused you to lose all the customized names and room assignments within home kit?

Yes, nearly every time. Very annoying given that HomeKit is just a DB,

Glad I am not the only one. @tonesto7 ā€¦ any ideas on how to remedy this?

Also, any thoughts on polling and has anyone seen whether polling more frequently (ie. every 10 seconds) impacts hubitat performance.

I am having a s#@t show worth of issues right now and tried to isolate whether it was caused by homekit/hombridge.

Iā€™m not having the same issue, but Iā€™m not using it on a RPi.

I needed more responsive polling so I could use changes in Hubitat virtual switches to trigger Insteon devices and vise-versa, so I am using a 1 second polling time. No issues with either platform for the last 11 days Iā€™ve been running this way.

So Iā€™ve noticed that my hue hub stopped being as responsive and I couldnā€™t figure out why. I removed all of my custom apps but it wasnā€™t until I removed homebridge that Iā€™ve seen improvements.

I removed and re-installed the hubitat plugin, things have been all quite and responsive for about 15 hours. I think things to focus on to improve the plug-in:

  1. Somehow storing room, name, device type data within the plugin so the user does not have to re-build home kit in the event the RPI/container restarts;

  2. Somehow being able to stop device attributes from appearing as separate devices. As an example, a contact sensor with a temperature sensor appears as two separate devices. If the user does not want to see one of them the user should be able to have it not appear. This would seemingly require less data to be pushed to home kit and may improve performance.

  3. Overall improvements as the plugin relates to the hubitat infrastructure. I think this has a lot to do with polling and the resources placed on the hubitat. I have amended my config.json removing all references to polling within the plugin and have gotten stabilityā€¦ I had polling @ 10 seconds and I think this caused tremendous stress on the hubitat system as automations failed and response time within hubitat plummeted.

Just my thoughtsā€¦__

May need to be optimized for a RPi. I have a PZero W I was going to try, but that might be a waste of time. The fact Iā€™m running it on an old Mac seems to be enough, but then again, I also only have 21 devices connected to the Hub right now, so the load is light compared to most here.

I used to see those issues using the ST plugin about a year ago but I think the issue was more with me tinkering with homebridge more than anything. Over the last couple months I havenā€™t seen this happen at all

I guess I should have said something earlier about you guys using polling.

Itā€™s no longer necessary as itā€™s all event driven now meaning hubitat sends the data to HomeKit when it happens.

As to pollingā€¦ that is correct. Events get pushed from hubitat and I did not recognize that. Thank you for the porting.

I do, however, note that restarting the container will remove all home kit configurations and scenes. Paul was aware of this also but never got around to addressing it because it is difficult to replicate. Mainly because sometimes restarting the container (or rebooting homebridge) has no effect on the room and scene configuration for home kit and sometimes it does.

Believe me if I could observe a reason or pattern I would illustrate, but I can tell you that @csteele seems to have the same problem with rooms configurations and scenes disappearing within home kit. This is not your fault and would never insinuate it to be. Youā€™ve been a blessing to this community and the ST community for a long time, I was just passing along some stuff to help others that were experiencing similar issues.

1 Like