I want to make a couple more changes to my sketch so that an ntp failure is not catastrophic (at the moment it waits for the ntp response before proceeding, and this is not ideal), and then I'll post my code.
I've now sorted things out so that ntp failure is ignore, and is retried after a short period of time. I've also added dns lookup for a list of 5 different servers that it uses in a round robin fashion. Finally happy with my solution , and will leave it alone to check its reliabilty.
Open-source tools for energy monitoring and analysis. This project uses the GNU General Public Licence