brutella / hc

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

Remove Device By HomeControl #125

Closed OukiMegumi closed 6 years ago

OukiMegumi commented 6 years ago

Hello, I've added four devices by HomeControl.Now I want to remove a device,but not by Home.what should I do? Can I do it by HomeControl?

brutella commented 6 years ago

You can remove it from the list of accessories (or services) in HomeControl. Your iOS device will get notified about this change and will remove it from HomeKit as well.

OukiMegumi commented 6 years ago

Hello Brutella, I am appreciated your help about previous questions. Now I have another question: I am using HomeControl code on Raspberry Pi. How can I match devices in HOME with devices in HomeControl when I unplug Raspberry Pi and reboot it? I tried to solve this by using hc.NewIPTransport; however, it will have some bugs if it is not in order. For example, it is okay when HomeControl devices input as A B C D. If it inputs as A C B D, B and C in Home devices would not response. Do I have some way to improve this?

brutella commented 6 years ago

The order in which you add accessories to an ip transport does matter. So make sure that they are in order – sort them by their name or identifier or sth.