cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

Adding NTP time synchronization on startup #840

Closed hertzi closed 2 years ago

hertzi commented 2 years ago

I was looking for a way to set the correct time without owning a RTC. Browsing the code I found the ezTime provides a handy solution, so I integrated it. Not sure if reusing the OTA wifi settings is the best way, but I'm open to suggestions.

cyberman54 commented 2 years ago

Thanks for the PR!

I am currently working on removal of the ezTime library from paxcounter, because it has a major bug which won't fix.

I am going to use the ESP32 native time functions instead.

Thus, i am not going to merge your PR, please understand. But it should be easy to implement NTP with ESP32 native API, after i changed all time related code to the ESP32 API.

cyberman54 commented 2 years ago

@hertzi new release v3.1.0 is out now, and has esp32 sntp integration. So your case should be easy to add.