maximkulkin / esp-homekit

Apple HomeKit accessory server library for ESP-OPEN-RTOS
MIT License
1.11k stars 170 forks source link

HAP Protocol defines mDNS TXT record md= to mean model name, not device name #27

Closed milliamp closed 6 years ago

milliamp commented 6 years ago

I have implemented device names that include partial MAC addresses as in the accessory_name example and then tried to mDNS to discover all devices with my model name on the network and noticed that the md= TXT record is set to the Accessory Name characteristic instead of the Model characteristic. After reading section 5.4 of the HAP protocol document, Table 5-7 defines md= to be the model name.

The mDNS facility name is correctly set to the accessory name in the code which matches the protocol document in the first paragraph of section 5.4 so that is awesome.

This change would allow us to discover all devices of a particular model on the network. I'm using this to discover all devices of the correct model to then use rboot-api and ota-tftp to update the firmware on the network only to the correct devices.

maximkulkin commented 6 years ago

Thank you for taking care of this!