Arduino-HomeKit-ESP8266 icon indicating copy to clipboard operation
Arduino-HomeKit-ESP8266 copied to clipboard

MDNS.announce

Open CommyD opened this issue 4 years ago • 2 comments

Hi everyone,

I've been using this library for a while, and i often see that the accessory is not responding; looking thru the closed issues, i see that by using MDNS.announce(), could be a possible fix. Can someone please let me know how to use/ where to write MDNS.announce()? a printscreen would really help :)

thanks in advance

CommyD avatar Oct 15 '20 14:10 CommyD

Hello @CommyD Try to add this code:

#include <Schedule.h>

bool announce() {
  MDNS.announce();
  return true;
}

void setup() {
//...
  schedule_recurrent_function_us(announce, 5000000);
//...
}

emelianov avatar Oct 17 '20 13:10 emelianov

@emelianov hello sir, i dont know if you'll respond to this, but i don't know where to add this following code into, is it into the main code or somewhere else, i've ESP32 and i know you said this code isn't applicable to that, But please help me it means a-lot!

ayush9upta avatar Jun 17 '22 21:06 ayush9upta