horihiro / esp8266-google-home-notifier

MIT License
103 stars 23 forks source link

Failed to Connect with ESP8266 Wemos D1 mini #11

Closed katze closed 5 years ago

katze commented 6 years ago

Hi, I am experiencing random connection problems between a Wemos D1 mini (Esp8266) and Google Home. Most of time i've get this error : "Failed to Connect to 192.168.1.11:8009."

I've tried connecting with device name or ip, sending wav or TTS but it does not change anything. I'm using the last version of ESP8266 (2.4.2) installed using Arduino IDE Boards Manager

Do you have any advice ?

horihiro commented 6 years ago

The problem doesn't occur everytime? I haven't experienced the problem.

Is the ip address of Google home "192.168.1.11"? Please check Google Home and wifi AP in your home also if it is.

horihiro commented 6 years ago

Do you have any information about this issue?

katze commented 6 years ago

Hello, Sorry I was off for a few days. Notifications works about one in ten times. Other times I get the error : "Failed to Connect to 192.168.1.11:8009" after a long timeout. Maybe WiFiClientSecure is the cause, but i can't get logs.

192.168.1.11 is of course the ip of my Google Home Mini.

horihiro commented 5 years ago

hmm, I can't reproduce this issue.

horihiro commented 5 years ago

close once.

AjJordy commented 5 years ago

I get almost the same issue. But I my case, always failed to connect. connecting to Wi-Fi......................... connected. IP address: 192.168.1.126 connecting to Google Home... found Google Home(192.168.1.163:8009) Failed to Connect to 192.168.1.163:8009.

robomaniac commented 3 years ago

I got it work on both the Wemos D1 mini and Wemos D1 mini Pro

only works with the google nest hub and not my regular google nest mini

I use this

IPAddress ip(192, 168, 1, 205);

void connectToGH(){
  Serial.println("connecting to Google Home...");

  if (ghn.ip(ip, "en", 8009) != true) {                           // this use the IP address
    Serial.println(ghn.getLastError());
    return;
  }

  Serial.print("found Google Home(");
  Serial.print(ghn.getIPAddress());
  Serial.print(":");
  Serial.print(ghn.getPort());
  Serial.println(")");
}