Switched to using curl to grab the xml file. Python was having trouble when the script was run from the cron job.
Improved the up/down detection logic. Max up detection delay is the polling period. Max down detection delay is the polling period plus the heartbeat period.