Device missing from Homekit

I have five Kasa smart plugs (model HS103) that are controlled by my Hubitat Elevation hub, and all five are connected to HomeKit via Homebridge running on a rPi. The Homebridge installation has been very stable and responsive in both directions.

UNFORTUNATELY, one of the five plugs (I'll refer to it as the "office lamp") is not visible in Homekit (on the Home app in either my Mac or iPhone).

I have tripple-checked the configuration and there is nothing different about the configuration of the office lamp and the other four;

  • all five are selected in the HB app on the HE
  • All five are configured as "lights" in the HB app
  • The other four show up in Homekit, but the 5th one doesn't.
  • The really interesting thing is when I watch the HB logs and trigger the switch from Hubitat, I can see the office lamp events trigger in real time, so I know HB is connected with the device. The device just is not showing up in the Home app.

I have removed the office lamp from Homebridge and added it back again, and have also added it as a "switch" instead of a "light". None of this has worked to make the device visible in the Home apps.

Anyone have a clue or a suggested course of action to fix this?

Which HomeBridge integration are you using? There are at least 3 or 4. It would be most productive to post this in the thread for the specific integration that you’re having issues with.

FWIW, I use @dan.t’s MakerAPI integration and haven’t encountered anything like this.

Did you check your HomeBridge log file? When you first start HomeBridge it should tell you which devices are registered. If you don't see your switch there then you can try the following:

  1. Stop Homebridge
  2. Delete all the files in your homebridge/persist and homebridge/accessories directories.
  3. Restart HomeBridge
1 Like

I'm using Tony's homebridge-hubitat-tonesto7

Did you check every room in HomeKit. I cannot tell the number of times I swore a device wasn’t there and it was all along. I just wasn’t seeing it.

The Home app really needs a search or they need to include Home app devices in the Spotlight search.

2 Likes

If you pull up the bridge in the home app you can define the default room for that bridge. Any new device added to that bridge will be initially assigned to that room. From there you can reassign it to which ever room you want. The newly added device should also default to be included in the Home tab within the app.

2 Likes

looked everywhere in Homekit. Mine is setup with "default room" as the default for newly installed devices. That said, I have scoured all rooms.

I'm trying to figure out how to delete the homebridge/persist and homebridge/accessories directories - my limited command line skills are rusty at best. Treating this as a learning experience...

All your rooms will need redefining if you do that. You can find their location in the Homebridge docs if I remember correctly. Otherwise a Google search will show you.

To remove a directory is rm -r [directory name]

If it gives an error, rm -rf should do it.

If you're using the latest version of the HomeBridge UI you can try using the remove cached accessory option. I haven't had to use this before so i'm not sure how well it works.

Edit: I should have mentioned that if you are using the UI you can also check the accessories tab to see if HomeBridge is recognizing the device.

Actions taken > results

  • Cleared cached accessories using Homebridge UI function, restarted HB > no change
  • Deleted persist and accessories folders, restarted HB > all devices in Homekit lost connection

Well, ya gotta have a sense of humor....trying to fix 1 device I broke 33 others. Tried removing all devices in the HB app on HE, then adding them back > no change. All devices in Homekit indicate "no response" - this includes my Ring doorbell which is connected to Homekit via a separate HB plugin.

Can you post a screenshot of your HomeBridge log file?

Did a restart - here are the logs

From the logs it looks like 37 devices are loading into HomeBridge. When the persist and accessories folders were deleted it also removed the HomeKit pairing registration. You'll have to go back into the Home app and re-add the bridge. Make sure you remove the old bridge before adding the new one.

1 Like

Thank you! That worked!
Everything is operating perfectly INCLUDING the original missing Kasa switch that started this thread!

For my learning - how could you tell the Homekit pairing was removed?

2 Likes

There is nothing in the log file that indicates this. The reason I wanted to see the log was to make sure that your devices were being loaded into HomeBridge.

For reference the persist directory contains the pairing data with HomeKit clients and the identifier cache that maps accessory, service and characteristic Universally Unique Identifiers (UUIDs) to short IDs used in the Homekit accessory protocol. Deleting this information is the Homebridge equivalent of a factory reset. After doing this, you will always need to remove the stale bridge from HomeKit, and re-pair it.

2 Likes

Thanks!

You’re welcome, I’m glad things worked out for you.

Also, just so you know, whenever you delete the accessories directory it affects any HomeKit automations that you may have. If you had any automations you will have to go in and re-add the device.