A startup has a website that must run 0/24. The datacenter is not notifying us on outages, and even if it would, relying on a single entity doesn’t feel safe.
The idea is writing a script that monitors the website and rings my iPhone in case of any problem. It doesn’t have to be call ring. Any sound would do. It must bypass the "don’t disturb me" mode.
It’ easy to make calls or send SMSs from Mac OS X Yosemite when there is an iPhone attached to the Apple ID. However, ringing the iPhone itself, especially from command line seems to be less trivial.
I’d like to avoid using third party software (including VoiP providers) if possible as more layers and more software means more bugs. Also, I would never give away my Apple ID password to 3rd parties.
There are few ideas so far.
Find my iPhone. It bypasses not only the don’t disturb me mode but any plugged in headphones too. That’s great. Is there a way to natively execute it from the Mac or somehow call it through Apple? Writing a REST application for this wouldn’t be a problem if there is an official interface. I thought about using browser emulation (Capybara + Webkit) that would log into my iCloud account and press the "Ring my phone" button but I find this fragile and unreliable. I just tried manually and it was like 5 clicks on a HTML5 interface that can be changed by Apple anytime.
As far as I know Skype accepts command line arguments on Linux and Windows only. If it still does at all. Otherwise, it could be a solution. It’s a 3rd party software, however, I didn’t have to provide my Apple ID, and I thought it might be reliable. The problem is that I don’t like to have Skype running on my Macs at all.
Even being able to send a couple of SMS to myself would be better than nothing. Can I somehow do that with iMessage and command line?
I think I’d prefer the find my iPhone as it is the most reliable to make sound, but any idea is welcome.