Find devices with gaps dates

Hi, I’m pretty new to mongodb aggregate.
My devices needs to upload Keep Alive (date format) to mongo every 12 hours.
i want to find those devices that missed uploads by finding the gap by dates.
wich query will get the results?
thanks.