brutella / hc

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

Expose addAccessory in the transport interface. #82

Closed DanielO closed 7 years ago

DanielO commented 7 years ago

While I think this code is OK I have been unable to get a transport with >1 accessory working so maybe it's broken.

brutella commented 7 years ago

You can add more than one accessory to a transport as described in #72

DanielO commented 7 years ago

Ahh I am a Go newbie so I couldn't work it out :)

Also, for my approach I create the transport with a particular name but then add other accessories in a loop.

On a related note: is there any sample code for a bridge? I looked at the LiFX one but it seems to create a new transport for every light.

brutella commented 7 years ago

No there isn't a sample code for a bridge, but it's documented here