brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

Listening to homekit #191

Closed khwerhahn closed 3 years ago

khwerhahn commented 3 years ago

Hi,

I was wondering if somebody has an example on how to connect to homekit and then get all devices and listen to them. Also if further devices are added, they should also be added.

Thanks

timoschilling commented 3 years ago

That what you want isn't possible by this and any other HomeKit accessory lib. HomeKit didn't allow inter device communication. If you want to build an devise that acts based on values from another device you need to create an automatisation using the Apple Home or Shortcuts app. If you want to create an dashboard or logger you need to create an iOS or Mac (since Big Sur) app.

khwerhahn commented 3 years ago

So in other words: I need to know each device and create it "manually" with hc?

timoschilling commented 3 years ago

Sorry it still sounds like you have wrong understanding what this lib does and how HomeKit works. Can you explain the big picture of what you want to do?

khwerhahn commented 3 years ago

Seems so :-)

I would like to create a little app that I can deploy on a raspberry pi with a touch screen and install it around the house so that people can use it to interact with the smart home. So the app just needs to know which room it is in and shows the available devices.

timoschilling commented 3 years ago

That's not possible, only iOS/macOS apps can interact with HomeKit devices.

khwerhahn commented 3 years ago

Thanks for helping, even though it is a little disappointing :-)