Here is even more detailed log. The issue starts when esp8266 disconnects from WIFI and doesn’t automatically reconnect.
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:4912 0x3fff12ec mbedtls_ssl_flush_output() returned -78 (-0x004e)
mongoose.c:4912 0x3fff12ec mbedtls_ssl_write_record() returned -78 (-0x004e)
mongoose.c:4912 0x3fff12ec mbedtls_ssl_send_alert_message() returned -78 (-0x004e)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 2096 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 3640 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 8318 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 17464 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 30614 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 55514 ms
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
esp_main.c:145 SDK: state: 5 -> 2 (3c0)
esp_main.c:145 SDK: rm 0
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 3
mgos_net.c:82 WiFi STA: disconnected
mgos_net.c:86 WiFi STA: connecting
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 2 -> 2 (b0)
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 57762 ms
esp_main.c:145 SDK: state: 2 -> 0 (2)
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 2
mgos_net.c:82 WiFi STA: disconnected
mgos_wifi.c:345 WiFi STA: Connect timeout
mgos_wifi.c:88 WiFi STA: Using config 0 (Xiaomi_EFB4)
mgos_wifi.c:270 WiFi STA: Connecting to Xiaomi_EFB4
mgos_net.c:86 WiFi STA: connecting
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 0 -> 2 (b0)
esp_main.c:145 SDK: state: 2 -> 3 (0)
esp_main.c:145 SDK: state: 3 -> 5 (10)
esp_main.c:145 SDK: add 0
esp_main.c:145 SDK: aid 3
esp_main.c:145 SDK: cnt
esp_main.c:145 SDK: state: 5 -> 2 (fc0)
esp_main.c:145 SDK: rm 0
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 15
mgos_net.c:82 WiFi STA: disconnected
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
mgos_wifi.c:345 WiFi STA: Connect timeout
mgos_wifi.c:88 WiFi STA: Using config 0 (Xiaomi_EFB4)
esp_main.c:145 SDK: state: 2 -> 0 (0)
mgos_wifi.c:270 WiFi STA: Connecting to Xiaomi_EFB4
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 202
mgos_net.c:86 WiFi STA: connecting
mgos_net.c:82 WiFi STA: disconnected
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 0 -> 2 (b0)
esp_main.c:145 SDK: state: 2 -> 3 (0)
esp_main.c:145 SDK: state: 3 -> 5 (10)
esp_main.c:145 SDK: add 0
esp_main.c:145 SDK: aid 3
esp_main.c:145 SDK: cnt
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 58023 ms
esp_main.c:145 SDK: state: 5 -> 2 (fc0)
esp_main.c:145 SDK: rm 0
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 15
mgos_net.c:82 WiFi STA: disconnected
mgos_wifi.c:345 WiFi STA: Connect timeout
mgos_wifi.c:88 WiFi STA: Using config 0 (Xiaomi_EFB4)
esp_main.c:145 SDK: state: 2 -> 0 (0)
mgos_wifi.c:270 WiFi STA: Connecting to Xiaomi_EFB4
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 202
mgos_net.c:86 WiFi STA: connecting
mgos_net.c:82 WiFi STA: disconnected
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 0 -> 2 (b0)
esp_main.c:145 SDK: state: 2 -> 3 (0)
esp_main.c:145 SDK: state: 3 -> 5 (10)
esp_main.c:145 SDK: add 0
esp_main.c:145 SDK: aid 3
esp_main.c:145 SDK: cnt
esp_main.c:145 SDK: state: 5 -> 2 (fc0)
esp_main.c:145 SDK: rm 0
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 15
mgos_net.c:82 WiFi STA: disconnected
mgos_wifi.c:345 WiFi STA: Connect timeout
mgos_wifi.c:88 WiFi STA: Using config 0 (Xiaomi_EFB4)
esp_main.c:145 SDK: state: 2 -> 0 (0)
mgos_wifi.c:270 WiFi STA: Connecting to Xiaomi_EFB4
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 202
mgos_net.c:86 WiFi STA: connecting
mgos_net.c:82 WiFi STA: disconnected
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 0 -> 2 (b0)
esp_main.c:145 SDK: state: 2 -> 3 (0)
esp_main.c:145 SDK: state: 3 -> 5 (10)
esp_main.c:145 SDK: add 0
esp_main.c:145 SDK: aid 3
esp_main.c:145 SDK: cnt
mgos_mqtt_conn.c:471 MQTT0 connecting to xxx.iot.us-east-2.amazonaws.com:8883
esp_main.c:145 SDK: state: 5 -> 2 (fc0)
esp_main.c:145 SDK: rm 0
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 15
mgos_net.c:82 WiFi STA: disconnected
main.c:113 /zzz_UPSTREAM -> {“data”:{“eparams”:{“AIRMS”:0.00,“AWATT”:0.00,“BIRMS”:0.00,“BWATT”:0.00,“CIRMS”:0.00,“CWATT”:0.00},“meters”:{“AMETER”:0.01,“BMETER”:0.01,“CMETER”:0.01}}}
mongoose.c:12068 Failed to resolve ‘xxx.iot.us-east-2.amazonaws.com’, server 192.168.31.1
mgos_mqtt_conn.c:229 MQTT0 TCP connect error (-1)
mgos_mqtt_conn.c:256 MQTT0 Disconnect
mgos_mqtt_conn.c:549 MQTT0 connecting after 64674 ms
mgos_wifi.c:345 WiFi STA: Connect timeout
mgos_wifi.c:88 WiFi STA: Using config 0 (Xiaomi_EFB4)
esp_main.c:145 SDK: state: 2 -> 0 (0)
mgos_wifi.c:270 WiFi STA: Connecting to Xiaomi_EFB4
mgos_wifi.c:118 WiFi STA: Disconnected, reason: 202
mgos_net.c:86 WiFi STA: connecting
mgos_net.c:82 WiFi STA: disconnected
esp_main.c:145 SDK: scandone
esp_main.c:145 SDK: state: 0 -> 2 (b0)
esp_main.c:145 SDK: state: 2 -> 3 (0)
esp_main.c:145 SDK: state: 3 -> 5 (10)