Feature: Save time with RTC or in Flash memory #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DeltaLima/CanGrow#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the Controller starts and there is no connection to the NTP Server, it will try to reach it into infinity. During this time, all grow related stuff is off, which can be fatal e.g. when the light stays off for hours/days.
To prevent this, there should be a timeout with an alternative to restore the time.
One way could be to just use an external RTC via I2C e.g. DS3231
Another way is to store e.g. every hour the last timestamp.
Doing this with eeprom() could cause damage to the flash on the long term i guess. I think littlefs is a much better way to do, but still produces a lot write cycles on the flash memory, but it comes with an wear out logic.
I remember I read esp8266 flash memory can handle up to 100.000 write crycles per bit ?
Assuming a grow duration of 90 days, that would be 90days * 24 hours = 2160 times writing the timestamp.
100.000 / 2160 = ~46 grows
46 grows (90days) / 4 (quarter year) = 11,5
So after about 11 years the flash memory would be at its specified write limit.