Time without internet access

Hi,

I made a 3d printed led signboard, with WLED. I used a wemos D1 mini controller.
I use automatic turn on/off with macros and it works well if a NTP server is available. But no wifi is accessible where the signboard is, so every time power is disconnected, time is resetted to 1970.

I add a RTC module with battery (DS 3231) connected to SDA and SCL pins of the card. But it’s doesn’t seems to works with Wled. Time is lost when power is disconnected.

Does someone succesfully use this kind of module with WLED? Does when the NTP server is accessible time is setted on the serial I2C port?

Thanks for your help !

1 Like

There’s a usermod (“RTC”) that looks like it covers that.

Thanks, i will check how to use this!

did you find a solution?

Yes, I compiled with the RTC usermod and it works.

2 Likes

Hi,

How did you compile? I am using WLED beta release 0.14.0-b1

Followed below steps, compiled without errors but for some reason I dont see RTC in user mod.

  1. copied usermod_rtc.h to WLED-main folder where platformio.ini is residing
  2. added -D USERMOD_RTC under build_flags in platformio.ini

build_flags =

  • -DMQTT_MAX_PACKET_SIZE=1024*
  • -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL*
  • -DBEARSSL_SSL_BASIC*
  • -D CORE_DEBUG_LEVEL=0*
  • -D NDEBUG*
  • #build_flags for the IRremoteESP8266 library (enabled decoders have to appear here)*
  • -D IR_ENABLE_DEFAULT=false*
  • -D DECODE_HASH=true*
  • -D DECODE_NEC=true*
  • -D DECODE_SONY=true*
  • -D DECODE_SAMSUNG=true*
  • -D DECODE_LG=true*
  • ; -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library*
  • -DWLED_USE_MY_CONFIG*
  • ; -D USERMOD_SENSORSTOMQTT*
  • #For ADS1115 sensor uncomment following*
  • ; -D USERMOD_ADS1115*
  • -D USERMOD_RTC*
  1. compiled and uploaded

I am trying to compile with the RTC module, using version .14B4, and the module it not being included in the build. Other modules (such as audio) are not being included as. Could someone recommend the best way to do this? I followed the directions on the wled knowledge page, but still doesn’t work.

Hi there,

Hello, I solved it by enabling a hotspot on my phone. login name and password same as the Wled(esp32) settings. The time is then taken from the internet via my phone. After that, time continues to run in the ESP32 without internet.

Hi can you share .bin file of Your compiled wled with include rtc Project.
Or guide how can create rtc to wled.