Replies: 3 comments 1 reply
-
That is because the device system time was not set before calling that function. The system time get from this should be a valid timestamp.
The function description is here and the arguments are described clearly. There is no example code for this function unless it used here to delete the log data. |
Beta Was this translation helpful? Give feedback.
-
You just call this to get time from NTP server (low precision).
Then you need to wait until the time get from this is valid
NTP library may be suitable for high precision internet time synching. If you get time from RTC chip, you can set the device time with this function. |
Beta Was this translation helpful? Give feedback.
-
I don't know how the NTP library sets the device time, if you get timestamp from it, and to make sure the system time was set properly, you can pass that timestamp to this function too. |
Beta Was this translation helpful? Give feedback.
-
Hello,
few month ago I created an discussion here in GitHub repository pointing out that the method
deleteNodesByTimestamp
doesn't work correctly with$key
as atimestampNode
parameter.In a few days you pushed new update for the Firebase ESP32 library where this issue would be resolved. Unfortunately I didn't had time to look into this until today ...
I have updated my Firebase ESP32&ESP8266 library to the newest version:
Firebase Client v3.1.5
Tried to run this code:
And I get this error back:
My firebase code setup is OK because I can write data to the database without any problem.
I am setting the time for my ESP32 as follows:
This is my database structure to which I am trying to use the
deleteNodesByTimestamp
:Can you post somewhere example code with working
deleteNodesByTimestamp
function? Or tell me what am I doing wrong in my code so I can get this working ...Thank you for your awesome work!
With regards,
Jakub Szlaur
Beta Was this translation helpful? Give feedback.
All reactions