tobof / openhab-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
39 stars 30 forks source link

ESP8266 gateway with 2 sensors (2 relay) reconnects to OPENHAB2 after long time #122

Closed lucarui closed 5 years ago

lucarui commented 5 years ago

Hello, I noticed that my ESP8266 gateway (with 2 relay used to switch on 2 different lights), when connection with controller (openhab2) is lost, it needs at least 3 minutes to reconnect to it. It could be an issue or a configuration that I don't know?

Thanks.

andreacioni commented 5 years ago

Hi @lucarui,

have you already set the networkSanCheckInterval parameter in the bridge configuration? As you can see in the wiki you can give it the value you want (in minutes); the default value is, in fact, 3 minutes.

Hope this help :wink:

lucarui commented 5 years ago

Yes, this is my configuration file but, even though this setting is set to 1, it takes a lot of time to reconnect.

Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.0.89", tcpPort=5003, sendDelay=200, networkSanCheckEnabled=true, networkSanCheckInterval=1, networkSanCheckConnectionFailAttempts=3 ] {

 /** define things connected to that bridge here */

}

andreacioni commented 5 years ago

The problem of the long delay can also be related to the networkSanCheckConnectionFailAttempts=3 because the NetworkSanityChecker will try every one minute (for a maximum of 3 times) to check if the connection is recovered. Try to set that parameter to 1 (or 0, I don't remember it precisely) and test again.