Syncing multiple NodeMCU (ESP8266) devices using the Arduino IDE and WiFi.

My question is how can I get better precision out of NTPTime or use another way to sync up time on multiple NodeMCU devices? I am trying to sync up (6) NodeMCU devices so they can perform functions at the same time. Using NTPTime I can get all the units to within about 1/2 or 3/4 of a second of each other. Any ideas on how I could get it closer. All the units are on the same WiFi network and communicating with the same time server. They resync every hour to make sure there is no drift. But like I said I can only get NTPTime to return the time in seconds. I thought about getting them to talk to each other in a master slave relationship but that might be more than I really need or want to code for. Any ideas would be appreciated.

RickH

How close do you need them?

I am in the exact same need.
I am thinking about syncing several devices within a network using a broadcast message over WIFI which is received by all devices at the same time. Given that WIFI has no load and reception is good, it should give very precise result.
Only question, how to receive a broadcast message in Arduino code :slight_smile: any thoughts?

markus_e:
I am in the exact same need.
I am thinking about syncing several devices within a network using a broadcast message over WIFI which is received by all devices at the same time. Given that WIFI has no load and reception is good, it should give very precise result.
Only question, how to receive a broadcast message in Arduino code :slight_smile: any thoughts?

Delta_G:
How close do you need them?

Same question. How closely do you need them synced? The possible answers right now range from that's physically impossible even for superman to no problem you can do that with example code.