Mixiaoxiao / Arduino-HomeKit-ESP8266

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

You cannot add two identical devices #128

Open askarkurymbayev opened 3 years ago

askarkurymbayev commented 3 years ago

Greetings friends, faced with the problem of inability to add multiple devices with the same firmware, have any ideas about how to solve the problem?

Mixiaoxiao commented 3 years ago

Gen the accessory name with MAC or chip-id.

askarkurymbayev commented 3 years ago

you can help me generate a name with a mac address, I try with WiFi.macAddress (), but it doesn't work

jenspr commented 3 years ago

Hi there, did you solve that.. I might have run into same problem. I setup one instance on one ESP8266 and then I tried to build another one and I can't connect via HomeKit.. I get "Something went wrong" during pairing in iOS Home (after entering the pairing code 11111...).

I did not know if and what I should change in code? Any hint?

dsbaha commented 3 years ago

I, too, have been looking at this. I suspect you have to change it in your config definition. Trying to find a way to generate a device name and a pairing password based on ESP.getChipID() or something.

askarkurymbayev commented 3 years ago

good time of the day friends, who managed to solve the problem? as I understand it, you need to somehow edit the line homekit_characteristic_t cha_name = HOMEKITCHARACTERISTIC(NAME, "xxxxxx");

dennisc1213 commented 3 years ago

good time of the day friends, who managed to solve the problem? as I understand it, you need to somehow edit the line homekit_characteristic_t cha_name = HOMEKITCHARACTERISTIC(NAME, "xxxxxx");

I am a beginner to this. But I solved this issue by manually editing this line in My_accessory.c HOMEKIT_CHARACTERISTIC(NAME, "Multiple Sensors")

By editing "Multiple Sensors" to Unique words, I managed to run three identical devices (Temperature sensor) at home.

hitenlulla commented 2 years ago

@dennisc1213 Hello, I did this and still I'm facing the issue. Can you help me out?

madmacks59 commented 2 years ago

The specification states that device ID number "identifier" for accessories must be a unique random number generated whenever a factory reset happens (meaning when you build your code and deploy it to the ESP8266) and must persist across reboots. So, as stated before, make sure your identifiers are unique across your LAN...