-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezones example - timeouts #20
Comments
Thank you for finding this, and confirming what it is. You're absolutely right, hadn't occurred to me that my examples make multiple requests. The best solution would be to allow a couple of rapid requests (per hour) and then throttle, but maybe I'll just put in the delays in the examples... I'll have a think. |
I just released 0.7.9 which just has the delays added to the two examples and a little explanatory text at |
Nice to hear that :-) I just finished very simple NTP clock using your library, see https://github.com/BugerDread/esp8266-ezTIME-wifi-clock Thanks again for this library! |
Cool!!! I will make sure I put a link with picture to this in the README when I get to it... |
Added one more picture, feel free to use them if you want. |
Just added your project to the README, in new chapter "Inspiration". |
Hallo Ropg,
thank you for ezTime library!
Right now Im testing it on ESP8266 but I found an issue with Timezones example.
If I change this example to be abe to run on ESP (WiFi.h -> ESP8266WiFi.h, set SSID and PASS), I get following output (debug enabled):
I always get New Zealand time correctly, Germany (de) timezone results in timeout in about 50% of tries, I never get GeoIP time - always timeout.
I think this is because of DDOS protection on the server you mentioned in readme: "will only respond to the same IP-number once every three seconds to prevent being used in dDoS attacks", but there is no delay in the example and we are calling setLocation 3 times in a row (from the same IP ofc).
Also if the myTZ.setLocation(F("de")) results in timeout, it shows New Zealand time for germany (as in output above), but this is because myTZ.setLocation(F("de")) is not checked if completed successfully as in "GeoIP part". The myTZ.setLocation(F("Pacific/Auckland")) is also not checked if completed successfully, but from my point of view this is not a problem, it demonstrate that you can but you are not required to check setLocation result in your sketch.
It works as expected when I add two delays this way (which confirms its 99% because of the DDoS protection):
I think the same apply to "EthernetShield" example, as it does the same (calling myTZ.setLocation() 3 times without delay), but I have no HW to test it.
The text was updated successfully, but these errors were encountered: