Growling PhoneValet

by Gordon Meyer

In Smart Home Hacks, Greg Smith wrote about using LanOSD to display notifications of CallerID (and other events, such as someone ringing your doorbell) on all the (Macintosh) computers. (See Hack #31 "Broadcast Messages On Your Home Network" on page 130.)

Unfortunately, the developer of LanOSD has abandoned his application in, well, a hissy fit over Apple switching to Intel processors. Making matters worse, even if you manage to find a copy of the application elsewhere, the last beta version expired in December 2005 so it won't run at all.

Fortunately, the folks who create Growl have been quite busy and it has really come a long way in the last year. You can read what I've written about Growl in the past, but the current scoop is that the network notifications are easier to manage then they used to be. Which means, not only is Growl the only viable replacement for LanOSD, it's actually a big improvement in because of its features and support.

So I finally spent a few minutes and converted all of my LanOSD notifications over to Growl. It has been working wonderfully! The first thing I changed was the CallerID notification that PhoneValet uses, it was a simple change; here's how the new code looks:

try
tell application "GrowlHelperApp"
notify with name "Incoming Call" title "Incoming Call" application name "PhoneValet Growl" description callerName & return & callerNumber with sticky
end tell
end try


One conceptual hurdle that LanOSD users will have to adjust to is that Growl, for security reasons I suppose, requires an application to register itself before messages will be accepted. Here's the script I used to register my "PhoneValet Growl" script:

tell application "GrowlHelperApp"
set the notifs to {"Incoming Call"}
register as application "PhoneValet Growl" all notifications notifs default notifications notifs icon of application "PhoneValet"
end tell


Some of the sample code I looked at re-registers with every message sent, but so far that hasn't been necessary for me, so I just ran the script above once and everything has worked. I also set up notification forwarding, on the computer where PhoneValet is installed, so that everyone on the network (that has Growl installed, of course) can see who's calling. (Which I've greatly missed since LanOSD self-destructed.)

So, if you're working on Greg's hack, this should give you a bit of what you need to substitute Growl for LanOSD. Feel free to leave a comment if you need more help, and I'll be writing more as I explore what Growl has to offer for home automation users.

7 Comments

l0ne
2006-01-06 03:42:11
Not for security...
...but for UI reasons. Growl requires an application to name itself and state its notifications to add it to the Applications pane of its preference pane.
gregjsmith
2006-01-06 07:05:13
Growl too!
I too switched my scripts over to Growl. I find it superior to LanOSD as well.


--Http://homepage.mac.com/gregjsmith

sjk
2006-01-06 15:54:27
FYI: duplicate scripts
Both scripts are the same in your article, Gordon.
Gordon Meyer
2006-01-06 16:14:55
FYI: duplicate scripts
aarrgh! Thanks for letting me know, I've corrected the first script.
sjk
2006-01-06 17:07:01
FYI: duplicate scripts
Thanks for the article.


Btw, is there any way to get notification of new comments on O'Reilly weblogs, and how did you notice mine? I don't see any feeds for them.

Gordon Meyer
2006-01-06 17:43:24
FYI: duplicate scripts
Well, I get new comments in email when they're added to my article (even when I add a comment myself) but I don't recall how (or if) I turned that on. Sorry.
sjk
2006-01-07 13:14:34
weblog comment notifications
No notification preferences (or any others, for that matter) here. I'm still baffled by how "low-tech" the O'Reilly weblogs have remained in comparison with others around the web. Almost seems like they're intentionally discouraging any interactive discussions lasting more than a day or two. 'Tis a shame since both the topics and participants are often quite interesting, with a relatively high signal-to-noise ratio.