HomeKit: Works Great, But do I trust these Usage Stats?

I saw this a couple of days ago and rebooted to see if it changed. Nope. Basically this is the "issue." Despite having 77 devices shared via the HomeKit app - and it working really well - the Logs->App Stats are showing almost no resources being used.

Stats:

Lest you think that something is broken and no stats are reporting correctly, I just looked at the busiest top 3 apps:

I'm guessing that the HomeKit app isn't quite this efficient...

Anyone else seeing this?

Yep, it's just 1 "count" here too. Presumably it's because the app itself does almost nothing in the app code. Hubitat has 2 places it can run an "app", via a user app that runs Groovy code, which has a ton of limitations, such as being able to open ports, do lower level networking stuff, etc. Or Hubitat can run Java-based stuff in its "core", by means available only to the Hubitat devs. Since this latter option is just Java running on Linux, it's effectively limitless as to what it can do, and it's certainly where the HomeKit integration actually runs. That's why there's the "HomeKit integration is not running, start now?" option when you first install it, that's starting up some Java-based (presumably, could be another language) service on the core OS.

That said, because it's not running all this in Groovy, and Java is remarkably efficient for what it is, it's likely consuming very little resources. It's shocking the % of CPU usage some of my Groovy apps use. I know the Hubitat CPU isn't very powerful, but I have an app that just does Solar Angle calculations and it uses like 1% of a core just keeping a few states updated by waking up once a minute, doing a couple lines of trigonometry calculations and going back to sleep. Groovy is an absolute pig for resources compared to "native" Java, even tho they both run on the same JVM.

It would be really really nice to have a "power user" option for running JAR files, because I've got a number of apps that use around 5% of the total CPU and really, based on what they're actually doing, it should be more like 0.005%.

1 Like

If all this is true, running native HomeKit integration is a huge advantage over HomeBridge from a hub resource perspective. I'm very glad that I moved over to native. All benefit and no downsides. Now that doors and garages work, it's a no brainer.