Alarm Script - Call Your Phone


 

Andrew Flusche

TVWBB Member
There may be another way to do this already, but I cooked this up the other day. I was trying my first overnight smoke (on accident - the darn brisket wouldn't get done), and I wanted something that would be sure to wake me up if a HM alarm fired.

I decided to make the HM call my cell phone for any alarm event.

I use Twilio for my business phones, so it was a snap to setup a script that the HM can request which triggers an outbound Twilio call to my cell.

I used wget to have the HM hit this PHP script:

Code:
require "Services/Twilio.php";

// Account credentials
$AccountSid = "ACCOUNTSID";
$AuthToken = "TOKEN";

$from = "VALID_CALLER_ID_NUMBER";

$to = "YOUR_CELL_PHONE";

// Start Twilio
$client = new Services_Twilio($AccountSid, $AuthToken);

// Make Twilio connect the callers
$call = $client->account->calls->create($from, $to, 'alert.php');

The alert.php file just outputs TwiML like this:

Code:
<?php
    header("content-type: text/xml");
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
    <Say>Smoker alarm</Say>
</Response>

If people are interested in this sort of thing, I could further customize the scripts to actually say what the alarm is on the phone call. And I might could make it easy for folks to set them up.

But since there may be another (easier) solution already, I figured I'd post this before investing more time into it.
 
You could setup the e-mail to text your phone pretty easily also.

In the example of the iPhone, if you have Do Not Disturb mode enabled, you wont be alerted by an email, but you can allow specific phone numbers to bypass DnD mode and allow the phone to ring. This would be ideal for an overnight cook.
 
I use PitDroid, but I couldn't seem to get the alarm to fire off.


click on the alarm clock and you then set your temps Below and Above and then you check the box next to the one you want to have the alarm. Also, in the settings there is a setting to Always use alarm sound, even when in vibrate and silent mode, I have that checked too.
 

 

Back
Top