I’m using this code to manually set the time on a Core using pub/sub.
I’ve found two things:
Having the Core in question publish its time every 15 seconds to the cloud seems to create instability with all the other particle devices linked to that account. I have even have a Photon or two in another physical location a mile away (but linked to the same account) and they are now going offline/online frequently in a way that they weren’t before, before I introduced the every 15s publish.
I have noticed this before on other occasions with other similar code but wasn’t convinced of the link.
Whilst I’m not 100% sure even this time, it does look likely there’s a link. Does anyone have any theories? Surely sending a repeating 15 second PUBLISH isn’t too much cloud traffic?
When I set the time via the unixtimestamp, no matter how hard I try to click ‘send’ the very second the timestamp I’m wishing to set matches the epoch timestamp, it still seems there’s a 7 second mismatch when I get the 15second publish from the device. Is this about the computational power of the Core?!
(I am hoping to use this facility to test whether the Core ever corrects its time using the particle cloud - I have never found that it does so, despite running with SYSTEM_THREAD(ENABLED); and not in any kind of
manual mode. I find it just continues to drift, getting more and more out of sync as the days and weeks roll by.)