Mixiaoxiao / Arduino-HomeKit-ESP8266

Native Apple HomeKit accessory implementation for the ESP8266 Arduino core.
MIT License
1.48k stars 278 forks source link

hiding accessories #239

Open thncode opened 8 months ago

thncode commented 8 months ago

I could'nt find that by searching and experimenting - is it possible to hide accessories at run time?

d4rkmen commented 8 months ago

If you change config number value in txt record, the controller will reload accessory information. So, remove accessory or some service from the description, and shift config number

thncode commented 8 months ago

Sorry, what is 'config number value in txt record'? Could you please paste a code snippet?

arturlukosek commented 6 months ago

@thncode have you managed to figure out how to hide accessories?

thncode commented 6 months ago

no - I did'nt understand the comment of @d4rkmen. I had to make a workaround by using two sets of accessories, which of course does not work for all use cases...

maccoylton commented 6 months ago

HomeKit publishes via mdns some info that helps the client app, for example the Apple Home app, discover and use your accessory. Within that mdns record there is information including a config number. I think the suggestion is if you increment that config number then the client will pickup any changes, seem to remember that it mentions this in the homekit spec.

It is stored within the struct you create with arduino_homekit_setup

d4rkmen commented 6 months ago

Controller will reload accessory information when config number changes. This is the way it works