Skip to content

Commit 3db3877

Browse files
committed
advertise pv=1.1 (HAP R2) in mDNS
Experiment: bump the protocol-version TXT record from 1.0 (HAP R1) to 1.1 (HAP R2, what every modern HK accessory advertises). The underlying lib still implements R1 semantics; this is purely a metadata change to see whether iOS Home's automation editor changes how it renders our HeaterCooler accessory's preview tile (it currently shows CurrentTemperature.min_value as a placeholder instead of the live value).
1 parent c2575e1 commit 3db3877

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/arduino_homekit_server.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3241,7 +3241,13 @@ void homekit_mdns_init(homekit_server_t *server) {
32413241
}
32423242
);
32433243
MDNS.addServiceTxt(mdns_service, "md", model->value.string_value);
3244-
MDNS.addServiceTxt(mdns_service, "pv", "1.0");
3244+
// HAP R2 (2018+) protocol version. Most modern HK accessories advertise
3245+
// pv=1.1. The Mixiaoxiao lib was originally HAP R1; we advertise 1.1 to
3246+
// see if iOS Home's automation editor renders the device tile differently
3247+
// (it falls back to CurrentTemperature.min_value when it can't read what
3248+
// it expects — possibly TargetTemperature, which the HeaterCooler service
3249+
// doesn't include).
3250+
MDNS.addServiceTxt(mdns_service, "pv", "1.1");
32453251
MDNS.addServiceTxt(mdns_service, "id", server->accessory_id);
32463252
//"c#" is a DynamicServiceTxt
32473253
//Current configuration number. Required.

0 commit comments

Comments
 (0)