Being on call sucks. Getting woken up at 3am by a loud buzzer and instantly having to identify and fix some technical problem in a system that you're only somewhat familiar with...let's just say that the experience is equal to any horror Kafka could dream up.
...The only thing worse than getting woken up is also waking up your wife or husband. And the only thing worse than that is waking up your newborn. Since we have a baby on the way I figured I'd better solve this problem, and fast.
I wound up hacking together a solution that uses one of those fitness tracker wristbands in conjunction with my android phone to wake me - and only me - when an alert comes in from PagerDuty. Here's how I did it.
The Wrist Band
I decided to go with the Sony Smartband SWR10. By all accounts, it's a fairly mediocre fitness tracker. But it has the ability to vibrate whenever a notification happens on my android device. For some reason most fitness trackers don't have this feature, even though it seems like a no-brainer.
Overall I'm quite happy with this little device. It's small and lightweight. I don't even notice when I wear it to bed. It holds a charge for about 5 days, and a range of around 30 feet.
Pairing it with my Galaxy S5 wasn't too difficult. I did have to download some crappy sony apps to make it work, but that's life.
So I told the SmartConnect app to buzz me whenever the PagerDuty app sent a notification. The result was kind of sad. One pitiful little buzz. It might be enough to get my attention when I'm awake, but it's sure as hell not enough to wake me up at 3am.
...back to the drawing board.
Tasker is probably the nerdiest Android app you can buy. It lets you create little "programs" that are run whenever some event happens on your phone. An event like the PagerDuty app trying to wake me up in the middle of the night.
I wanted to make tasker intercept the pagerduty notification and buzz my wristband over and over until I turned it off.
Now, I was ready to have to do some actual hackety hacking to get the smartband to take orders from tasker. But luckily for me someone hadalready done it.
Mark Challoner has written an open source plugin for Tasker which lets it order the Smartband around. You can find it on github here. There's also a smartband tasker plugin in the app store, which is the one I used. This app has one of my favorite app reviews of all time. See sidebar.
Creating the Tasker "programs"
So in tasker, programs are called "profiles." We need to create two of them. The first will cause the smartband to start buzzing when the PagerDuty notice comes in. The second is to shut off the buzzing when I open the PagerDuty app on my phone.
The "start buzzing" program
- Create a new profile
- For the trigger, select "Event" > "UI" > "Notification". Click on "owner application" and select pagerduty.
- For the action, select "Plugins" > "Smartband"
- Name the action something like "smartband"
- In the smartband settings, tell it to repeat every two seconds. This is actually really important. If you have it repeat any faster, the smartband seems to want to disconnect from the phone.
Trigger the profile whenever a PD notification happens. Buzz the smartband every 2 seconds, forever.
The "stop buzzing" program
- Create a new profile
- For the trigger, choose "Application" then select Pagerduty.
- For the action, select "Plugins" > "Smartband" and tell it to cancel all notifications.
Stop buzzing the smartband when I open the pagerduty app