Using Pushover from LSL

As much as possible I try and use all the tools I have to hand to keep on top of what's happening with SL, both in-world in my own little world, and also regarding the wider grid. I mentioned some of the tools back in a blog post in January and key to one of them was using Pushover to get push messages onto my (Android) phone and tablet. Earlier today I was thinking it could be handy to use their API to have in-world objects send me push notifications. One benefit of this would be that it'd bypass any of the false-positive spam-detection issues we've seen in the past with the likes of gmail. Another benefit is that it'd be fun and cool.

Here's what I came up with:

First off, to make use of all of this, you'll need an Android phone or tablet or an iPhone and a copy of the Pushover client app installed. As well as having an account you'll also need to create an application on their site so that you have an application key (it's free if you're going to be sending yourself fewer than 7,500 notifications in a month).

Once done all that's left is to make use of llHTTPRequest to POST a message. Here's the test script I wrote, with a dressed-up function for sending a message that could be useful in any number of scripts:

All this does is send a push notification to all my devices when someone touches the object it's inside of, telling me how far away they were at the time. The result on my phone is a push notification that looks like this:

(when you create an application on the Pushover site you get to assign an icon, hence the nifty Z&A logo) and when I select the notification it takes me to the Pushover app with the full details:

This is, of course, a really trivial example. But it could be handy for some less-trivial uses such as pinging you when your region has come back from a restart, or letting you know when its status has changed, or letting you know when someone's been booted out of your workshop, etc.

No comments:

Post a Comment