Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Moderator: leecollings

Post Reply
fcoelho
Posts: 3
Joined: Friday 19 February 2016 22:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Post by fcoelho »

Hello,

I am using a connection between Domoticz and ESP with mysensors and works fines, but, after making a power down power up in the ESP Domoticz takes about 17 minutes to try the connection after that it works
What would be the cause?
  • 2016-02-19 20:27:44.738 (ESP Mysensors relay 2) Lighting 2 (Light 0)
    2016-02-19 20:27:44.743 (ESP Mysensors relay 2) Lighting 2 (Light 0)
    2016-02-19 20:27:44.749 (ESP Mysensors relay 2) Lighting 2 (Light 0)

    2016-02-19 20:34:57.260 Incoming connection from: 115.239.228.10
    2016-02-19 20:44:14.982 TCP: Reconnecting in 30 seconds...
    2016-02-19 20:44:44.986 TCP: Reconnecting...
    2016-02-19 20:44:45.987 MySensors: connected to: 192.168.1.121:5003
    2016-02-19 20:44:45.987 MySensors: Gateway Ready...
    2016-02-19 20:44:46.991 MySensors: Gateway Version: 1.6.0-beta
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Post by gizmocuz »

Maybe you have set a data timeout to 15 minutes ? (on the mysensors hardware setup)
This is because domoticz does not get a clean disconnect/close, infact it does not know it
maybe the system cleans up the socket after a while, and then domoticz knows
If you have a sensor node that transmits for example every 4 minutes something to domoticz (like a hearbeat message (new since 2.0), or a temperature), you could set a data timeout to 5 minutes
Thats at least better then 17
Quality outlives Quantity!
fcoelho
Posts: 3
Joined: Friday 19 February 2016 22:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Post by fcoelho »

Many thanks for you Quick answer.
In reality i have two relays to on off from domoticz.
There is no timeout. To test what happens if i simulator an energy failure only in the esp with two relays attached.
Domoticz only after 15min tries to reconnect. It is what I see in the log. Mysensors acts as a server in the relay standard sketch?
The question is why only after 15min there is a visible retry in the log? How to have more log detail?
TIA
zaphodus
Posts: 2
Joined: Sunday 22 November 2015 21:44
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Post by zaphodus »

In the MySensors development version the gateway can be a sensor node too. The domoticz send the heartbeat message to the gateway in every 10 second, but do nothing with the response. If the heartbeat response processed as incoming data the "data timeout" funtion will work properly.
I have made a patch for this issue: https://github.com/domoticz/domoticz/pull/656
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Domoticz Long to reconnect to mysensors ESP after ESP powercycle

Post by gizmocuz »

Thanks, patch is merged in the repository
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest