freq_sync_py: implemented presence detection.