ESP32 deep sleep, clock not precise

Hi

my ESP32 WROOM have a sleep time of 180 minutes, wakes up and send a lora package to my receiver, receiver then send to home assistant.

This 180 min is not 180 min:

Packages received in Home Assistant:

sensor.kube_1_pakke_nr, 22,2024-07-09T22: 18:43.315
sensor.kube_1_pakke_nr, 23,2024-07-10T01: 17:26.707
sensor.kube_1_pakke_nr, 24,2024-07-10T04: 16:37.606

Here are the time differences between each consecutive packet in minutes and seconds:

Between packet 22 and 23:

  • 178 minutes and 43.392 seconds

Between packet 23 and 24:

  • 179 minutes and 10.899 seconds

Questions
Why am I receiving packages in

  1. not same sleep time between packages?
  2. less than 180 minutes?

M

We need to see your code that sends the messages.

Hi

before I share, a question.

The code is not dependent of a certain status of a sensor, it read 5 sensors, and send sensor data then deep sleep.

Q:
I expect the code to run in the same manner each time it wakes up, and use same time (identical) each time, is this a wrong conclusion?

Personally, I have no idea, because I can’t see how the code operates.
Others may be better guessers than I am.

I may not solve the problem for you, but until I can see what’s causing it, neither of us will know.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.