HomeACcessoryKid / ESP8266-HomeKit-Demo

User part of the ESP8266-HomeKit foundation
https://www.youtube.com/watch?v=Xnr-utWDIR8
Apache License 2.0
125 stars 27 forks source link

Set accessory name to include Mac address to make unique #29

Closed maccoylton closed 6 years ago

maccoylton commented 6 years ago

Hi, any idea the maximum size of the accessory name, I tried adding some code to the user_init function to append the Mac address to the accessory name, however although the resultant mdns entry looks ok, and the accessory name shows as I expect in the iOS Home app, I cannot get a successful pair. There is constant called ANLMAX used in send_mdns function, but I don't see where that is defined.

HomeACcessoryKid commented 6 years ago

It is in hk.c and is 32 hk.h is part of ESP8266-HomeKit

BR, HacK

On 25 Sep 2017, at 02:31, maccoylton notifications@github.com wrote:

Hi, and idea the maximum size of the accessory name, I tried adding some code to the user_init function to append the Mac address to the accessory name, however although the resultant mdns entry looks ok, and the accessory name shows as I expect in the iOS Home app, I cannot get a successful pair. There is constant called ANLMAX used in send_mdns function, but I don't see where that is defined.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

maccoylton commented 6 years ago

So should't this statement in hk.c be defined with ANLMAX ?

byte myACCname[14]

my issue could something getting overwritten if my actual accessory name is > 14 byes given ANLMAX is defined as 32 ?

thanks in advance

HomeACcessoryKid commented 6 years ago

I think you are right. I've just pushed this change. Thanks for your help.