esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
MIT License
1.35k stars 423 forks source link

Time does not sync with ntp #93

Closed pidiet closed 6 years ago

pidiet commented 6 years ago

Hello!

I have the problem that my time does not get synced with ntp. Not the stock settings nor my local ntp server are working. Devices always starts back in the year 1970....

The local sync with the browser works as expected but needs manual trigger.

image

omersiar commented 6 years ago

It maybe related by DNS name resolution.

pidiet commented 6 years ago

Really! It worked right away when giving the IP address of my local ntp server.

I think (my) esp-rfid is not able to resolve host names only for ntp (my mqtt is configured with host name and is working fine)

omersiar commented 6 years ago

Actually lwip has async DNS resolution, I can refactor the NTP code, it will be rock solid with fallback server, check for dead NTP server, etc I simply do not have time. I should mention these in known issues.