I was using an ESP8266 to send date to Blynk Cloud and it worked fine. I upgraded to an ESP32 and it workd for a while, then loses connection to Blynk with the error:
Secure connection failed
Connecting to blynk.cloud:443
Can it be my libraries are not up to date ?
Here is the startup information:
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4980
load:0x40078000,len:16612
load:0x40080400,len:3480
entry 0x400805b4
Main_Monitor-Sender.ino
.........
Ok
Connected!
IP Address: 192.168.12.237; MAC Address: xx:xx:xx:DE:E4:3C
WiFi channel: 1
Main_Monitor-Sender.ino
Mode: STA
Channel: 1
SSID (10): ********
Passphrase (12): ********
BSSID set: 0
[9027]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.3.2 on ESP32
#StandWithUkraine https://bit.ly/swua
Blynk connect success.
HTTP server started
[9038] Connecting to blynk.cloud:443
[9567] Certificate OK
[9620] Ready (ping: 52ms).
----------------------------------------
There was no problem with the ESP8266.
I have 2 other ESP32s connected to Blynk and they are OK.
Here ae the includes:
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "****************"
#define BLYNK_DEVICE_NAME "Device 1"
#define BLYNK_TEMPLATE_NAME "Device 1"
char auth[] = "*************************";
#define USE_ESP32
#include <esp_now.h>
#include <WiFi.h>
#include <esp_wifi.h>
#include "Wire.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#include <time.h>
#include <NTPClient.h>
#include <AsyncTCP.h> // 12-24-24 next 3 lines added for ElegantOTA
#include <ESPAsyncWebServer.h>
#include <ElegantOTA.h>
#include <BlynkSimpleEsp32_SSL.h>
#include <HTTPClient.h>
Last night it went offline at arouind 3:00.
I connected my phone running a USB terminal app and here is what I saw:
[48681308] Secure connection failed
[48681309] Connecting to blynk.cloud:443
[48706809] Secure connection failed
[48706810] Connecting to blynk.cloud:443
I disconnedted the terminal then reconnected, and for some reason this caused the ESP to reboot:
Connected to CP2102 device
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.3.2 on ESP32
#StandWithUkraine https://bit.ly./swua
Blynk connect success.
HTTP server started
[9129] Connecting to blynk.cloud:443
[9653] Certificate OK
[9687] Ready (ping: 33ms).
And then it started working (went online)
Now, more than 12 hours later it is still working.
But I am worried it may fail again.
NOTE: My code also utilizes ElegantOTA and ESP-NOW that sends to 2 devices.
ALSO: I changed my internet provoder to T-Mobile about 2 months ago- I think the internet may briefly be going offline at times.
Thanks in advance- let me know if more info is needed.