Ethernet Gateway/Domoticz Connection Reset



  • I have the following setup:

    Domoticz controller
    Ethernet gateway/W5100/NRF24L01+
    Prototyped Relay Controller

    All hardware(Arduino, W5100, NRF24L01+) is powered from a power bus with stepdown regulators for the radio. The power supply is a converted AT 300W supply so I would say the power is clean and current is not constrained. The MySensors code is 1.6 and not altered in any way.

    According to the Domoticz log, the TCP connection to the gateway is reset after connecting for only about 500 msec. Domoticz then "says" it will re-establish the connection in 30 seconds, although this timeline does not seem to be supported by the log. The physical 30 second delay occurs between these two lines:

    2016-05-28 09:07:24.715 MySensors: Gateway Version: 1.5.4
    2016-05-28 09:07:52.423 TCP: Reconnecting...

    After re-establishing the connection it will be reset again in ~500 msec. This repeats ad infinitum

    Domoticz log:

    2016-05-28 07:08:15.273 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:08:16.273 MySensors: Gateway Ready...
    2016-05-28 07:08:16.273 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:08:17.274 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:08:35.669 MySensors: trying to connect to: 192.168.1.65:5003
    2016-05-28 07:08:36.669 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:08:37.278 MySensors: Connection reset!
    2016-05-28 07:08:37.278 TCP: Reconnecting in 30 seconds...
    2016-05-28 07:08:38.670 MySensors: Gateway Ready...
    2016-05-28 07:08:38.670 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:08:39.671 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:09:07.277 User: Admin initiated a switch command
    2016-05-28 07:09:07.278 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:09:07.285 TCP: Reconnecting...
    2016-05-28 07:09:08.285 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:09:08.676 MySensors: Connection reset!
    2016-05-28 07:09:08.677 TCP: Reconnecting in 30 seconds...
    2016-05-28 07:09:10.286 MySensors: Gateway Ready...
    2016-05-28 07:09:10.286 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:09:11.287 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:09:15.348 User: Admin initiated a switch command
    2016-05-28 07:09:15.349 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:09:19.908 User: Admin initiated a switch command
    2016-05-28 07:09:19.909 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:09:22.707 User: Admin initiated a switch command
    2016-05-28 07:09:22.708 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:09:25.207 User: Admin initiated a switch command
    2016-05-28 07:09:25.208 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:09:38.683 TCP: Reconnecting...
    2016-05-28 07:09:39.683 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:09:40.293 MySensors: Connection reset!
    2016-05-28 07:09:40.293 TCP: Reconnecting in 30 seconds...
    2016-05-28 07:09:41.684 MySensors: Gateway Ready...
    2016-05-28 07:09:41.684 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:09:42.685 MySensors: Gateway Version: 1.5.4

    The led representing the relay continues to operate (affirmed visually) from Domoticz throughout this trauma as indicated by this log section:

    2016-05-28 07:13:57.352 TCP: Reconnecting...
    2016-05-28 07:13:58.353 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:13:58.739 MySensors: Connection reset!
    2016-05-28 07:13:58.739 TCP: Reconnecting in 30 seconds...
    2016-05-28 07:14:00.353 MySensors: Gateway Ready...
    2016-05-28 07:14:00.354 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:14:01.354 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:14:07.971 User: Admin initiated a switch command
    2016-05-28 07:14:07.973 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:10.151 User: Admin initiated a switch command
    2016-05-28 07:14:10.153 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:11.630 User: Admin initiated a switch command
    2016-05-28 07:14:11.631 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:13.871 User: Admin initiated a switch command
    2016-05-28 07:14:13.872 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:15.498 User: Admin initiated a switch command
    2016-05-28 07:14:15.499 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:17.683 User: Admin initiated a switch command
    2016-05-28 07:14:17.684 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:19.470 User: Admin initiated a switch command
    2016-05-28 07:14:19.471 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:21.391 User: Admin initiated a switch command
    2016-05-28 07:14:21.392 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:23.030 User: Admin initiated a switch command
    2016-05-28 07:14:23.031 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:25.238 User: Admin initiated a switch command
    2016-05-28 07:14:25.239 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:27.337 User: Admin initiated a switch command
    2016-05-28 07:14:27.338 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:28.745 TCP: Reconnecting...
    2016-05-28 07:14:29.050 User: Admin initiated a switch command
    2016-05-28 07:14:29.051 (Mysensors Gateway) Lighting 2 (Light)
    2016-05-28 07:14:29.745 MySensors: connected to: 192.168.1.65:5003
    2016-05-28 07:14:30.360 MySensors: Connection reset!
    2016-05-28 07:14:30.361 TCP: Reconnecting in 30 seconds...
    2016-05-28 07:14:31.746 MySensors: Gateway Ready...
    2016-05-28 07:14:31.746 MySensors: Gateway Version: 1.5.4
    2016-05-28 07:14:32.747 MySensors: Gateway Version: 1.5.4

    This is strange since the log indicates that there is no TCP connection!

    Based on recent experiences with this forum and the below referenced similar issues I am not banking on a helpful response here but I thought I would try before tossing all this hardware in the trash.

    1. Is the TCP connection actually reset or is the code reporting non-issues?

    2. Which code, Domoticz or MySensors, would report Connection Reset when there seems to be an established connection?

    See similar issues not responded to :

    https://forum.mysensors.org/topic/3567/wifi-gateway-nodemcu-0-9-always-reset

    https://forum.mysensors.org/topic/3256/reset-problem-with-ethernet-gateway-and-a-sensor

    https://forum.mysensors.org/topic/3222/arduino-mysensors-w5100-gateway-closing-tcp-connection-2us-not-2ms-after-each-sending-of-data



  • Looks strange.
    What does the debug say for GW?



  • I am having the same problem with Domoticz. I know the gateway is working because I have it connected to Vera Lite as well and have no problems with it. Been trying to figure it out but at a dead end.



  • I restarted Domoticz for a non-related reason and the issue ceased. I have tried to create the sequence of events that led to the problem the first time but at present Domoticz logs are quite and things are working as they should.


  • Hardware Contributor

    In newer Domoticz versions it tries to ping the gw. If something is blocking this (like another controller) it will reset and try to connect again. This happened to me when i connected two controllers (Domoticz + Myscontroller) to the same ethernet gw...


Log in to reply
 

Suggested Topics

  • 33
  • 8
  • 3
  • 2
  • 5
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts