Possible Route to Home Kit?

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

So you are running this in a docker container?

Yes, using the GUI suggested synology docker interface. It runs quite well actually.

I ask because I havenā€™t tested out homebridge under docker. I donā€™t understand why it would wipe the persist data on restart.

I have an ubuntu server vm iā€™ve perfected over the years.
I wish i would have known about this gem much sooner: GitHub - oznu/homebridge-config-ui-x: Homebridge Web UI plugin to monitor, manage and control Homebridge from a browser.

It would have made my life a lot earlier.

To be clear, I donā€™t think this is a homebridge issue as much as it is a plug-in issue. When I ran ST I ran homebridge and had no issues using the Foscam camera plug in, but the ST plug-in would reset the room configurations leaving the cameras in place.

When I ran the ST plug-in I also ran hombridge on RPI and not docker.

The problem there is that the ST and Hubitat plug-inā€™s donā€™t really store data any where that Iā€™m seeing.

The files that store the actual device info are homebridgeā€™s persist folder so if that is not being stored on the disk than that would explain why itā€™s resetting after every reboot.

Iā€™ll be honest iā€™m not a docker pro but I have a feeling itā€™s in the way homebridge gets configured in the docker enviroment.

Do you have a link to the exact docker image your using. I would love to try and test this on my Qnap.

If you can share any docker config parameters you may be using that would be awesome.

I want to be careful with the every reboot talk. When first setting up your plugin, I likely rebooted homebridge 30 times (adding/removing/polling/messing with config.json). This did not trigger the elimination of the room config. For some reason on Sunday, I did a reboot and poof gone! So, I say it is random.

You do raise an interesting point. If the room configuration is stored in the persist directory. Can I simply back that up and (in the event of destruction) copy a file(s) back and restore the room configuration?

This docker image self-installs on synology and installs the gui interface in 1 click. If you look through his repositories you will find variations of docker installs.

Because the install of the homebridge docker container was self-installing and self-configuring, I don't know where to go to find the configuration within docker.