Replies: 4 comments 2 replies
-
I would try this version: I also try 5 times to get NTP time with 20 seconds waits between them before bailing-out. |
Beta Was this translation helpful? Give feedback.
-
If the ESP32 and the ESP8266 are on the same LAN, it's likely that the error is coming from the NTP server blocking you after the first few tries. Polling a free public service every second is wasteful, and the servers will refuse your connections. |
Beta Was this translation helpful? Give feedback.
-
Hi Dave,
It does not work with the ESP8266 |
Beta Was this translation helpful? Give feedback.
-
OK, I understand. I got this error : File "", line 62, in getNZtime |
Beta Was this translation helpful? Give feedback.
-
Hi,
can someone tell me why this little program works with an ESP32 and not with an ESP8266
The result with an ESP32
Connection successful
(2000, 1, 1, 0, 0, 52, 5, 1)
(2023, 2, 15, 15, 30, 4, 2, 46)
(2023, 2, 15, 15, 30, 4, 2, 46)
and with an ESP8266
Connection successful
(2000, 1, 1, 0, 1, 4, 5, 1)
Traceback (most recent call last):
File "", line 21, in
File "ntptime.py", line 34, in settime
File "ntptime.py", line 20, in time
OSError: -2
I don't understand, it was working last week and not anymore.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions