Replies: 6 comments 12 replies
-
Yep! My plan is to add RTC support after the NTP infrastructure is in place. |
Beta Was this translation helpful? Give feedback.
-
NTP has restrictions to stop flooding. Some people poll once per second. This get detected and sometimes an IP block gets put in place for a while. I guess that is fair. |
Beta Was this translation helpful? Give feedback.
-
If you were to plug in the time manually, with no Internet, would you want to do it via MQTT or via Serial access or some other way? If some other way what would you prefer? Web Interface would be nice but I'm not sure how hard that would be to code in. Would be nice to have a web Interface with serial debug output. |
Beta Was this translation helpful? Give feedback.
-
Just as a thought...I have a remote area system and i use a very cheap GPS serial output module. Even one of the fake Chinese one will work. i just get the time from the $GPRMC or $GNRMC sentences. This was you can poll every second without restrictions. |
Beta Was this translation helpful? Give feedback.
-
fdrs_gateway_config.h
fdrs_gateway.h
fdrs_gateway_serial.h
Serial Output:
Still thinking through how to prioritize all of the different time sources (NTP, GPS, RTC, etc.) and how to manage them in a way so they don't fight against each other. Then will also adapt the code for other processor types such as ESP8266 and others, if I can. Thinking we need a global variable or enum to keep track of what set the time and when the time was last set and check that every so often to validate that the time source is still working, and if not, fall back to the next accurate time source, if one is available. So GPS should be most accurate, and then NTP, and then RTC in my mind. Then there's the question of what if the GPS receiver is not tied to the MQTT gateway but some other gateway down the line? How would that all work together if the MQTT gateway is getting its time source from NTP but another gateway is getting its time source from GPS then now do we get them to work together? |
Beta Was this translation helpful? Give feedback.
-
Is this all becoming over complicated? Commercially. we use a date time variable. Behind the scenes a choice is made as to what updates those variables. GPS (with time offset) to update RTC if no lock then NTP (Careful with this. Poll to often and your IP is blocked) |
Beta Was this translation helpful? Give feedback.
-
A big attraction for me is no requirement for internet... So could we have some subset of timekeeping, given only a DS3231 ?
Admittedly it would be nice if NTP could set the initial value of the RTC.
ps timezones and NTP have been a challenge for me in the past.
Beta Was this translation helpful? Give feedback.
All reactions