ESP32版NodeMCU有无rtctime模块?是否计划移植ESP8266的NTP实现?
Great question! I’ve dug into the NodeMCU project details and here’s what I can share:
Current Status
You’re absolutely right—right now, the official ESP32 branch of NodeMCU doesn’t include the rtctime module that’s so handy on ESP8266. This is because the ESP32 port is still catching up with some mature modules from the ESP8266 codebase, and most porting work is community-driven.
Official Porting Plans
The NodeMCU team does have a long-term goal to align module support across ESP8266 and ESP32, but there’s no public, concrete timeline for the rtctime module specifically. Progress depends on contributor availability and priorities—many modules get ported only when someone in the community steps up to tackle the work. You can keep an eye on the project’s GitHub issues and milestones for updates, but don’t expect an immediate official release.
Practical Alternatives
If you need NTP time sync and RTC functionality right now, here are a few solid workarounds:
- Use ESP32’s native time APIs: The built-in
esp32module hasesp32.gettimeofday()to fetch system time. You can pair this with a custom NTP client using thenetmodule—send a request to an NTP server, parse the response, and set the system time manually. The logic mirrors whatrtctimedoes under the hood. - Third-party community modules: Several community-developed NTP/RTC modules for ESP32 NodeMCU exist, many adapted directly from the ESP8266
rtctimecode. These are often shared in NodeMCU forums or package registries. - Leverage ESP32 hardware RTC: The ESP32 has a built-in hardware RTC that retains time between reboots. You can write a small Lua script to sync time via NTP on boot, save it to the RTC, and retrieve it later without re-syncing.
Contribute to the Port
If you have experience with Lua and ESP32 development, you could take matters into your own hands: port the rtctime module from ESP8266 to ESP32 and submit a pull request to the official repository. Community contributions are the backbone of NodeMCU, and this would help other developers too!
内容的提问来源于stack exchange,提问作者Squawky

