Strange behavior of time on ESP8266
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Strange behavior of time on ESP8266
just put the class into your main file.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Strange behavior of time on ESP8266
I have added the class, now the whole system is more robust, works almost as expected.
I have had few rebooting of the board, I think between 5-15, but at least it is precise and turns on the heater.
Now, I am waiting 0800h to check whether will heater be turned off.
Thanks for help guys, I guess that I will leave this thread unsolved for some time, but 90% of problems are solved. Winter will not be that cold
thanks
EDIT:
Since I have added log to be written to file on the board, could that cause the problem regarding the size?
Should I remove file if size is grater than 1MB or so?
Thanks
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Strange behavior of time on ESP8266
One approach is to have multiple log files. For example you might start a new one each hour, deleting any older than (say) four hours. The rate at which you create them and how many you keep would depend on how quickly they grow; I'd advised never letting filesystems get more than about 80% full, maybe less on the ESP8266. Naming the files with sequential names aids management.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Strange behavior of time on ESP8266
You get 5-15 reboots per day? That is way too much... Might be worth investigating if the ntptime synchronization is blocking that long or even freezing. I get at most 4 reboots per day and even that is quite rare.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Strange behavior of time on ESP8266
You were right, ntp is the problem. I have found that error occurs from time to time. Will try to find another library or at least to make my ntp server more "available".kevinkk525 wrote: ↑Tue Nov 06, 2018 9:57 amYou get 5-15 reboots per day? That is way too much... Might be worth investigating if the ntptime synchronization is blocking that long or even freezing. I get at most 4 reboots per day and even that is quite rare.
Let me reach the pc, and I will post the error message that I got regarding the ntp.
Thanks
EDIT:
Here are the logs from esp:
Code: Select all
ERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUTERROR:<module 'utime'> [Errno 110] ETIMEDOUT