slsys / Gateway

Web site
https://slsys.github.io/Gateway/
245 stars 104 forks source link

Gateway continously disconnects from MQTT broker #32

Closed snakuzzo closed 3 years ago

snakuzzo commented 4 years ago

Hi all! I noticed repeated disconnections from MQTT broker, and I don't understand why. It worked fine for days, but now it continously disconnects from broker. Now I'm on a board with ESP32 16MB + CC2538/CC2592, but I've got this problem on another gw based on ESP32 4MB + CC2530. MQTT broker (mosquitto) is working fine. Every device connected to broker is working fine, but SLS continously disconnects.

I tried a soft reboot...same problem I tried ad hard reboot...same problem I tried a mosquitto restart...same problem I tried a RPI restart...same problem.

I can't figured out... This is my status page...

image

I set mosquitto and sls-gw log levels to debug...

SLS-GW Log

[02:51:34.790] [2] Thread WebServer, core: 1, WS Clients: 1
[02:51:38.407] [1] Thread Zigbee, core: 1
[02:51:42.530] [0] Thread Main, core: 1
[02:51:44.497] [1] Thread WebServer, core: 1, WS Clients: 1
[02:51:46.098] [NA] Connection failed...
[02:51:46.106] [D] [MQTT] Not connected Server: 192.168.1.10, Time:  00:00:33, State: -3
[02:51:46.210] [MQTT] Connecting to server... 3 1 Server: 192.168.1.10:1883, User: snakuzzo
[02:51:46.228] [MQTT] Connected! ClientId: SLS-Zigbee7634
[02:51:46.240] [14177] Thread Link, core: 1
[02:51:46.255] [MQTT] payload_length: 6
[02:51:46.261] [MQTT] write_count: 6
[02:51:47.214] [3] Thread Zigbee, core: 1
[02:51:51.036] [3] Thread Main, core: 1
[02:51:53.211] [8] Thread WebServer, core: 1, WS Clients: 1
[02:51:56.938] [94] Thread Link, core: 0
[02:51:57.019] [1] Thread Zigbee, core: 1
[02:52:01.541] [1] Thread Main, core: 1
[02:52:01.113] [NA] Connecting to 's1.slsys.io', port: 26732...
[02:52:03.919] [2] Thread WebServer, core: 1, WS Clients: 1
[02:52:07.823] [0] Thread Zigbee, core: 1
[02:52:10.045] [0] Thread Main, core: 1
[02:52:13.629] [4] Thread WebServer, core: 1, WS Clients: 1
[02:52:17.628] [1] Thread Zigbee, core: 1
[02:52:20.551] [1] Thread Main, core: 1
[02:52:20.607] [NA] Connection failed...
[02:52:20.613] [MQTT] Send HB (184) {"Uptime":1494,"UptimeStr":"00:24:54","IP":"192.168.1.19","RSSI":"-58","Version":"2020.07.24d1","FreeMem":185944,"LastRxTS":317,"LastTxTS":1230,"log_level":"debug","permit_join":false}
[02:52:20.635] [D] [MQTT] Not connected Server: 192.168.1.10, Time:  00:00:33, State: -3
[02:52:20.740] [MQTT] Connecting to server... 3 1 Server: 192.168.1.10:1883, User: snakuzzo
[02:52:20.762] [MQTT] Connected! ClientId: SLS-Zigbee7634
[02:52:20.781] [14238] Thread Link, core: 1
[02:52:20.796] [MQTT] payload_length: 184
[02:52:20.802] [MQTT] write_count: 184
[02:52:20.808] [MQTT] payload_length: 6
[02:52:20.813] [MQTT] write_count: 6
[02:52:23.338] [1] Thread WebServer, core: 1, WS Clients: 1
[02:52:27.435] [4] Thread Zigbee, core: 1
[02:52:29.057] [3] Thread Main, core: 1
[02:52:30.488] [103] Thread Link, core: 0
[02:52:32.046] [1] Thread WebServer, core: 1, WS Clients: 1
[02:52:35.663] [NA] Connecting to 's1.slsys.io', port: 26732...
[02:52:36.239] [0] Thread Zigbee, core: 1
[02:52:39.562] [2] Thread Main, core: 1
[02:52:42.753] [3] Thread WebServer, core: 1, WS Clients: 1
[02:52:46.045] [2] Thread Zigbee, core: 1
[02:52:48.066] [1] Thread Main, core: 1
[02:52:52.460] [2] Thread WebServer, core: 1, WS Clients: 1
[02:52:53.118] [NA] Connection failed...
[02:52:53.127] [D] [MQTT] Not connected Server: 192.168.1.10, Time:  00:00:33, State: -3
[02:52:53.231] [MQTT] Connecting to server... 3 1 Server: 192.168.1.10:1883, User: snakuzzo
[02:52:53.252] [MQTT] Connected! ClientId: SLS-Zigbee7634
[02:52:53.273] [14180] Thread Link, core: 1
[02:52:53.289] [MQTT] payload_length: 6
[02:52:54.295] [MQTT] write_count: 6
[02:52:56.851] [2] Thread Zigbee, core: 1
[02:52:58.573] [4] Thread Main, core: 1
[02:53:01.173] [7] Thread WebServer, core: 1, WS Clients: 1
[02:53:03.972] [94] Thread Link, core: 0
[02:53:06.656] [0] Thread Zigbee, core: 1
[02:53:07.078] [2] Thread Main, core: 1
[02:53:08.147] [NA] Connecting to 's1.slsys.io', port: 26732...
[02:53:11.883] [5] Thread WebServer, core: 1, WS Clients: 1
[02:53:16.461] [1] Thread Zigbee, core: 1
[02:53:17.583] [1] Thread Main, core: 1
[02:53:21.592] [2] Thread WebServer, core: 1, WS Clients: 1
[02:53:25.265] [0] Thread Zigbee, core: 1
[02:53:26.087] [1] Thread Main, core: 1
[02:53:27.628] [NA] Connection failed...
[02:53:27.635] [MQTT] Send HB (184) {"Uptime":1561,"UptimeStr":"00:26:01","IP":"192.168.1.19","RSSI":"-57","Version":"2020.07.24d1","FreeMem":185944,"LastRxTS":384,"LastTxTS":1297,"log_level":"debug","permit_join":false}
[02:53:27.658] [D] [MQTT] Not connected Server: 192.168.1.10, Time:  00:00:33, State: -3
[02:53:27.762] [MQTT] Connecting to server... 3 1 Server: 192.168.1.10:1883, User: snakuzzo
[02:53:27.783] [MQTT] Connected! ClientId: SLS-Zigbee7634
[02:53:27.800] [14223] Thread Link, core: 1
[02:53:27.815] [MQTT] payload_length: 184
[02:53:27.821] [MQTT] write_count: 184
[02:53:27.829] [MQTT] payload_length: 6
[02:53:27.832] [MQTT] write_count: 6
[02:53:31.298] [1] Thread WebServer, core: 1, WS Clients: 1
[02:53:35.074] [5] Thread Zigbee, core: 1
[02:53:36.596] [5] Thread Main, core: 1
[02:53:37.509] [104] Thread Link, core: 0
[02:53:40.005] [2] Thread WebServer, core: 1, WS Clients: 1
[02:53:42.684] [NA] Connecting to 's1.slsys.io', port: 26732...

