Hi
That's strange indeed.
Stupid questions. Did you run my code as supplied or modified in any way? Which target are you using?
I'm running Python 3.11.12 / Git 2.44.0 / esp idf v5.3.1 and FC is fully up to date.
Can you send me the chart you created so I can see what happens on my chips?
My WDT doesn't time out unless I remove my delay in my endless loop.
I'm intrigued as to why you are having issues.
Regards
ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
-
- Valued Contributor
- Posts: 1575
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hey Chipfryer,
These are the versions in my toolchain:
Python 3.12.5
git version 2.46.0.windows.1
esp-idf-v5.3
My Flowcode version 10 has the ESP chippack.. and is fully up to date.
The only thing I've changed in your version is the name of the SSID and it's password.
After that I've been playing with the timeout setting like you've suggested.
My version (not at hand), is the same but tells me the status via a display.
Thanks again
These are the versions in my toolchain:
Python 3.12.5
git version 2.46.0.windows.1
esp-idf-v5.3
My Flowcode version 10 has the ESP chippack.. and is fully up to date.
The only thing I've changed in your version is the name of the SSID and it's password.
After that I've been playing with the timeout setting like you've suggested.
My version (not at hand), is the same but tells me the status via a display.
Thanks again
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi
I really can't imagine why you are having issues. You have connected to the website and are sending out a string. The fact you get no reply is the concern. Wrong send string or such like would still elicit a reply. Just for clarification, are you using the display added in to my version, or just my version as it stands?
If with display, can you try without? I'll try on a different 32 when I get a chance. I was using a lolin-lite.
Clutching at straws, maybe something with the display is holding up things?
Regards
I really can't imagine why you are having issues. You have connected to the website and are sending out a string. The fact you get no reply is the concern. Wrong send string or such like would still elicit a reply. Just for clarification, are you using the display added in to my version, or just my version as it stands?
If with display, can you try without? I'll try on a different 32 when I get a chance. I was using a lolin-lite.
Clutching at straws, maybe something with the display is holding up things?
Regards
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi
If I disable the delay in my endless loop I occasionally get something similar to one of your earlier posts. As the WDT kicks in and as I'm monitoring what the ESP dumps out over its UART I can see that WDT has activated and screwed things up. Some times it gets a response before kicking in, other times it doesn't.
So, could there be something in your chart tying up something and causing WDT to activate?
Regards
If I disable the delay in my endless loop I occasionally get something similar to one of your earlier posts. As the WDT kicks in and as I'm monitoring what the ESP dumps out over its UART I can see that WDT has activated and screwed things up. Some times it gets a response before kicking in, other times it doesn't.
So, could there be something in your chart tying up something and causing WDT to activate?
Regards
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi
Just tried with an ESP_WROOM32
Needed a 250mS delay after sending the GET string, but other than that it worked fine.
Regards
Just tried with an ESP_WROOM32
Needed a 250mS delay after sending the GET string, but other than that it worked fine.
Regards
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi
The website MJU20 was using (worldtimeapi.org) to obtain current time appears to be very, very hit or miss. Numerous times I can't even reach it using a browser, and if you search online for anything about it, you read numerous comments about it being "down".
With that in mind I thought to look at an alternative. Whilst most websites return current time as part of their headers, you shouldn't really make a spurious request to a website in an attempt to grab the time from their returned header.......
If you have a server of your own, either in your own premises or hosted, then it is quite easy to deploy a PHP script to tell you the time whenever you wish. I have a few hosted servers and also a RPi one in my house so I decided that was the route to follow. Do appreciate that this example is only an example and it may or may not suit you. It takes no account of latency and you could perhaps modify to establish the average latency and calculate locally to minimise. However I think in most cases +/- a few hundred milliseconds would be accurate enough <s>.
My servers run on GMT (or UTC if you prefer) but you should check yours before deploying and make whatever adjustments may be needed.
Although running on GMT, which is no issue for me, I thought I'd add the capability to request a timezone "offset" in the request. To make the request we create a "GET" request and this contains the script to be run plus the "offset". The offset is floating point as you may be in one of those zones that are "funny". You may be GMT+5.5 for example. If you want GMT then you would specify 0.0. If West of London then you may be using -4.0 or suchlike.
The script accepts the request and obtains the offset and current Unix Time. As each hour has 3600 seconds, we then do a calculation to establish the time at offset by multiplying 3600 (number of seconds in one hour) by the offset, and adding this to the Unix Time.
We then create a json encoded reply based on the this new Unix Time.
I chose to return the following:-
Weekday = Day of week (e.g. Saturday)
Day = Day of Month (e.g. 17)
Month = Month of Year (e.g. 06)
Year = Year (e.g. 2025)
Hour = Hour in 24hr format (e.g. 17 equals 5pm)
Minutes = Minutes (e.g. 24)
Seconds = Seconds (e.g. 26)
Once this has been returned you can use the info to either sync locally or action whatever, whenever.
The attached pdf contains the script steps but do be aware that no security is depolyed which may or may not be a concern for you.
The attached FlowChart is written for a RPi but you can modify to suit. In it we need to set some parameters such as the server address, the script to run (e.g. script.php) and of course the offset. We then initialse components, call the "update" macro, then upon exiting enter the Main loop (which does nothing).
Basically you could add in the Update_Time Macro to your project to provide updates whenever you wish.
There are other ways to manipulate PHP date and time functions but this I thought was quite easy especially if you want a timezone not included in PHP.
Hopefully you may find this of interest.
Regards
The website MJU20 was using (worldtimeapi.org) to obtain current time appears to be very, very hit or miss. Numerous times I can't even reach it using a browser, and if you search online for anything about it, you read numerous comments about it being "down".
With that in mind I thought to look at an alternative. Whilst most websites return current time as part of their headers, you shouldn't really make a spurious request to a website in an attempt to grab the time from their returned header.......
If you have a server of your own, either in your own premises or hosted, then it is quite easy to deploy a PHP script to tell you the time whenever you wish. I have a few hosted servers and also a RPi one in my house so I decided that was the route to follow. Do appreciate that this example is only an example and it may or may not suit you. It takes no account of latency and you could perhaps modify to establish the average latency and calculate locally to minimise. However I think in most cases +/- a few hundred milliseconds would be accurate enough <s>.
My servers run on GMT (or UTC if you prefer) but you should check yours before deploying and make whatever adjustments may be needed.
Although running on GMT, which is no issue for me, I thought I'd add the capability to request a timezone "offset" in the request. To make the request we create a "GET" request and this contains the script to be run plus the "offset". The offset is floating point as you may be in one of those zones that are "funny". You may be GMT+5.5 for example. If you want GMT then you would specify 0.0. If West of London then you may be using -4.0 or suchlike.
The script accepts the request and obtains the offset and current Unix Time. As each hour has 3600 seconds, we then do a calculation to establish the time at offset by multiplying 3600 (number of seconds in one hour) by the offset, and adding this to the Unix Time.
We then create a json encoded reply based on the this new Unix Time.
I chose to return the following:-
Weekday = Day of week (e.g. Saturday)
Day = Day of Month (e.g. 17)
Month = Month of Year (e.g. 06)
Year = Year (e.g. 2025)
Hour = Hour in 24hr format (e.g. 17 equals 5pm)
Minutes = Minutes (e.g. 24)
Seconds = Seconds (e.g. 26)
Once this has been returned you can use the info to either sync locally or action whatever, whenever.
The attached pdf contains the script steps but do be aware that no security is depolyed which may or may not be a concern for you.
The attached FlowChart is written for a RPi but you can modify to suit. In it we need to set some parameters such as the server address, the script to run (e.g. script.php) and of course the offset. We then initialse components, call the "update" macro, then upon exiting enter the Main loop (which does nothing).
Basically you could add in the Update_Time Macro to your project to provide updates whenever you wish.
There are other ways to manipulate PHP date and time functions but this I thought was quite easy especially if you want a timezone not included in PHP.
Hopefully you may find this of interest.
Regards
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Once again, thank you, chipfryer27, for keeping up with this.
By now, I don’t even remember how I originally intended to use this—I think it was more about investigating API calls...
Me and my confused brain!
But it’s impressive to make it work this way (via a local server).
My use of Flowcode comes and goes—sometimes I can spend weeks working on something, and then not touch it for months.
If something still doesn’t work after weeks of trying, I can get frustrated, abandon the project, and forget about it.
I’ve also noticed that lately, I’m not receiving emails from the forum when there’s a reply to a thread I’m following. I’m not sure why that’s happening either.
Chipfryer27: Once again, many thanks for updating your new insights—I and many others really appreciate it!
By now, I don’t even remember how I originally intended to use this—I think it was more about investigating API calls...
Me and my confused brain!
But it’s impressive to make it work this way (via a local server).
My use of Flowcode comes and goes—sometimes I can spend weeks working on something, and then not touch it for months.
If something still doesn’t work after weeks of trying, I can get frustrated, abandon the project, and forget about it.
I’ve also noticed that lately, I’m not receiving emails from the forum when there’s a reply to a thread I’m following. I’m not sure why that’s happening either.
Chipfryer27: Once again, many thanks for updating your new insights—I and many others really appreciate it!
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi MJU20
Thanks for the kind words, appreciated.
The script / chart will work for a server located anywhere, not just local to you. However in saying that, if you use a Dynamic Hosting service such as No-IP or DynDys then the chart won't connect. This is because as it stands it doesn't recognise the redirect instruction sent by these type of services.
I have therefore updated the chart to check if being redirected and if so, reissue the command to the new address. This would then allow you to have a server hosted on your own network reachable from anywhere without the need for static IPs.
You could host your own instance of mosquitto, with client sensors Publishing / Subscribing from anywhere reachable via a "free" Dynamic address, or as the above example illustrates, have your sensors or whatever sync to a time.
I will post the update later.
Regards
Thanks for the kind words, appreciated.
The script / chart will work for a server located anywhere, not just local to you. However in saying that, if you use a Dynamic Hosting service such as No-IP or DynDys then the chart won't connect. This is because as it stands it doesn't recognise the redirect instruction sent by these type of services.
I have therefore updated the chart to check if being redirected and if so, reissue the command to the new address. This would then allow you to have a server hosted on your own network reachable from anywhere without the need for static IPs.
You could host your own instance of mosquitto, with client sensors Publishing / Subscribing from anywhere reachable via a "free" Dynamic address, or as the above example illustrates, have your sensors or whatever sync to a time.
I will post the update later.
Regards
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Dear Chipfryer27,chipfryer27 wrote: ↑Thu Jun 05, 2025 1:24 pmHi MJU20
Thanks for the kind words, appreciated.
The script / chart will work for a server located anywhere, not just local to you. However in saying that, if you use a Dynamic Hosting service such as No-IP or DynDys then the chart won't connect. This is because as it stands it doesn't recognise the redirect instruction sent by these type of services.
I have therefore updated the chart to check if being redirected and if so, reissue the command to the new address. This would then allow you to have a server hosted on your own network reachable from anywhere without the need for static IPs.
You could host your own instance of mosquitto, with client sensors Publishing / Subscribing from anywhere reachable via a "free" Dynamic address, or as the above example illustrates, have your sensors or whatever sync to a time.
I will post the update later.
Regards
It's not easy to help people the way you do — I wish everyone were as excellent as you!
As it happens, I have Mosquitto running on a Raspberry PI that's connected via NOIP.
I also have an ESP32 that regularly sends data to MQTT, and I can read that data from anywhere using my smartphone.
I’ve put quite a bit of time into this, though I’m once again unsure if I’ll keep using it.
I’m not the kind of person who wants to know the temperature in every room of the house or who wants to control everything through a smartphone.
For me, the fun lies in building something until I’ve proven (to myself) that I can do it

Sometimes I prove it by building something for my wife, who keeps admiring me for it

So, after quite some effort, I managed to get NOIP and Mosquitto running on a Raspberry Pi Zero.
A possible future addition to this project might be turning it into a kind of hub for nodes that send data via LORA to a local receiver, which then posts it to MQTT.
We’ll see — I just need to find some new inspiration first.
Once again, thanks for your unwavering support!
-
- Valued Contributor
- Posts: 1575
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 356 times
- Been thanked: 560 times
Re: ESP32 no reply: SSL/TLS connection failed (worldtimeapi.org)
Hi MJU20
Probably the closest I came to a smart home was building one of the ESP power monitors to see current consumption a couple of years back. Once I knew how much everything consumed I had no real need for it, especially as my clamp meter does it too (admittedly without logging though).
Regards
Me neither... People often think that just because you can, you will have your house like a "Jetson's" episodeI’m not the kind of person who wants to know the temperature in every room of the house or who wants to control everything through a smartphone.

Sometimes I prove it by building something for my wife, who keeps admiring me for it


Regards