Homekit items are unresponsive

correct, im maintainer for homekit binding and did also some work on java-hap lib.
to my understanding we dont miss that many characteristics, besides of TV/Audio support. i tried to add all characteristics of a type.
Do you have examples where we have accessory type but not all characteristics? actually i dont know what to add to the binding, therefore no new commits to it.

and of course contributions are more than welcome.

regarding your issue, please try to run with mDNS switch off, i.e. keep it off all time. this is typically more stable setup.

can you also share how your mDNS entry looks like when openhab items are not accessible?

Ever come across a door (in a house) that’s plugged in? :wink: Domestic locks all use batteries… Not all give a low battery indicator, but they all give a battery level. Likewise with most if not all sensors, temperature, motion, humidity, door and window contacts etc.

I switched to mDNS from the internal jmDNS. It still didn’t work (overnight). I checked the advertisement this morning and it was showing, but the accessories were unresponsive. I went into OH and flicked the mDNS back and forth and it started working again without the need for an OH restart.

mDNS details? Is this what you’re looking for? Remember, I currently have two bridges running. The item headed ‘home bridge’ is my HAP implementation using Domoticz as the source and is the main homekit bridge. That’s a stable and operational bridge. The other is the openHab bridge and is on a ‘test home’ at the moment. This is not stable, fails overnight and I’m having issues exposing some accessories. I can’t get Yale ZWave doors to show in it (for instance).

  • _hap._tcp. - 2 items
    – Home Bridge
    – – GCU-Itll-Be-Over-By-Christmas.local.
    – – 192.168.8.52:8000
    – – [fe80::835:96e4:9424:d2ad]:8000
    – – md=Home Bridge
    – – ff=0
    – – pv=1.0
    – – s#=1
    – – id=60:9E:52:2E:2D:88
    – – sh=EP21Qw==
    – – c#=1730
    – – sf=0
    – – ci=2
    – openHABKit
    – – 192-168-8-47.local.
    – – 192.168.8.47:9123
    – – c#=440
    – – s#=1
    – – ff=0
    – – sf=0
    – – sh=CfUNMA==
    – – ci=1
    – – md=openHABKit
    – – id=82:79:b4:12:ef:f4




ah, ok. battery is not direct characteristics on the door HAP service type but HAP support multiple services combined to a single item. the combination of services is not supported. so, you can have door service, battery service but not door+battery service as one item.

here im unsure what is the best way to model it in openhab. basically we need 2 groups: for 1st service and for 2nd services and then make reference to each other and also mark one as primary. i was thinking of group hierarchies here.

the mDNS looks good. strange that home app show items as not responsive but republishing of mDNS (switch external/interal) solves it. it does not make much sense for me. i would tend here to a network issue. how you check mdns entries? can you do it from the same mobile / ipad you have home app on?

you can try one more thing: enable trace for homekit in karaf console

log:set TRACE io.github.hapjava

and see whether openhab get any requests.

My logging is getting quite verbose. I have all the z-wave stuff turned on, as that doesn’t appear to work very well either. I’ll turn it on now and see what’s going on. Tomorrow, I’ll pay better attention the actual state of the advertisement, to see if it changes at all when I tickle the integration.

Sounds similar to issues I was having with HomeKit and my setup.

Specifically I suggest making a backup of your homekit.json when it is in a good working state. Then if you get this problem again, replace the json file from backup and restart.

So far since I posted (link below) this originally (on Jul 13, 2021) I have not had another issue with Unresponsive Items. (so like almost 60 days ago).

Hopefully this might be of use for you:

thanks mike, but I haven’t actually got an installation to go overnight yet without failing.

If I remember correctly only Information pertaining to the network side of things for Homekit is stored in that .json file. Just after setting up openhab in HomeKit App on iOS, I would grab a copy of that file, before making any other changes in the settings of homekit add-on.

What I was noticing was in a good working .json I was seeing Mac Addresses and User information (longer strings), and when they are bad, those long string are missing. I believe these are the address, etc of the devices on your network that are capable of being the HomeKit Hub (iPad, HomePod etc…).

Also saving the file in HomeKit add-on (via UI) does not always cause the data to be lost, so sometimes it works and others not.

hi mike, where will I find these files? I’m new to OH.

Is this the kind of stuff I should be expecting to see?

{
  "salt": {
    "class": "java.lang.String",
    "value": "=a long private key removed="
  },
  "accessory_count": {
    "class": "java.lang.String",
    "value": "27"
  },
  "mac": {
    "class": "java.lang.String",
    "value": "=a mac address removed="
  },
  "revision": {
    "class": "java.lang.String",
    "value": "440"
  },
  "privateKey": {
    "class": "java.lang.String",
    "value": "=a hash key removed="
  },
  "user_with mac address and guid mashed together": {
    "class": "java.lang.String",
    "value": "=another hash key removed="
  }
}

Yes that looks right (“From Memory”) Ill check my file again when I get back home and update if wrong.

Update After checking with my homekit.json file I can confirm that looks correct, only difference is I have an additional user entry (probably from a 2nd HomeKit device that acts as a Hub).

Next time (if there is one) when you lose connection compare the 2 files if you would please. I am curious if someone else can confirm my findings.
Thanks.

Morning All!
Not sure what I did, if anything, other than to change the SMB password so I could get to the config files for inspection; but, this morning it’s responding!

Thanks for your all your help, if I have anymore questions I’ll be sure to ask.
Happy Days!

May I ask what networking hardware you guys use?
I have an AmpliFi Setup and AmpliFi, amongst a few others seem to habe mDNS issues, according to a bit of googling.

Hi Bernhard
mDNS like Bonjour doesn’t tend to go over subnets very well. Which Amplifi is it and how many nodes are you running? Is it meshed?

I use Ubiquiti with a number of access points and a PI running a local controller, a single unified domain with a cable backhaul to the main switch.

I am currently using Aruba Instant On devices for my Local network. AP11D Router with a AP11 Access Point.

i have full Ubiquiti stack including USG and i had to enable mDNS support on USG/controller.

1 Like

I have posted a bug relating to this integration on GitHub. it has repeatable behaviour and it’s effect is undesirable. Currently I can’t expose wall sockets to HomeKit as outlets.

An AmpliFi HD with two mesh nodes.
This is ubiquities consumer line that unfortunately does not allow to configure a lot of stuff.

That’s the thing with consumer hardware. It works great out of the box. Unless you have an issue, then you have almost no chance.

OpenWRT is more complex of course, but you can configure it any way you like/need

Which is not possible on the AmpliFi line.