Mosquitto Log

1595724696: Client SLS-Zigbee7634 has exceeded timeout, disconnecting.
1595724696: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (7 bytes))
1595724706: New client connected from 192.168.1.19 as SLS-Zigbee7634 (p2, c1, k15, u'snakuzzo').
1595724706:     Zigbee7634/bridge/state
1595724706: Sending CONNACK to SLS-Zigbee7634 (0, 0)
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/bridge/config/+ (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/bridge/config/+/+ (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+/+
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/bridge/networkmap (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/bridge/networkmap
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/+/set/# (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/+/set/#
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/+/+/set/# (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/+/+/set/#
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/led/# (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/led/#
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724706: Received SUBSCRIBE from SLS-Zigbee7634
1595724706:     Zigbee7634/reboot/# (QoS 0)
1595724706: SLS-Zigbee7634 0 Zigbee7634/reboot/#
1595724706: Sending SUBACK to SLS-Zigbee7634
1595724707: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r1, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724707: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724729: Client SLS-Zigbee7634 has exceeded timeout, disconnecting.
1595724729: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (7 bytes))
1595724740: New client connected from 192.168.1.19 as SLS-Zigbee7634 (p2, c1, k15, u'snakuzzo').
1595724740:     Zigbee7634/bridge/state
1595724740: Sending CONNACK to SLS-Zigbee7634 (0, 0)
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/bridge/config/+ (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/bridge/config/+/+ (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+/+
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/bridge/networkmap (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/bridge/networkmap
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/+/set/# (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/+/set/#
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/+/+/set/# (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/+/+/set/#
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/led/# (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/led/#
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received SUBSCRIBE from SLS-Zigbee7634
1595724740:     Zigbee7634/reboot/# (QoS 0)
1595724740: SLS-Zigbee7634 0 Zigbee7634/reboot/#
1595724740: Sending SUBACK to SLS-Zigbee7634
1595724740: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r0, m0, 'Zigbee7634/bridge/config', ... (184 bytes))
1595724740: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/config', ... (184 bytes))
1595724740: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r1, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724740: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724763: Client SLS-Zigbee7634 has exceeded timeout, disconnecting.
1595724763: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (7 bytes))
1595724773: New client connected from 192.168.1.19 as SLS-Zigbee7634 (p2, c1, k15, u'snakuzzo').
1595724773:     Zigbee7634/bridge/state
1595724773: Sending CONNACK to SLS-Zigbee7634 (0, 0)
1595724773: Received SUBSCRIBE from SLS-Zigbee7634
1595724773:     Zigbee7634/bridge/config/+ (QoS 0)
1595724773: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+
1595724773: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/bridge/config/+/+ (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+/+
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/bridge/networkmap (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/bridge/networkmap
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/+/set/# (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/+/set/#
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/+/+/set/# (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/+/+/set/#
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/led/# (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/led/#
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received SUBSCRIBE from SLS-Zigbee7634
1595724774:     Zigbee7634/reboot/# (QoS 0)
1595724774: SLS-Zigbee7634 0 Zigbee7634/reboot/#
1595724774: Sending SUBACK to SLS-Zigbee7634
1595724774: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r1, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724774: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724796: Client SLS-Zigbee7634 has exceeded timeout, disconnecting.
1595724796: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (7 bytes))
1595724807: New client connected from 192.168.1.19 as SLS-Zigbee7634 (p2, c1, k15, u'snakuzzo').
1595724807:     Zigbee7634/bridge/state
1595724807: Sending CONNACK to SLS-Zigbee7634 (0, 0)
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/bridge/config/+ (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/bridge/config/+/+ (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/bridge/config/+/+
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/bridge/networkmap (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/bridge/networkmap
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/+/set/# (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/+/set/#
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/+/+/set/# (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/+/+/set/#
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/led/# (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/led/#
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received SUBSCRIBE from SLS-Zigbee7634
1595724807:     Zigbee7634/reboot/# (QoS 0)
1595724807: SLS-Zigbee7634 0 Zigbee7634/reboot/#
1595724807: Sending SUBACK to SLS-Zigbee7634
1595724807: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r0, m0, 'Zigbee7634/bridge/config', ... (184 bytes))
1595724807: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/config', ... (184 bytes))
1595724807: Received PUBLISH from SLS-Zigbee7634 (d0, q0, r1, m0, 'Zigbee7634/bridge/state', ... (6 bytes))
1595724807: Sending PUBLISH to home-assistant (d0, q0, r0, m0, 'Zigbee7634/bridge/state', ... (6 bytes))

Any idea about the reason ?

Avenitos commented 3 years ago

is it displayed on the current version?

snakuzzo commented 3 years ago

Sorry, but I don't know. Now I'm on zigbee2mqtt