Prowl and Growl
Sunday, August 9, 2009 at 9:26AM
ViM

This one is going to be an iPhone related post, but not in anyway as l33t as Shizzle's iPhone ping of death. if you haven't got an iPhone yet, go get one. Sure you can buy a HTC Hero, but why throw away the money if you can get yourself an iPhone and run cool scripts instead (right Tux?) ;). On the iPhone you're used to paying for cool apps. And be honest some apps are just worth paying for. This one, Prowl, will set you back $3.

Prowl is intended to be a growl client for the iPhone. Prowl is made byZachary West, who is also a lead developer of Adium.If you have a Mac, you will probably have tried Growl already. Growl shows unintrusive popups from apps like Aduim, aMsn and Skype. Handy to see what's going on, without opening the actual application.

You can connect Growl to your prowl application on your iPhone and receive notification there. You don't have to be running the app itself, as it also comes with push service. So when you're traveling or just away from home, you can still be notified of what is happening on your home computer.

For those scriptkiddies amongst us, there is also a prowl perl script, which you can use to connect any system event to your prowl client. The perl script is not much more than a http request to the prowl server, but does the job well. (You can also write your own http request within your existing script). So if you're running a download command and want to know if its done, just use prowl.pl to notify you on your iPhone. Or if you want to know if your webserver is offline, use prowl.pl to send you a notification on your phone. You only pay the $3 for the app and you've got 1000 push messages per hour to spend. You probably don't want any more messages than that within the hour, so it should do the job.Of course, be careful what you send, both themaintainerof the prowl server and of course apple can read the text if their interested.


I use prowl to get a push notification if someone is trying to call me on Skype. (At the time of this writing, Skype didn't have push notification).

Here's the quick and dirty applescript I came up with to talk to Skype and send me a push message on the phone.

repeat

tell application "Skype"

set gcall to send command "SEARCH CALLS" script name "call history"
set allwords to words of gcall

repeat with wd in allwords

set partnerhandle to "GET CALL " & wd & " PARTNER_HANDLE"
set gcall2 to send command partnerhandle script name "call get details"
set partnerhandle to last word of gcall2

set timestamp to "GET CALL " & wd & " TIMESTAMP"
set gcall3 to send command timestamp script name "call get details"
set calltime to last word of gcall3

end repeat

if last word of gcall2 is not "id" then

say "Hey, you missed a call from " & partnerhandle
set output to do shell script "echo " & calltime & " | perl -e 'print localtime(<>) . \"\";'"
do shell script "/opt/local/bin/perl /opt/local/bin/prowl.pl -apikey=E1A58852A14E3A9968E89097CCB1FC37F2DEBA01-application=Skype -event=\"Incomming call from " & partnerhandle & " at " & output & "\" -notification=\"please check Skype\" -priority=2"

delay 20
set gcall3 to send command "CLEAR CALLHISTORY ALL" script name "My Script"

end if
end tell

end repeat

ViM

"I am the gatekeeper to my own destiny and I will have my glory day in the hot sun."

 

Article originally appeared on dutchtechies (http://dutchtechies.com/).
See website for complete article licensing information.