Page 3 of 4

Re: what are people doing with custom notifications?

Posted: Mon Nov 23, 2009 11:48 am
by jansolo
Thanks fubaya for your useful scripts.

Anyway, to monitor a website I use lynx -dump http://www.X.com/ > .b
Maybe you "links" is a typo. It's impossible to check in Google for "links" as you get billions of results.
lynx is a well known text browser.

Kind regards,
janSolo

Re: what are people doing with custom notifications?

Posted: Mon Nov 23, 2009 4:45 pm
by fubaya
Glad someone found a use for them. There is actually a links browser. I think it has more features and is faster than lynx, but 99% of my use is for the dump option and links is usually a little cleaner, so that's the only reason I use it. Of course, the output doesn't mater for that script so anything would work, even wget, curl or snarf. I probably should have said lynx though, since it's more common.

http://links.sourceforge.net/

Re: what are people doing with custom notifications?

Posted: Tue Nov 24, 2009 6:12 pm
by brainbarker
Hi,

Just found Prowl yesterday, and having fun getting things set up. I've seen some very creative uses posted so far, but the command line ones all seem to use curl or prowl.pl. I'd like to be able to send notifications from my router (Linksys WRT54GL running Tomato), maybe for an unknown WiFi client connecting, or reboots. Unfortunately, space is tight and there is no curl or perl. I might be able to roll my own busybox with curl and make a new firmware image, but that's probably more time that I have to devote to it. Does anyone have straight shell code (ash, in this case), that can send the notifications?

Also, I haven't seen anyone mention UPS monitoring yet. My network hardware and my Linux home server all have battery backup. There is software for Linux (apcupsd in my case) to monitor the UPS status and run scripts when interesting things happen. That will probably be my first custom setup.

Re: what are people doing with custom notifications?

Posted: Tue Dec 22, 2009 1:32 pm
by issy
I often type out notes on my iphone from the web/documents/cal, usually this is info you need only once i.e directions , reference numbers, contact details, reminders.

Created an Automator Service on my mac with a small python script, the service is available in any application and has been assigned a short cut key.
Now i just highlight the text i want, hit CTRL+CMD+P and i get the notification on my phone a few seconds later.

The code is here: http://gist.github.com/261740

Re: what are people doing with custom notifications?

Posted: Wed Dec 23, 2009 6:44 am
by fubaya
I use Prowl like that a lot too. Luckily, in Linux (KDE anyway), highlighting something automatically copies it and there is a command line program to interface with the clipboard called xclip, so even a dummy like me can do this with minimal effort. This sends the last thing copied on the computer to Prowl:

Code: Select all

#! /bin/sh
txt=$(xclip -o) && curl -k https://prowl.weks.net/publicapi/add -d apikey=xxxxxx -d application="FromPC" -d description="$txt"

To do it in reverse (jailbroken iPhones only), I have a Springboard icon linked to a script which scps the phone's clipboard to my PC and executes a script on the PC which extracts the contents and pipes it to xclip. I don't know if any of that made sense, but the end result is that I tap an icon on the phone and the clipboard contents are copied to my computer's clipboard. Setting this all up is actually easy, the scripts are oneliners, but it's too much to get into here and I doubt anyone is interested.

Re: what are people doing with custom notifications?

Posted: Wed Jan 13, 2010 3:32 pm
by erazer
I will use the API to alert me (on my iphone) whenever my front door is opened :mrgreen:

With the help of some Z-WAVE modules.

Ain't that cool :cool:

Re: what are people doing with custom notifications?

Posted: Sun Jan 17, 2010 7:19 pm
by blaktornado
Is there any way to send messages to Prowl through Applescript? I use Applescript to open certain applications (like Dropbox) on startup to speed up login times, and was wondering if there was a way to send a message directly through Prowl to my iPhone to tell me that my computer was switched on (I have Growl-Prowl set to only send messages after 5 mins of activity), so I can't just make a growl notification appear to get around it.

Re: what are people doing with custom notifications?

Posted: Sun Jan 17, 2010 10:47 pm
by iaian7
Not sure if this helps as far as AppleScript goes, but you can use many of the Automator actions for connecting to URLs. I had some problems trying to use "Get Text from Website" - it'd send double notifications. Using something like "Get Link URLs from Webpages" is technically wrong, but heck, it works!

URLs can use the following format:

Code: Select all

https://prowl.weks.net/publicapi/add?apikey=API&priority=0&application=APP&event=EVENT&description=MESSAGE

I went ahead and created an OSX Service for pushing selected text to the iPhone. :D

Download here: http://iaian7.com/blog/ProwlPostAutomatorService

Re: what are people doing with custom notifications?

Posted: Mon Jan 18, 2010 7:29 pm
by maelcum
blaktornado wrote:Is there any way to send messages to Prowl through Applescript?

In addition to what iaian7 already said, you could just as well hand it over to Terminal. A one liner. Just like this:

Code: Select all

do shell script "curl  -s  -k  https://prowl.weks.net/publicapi/add  -F apikey=_APIKEY_  -F application=_APP_  -F description=_MESSAGE_"


where
_APIKEY_ is your api key.
_APP_ is your script name or whatever
_MESSAGE_ is, well, what you want to see on your iPhone

Re: what are people doing with custom notifications?

Posted: Wed Jan 20, 2010 12:46 am
by blaktornado
Both of those helped a lot! Thank you very much, guys :) It's so cool having my iMac tell me whenever it starts up. Thanks for your help! (the Prowl service is very cool too!) =-)

Re: what are people doing with custom notifications?

Posted: Fri Jan 22, 2010 10:05 pm
by yzf600
brainbarker wrote:Hi,
I'd like to be able to send notifications from my router (Linksys WRT54GL running Tomato), maybe for an unknown WiFi client connecting, or reboots. Unfortunately, space is tight and there is no curl or perl. I might be able to roll my own busybox with curl and make a new firmware image, but that's probably more time that I have to devote to it. Does anyone have straight shell code (ash, in this case), that can send the notifications?


All you really need is to fetch this url:

Code: Select all

http://prowl.weks.net/publicapi/add?apikey=xxx&application=xxx&event=xxx&description=xxx&priority=xxx


This is what I did in on my embedded linux box (ngw100 running busybox). Actually, I was able to compile python for my ngw100 and I use the "urllib" to fetch the url.

I'm running my own DIY home security system using the ngw100 and some custom hardware for garage door monitoring and opening. Previously, I was limited to getting email or sms on my phone when the system sounded an alarm. Now I get a nice long and loud emergency push notification to my phone. Perfect. You can check out my blog for more info on my system: http://yzf600.dns2go.com/blog

Re: what are people doing with custom notifications?

Posted: Sat Jan 23, 2010 9:30 pm
by iaian7
yzf600 wrote:All you really need is to fetch this url:

Code: Select all

http://prowl.weks.net/publicapi/add?apikey=xxx&application=xxx&event=xxx&description=xxx&priority=xxx



I was never able to get it to work without a secure connection (https://)... does the plain link actually connect?

Re: what are people doing with custom notifications?

Posted: Mon Feb 22, 2010 6:19 pm
by bubbanc
I just did a writeup on using Prowl and Outlook to get selective email notifications. http://bit.ly/olprowl

Re: what are people doing with custom notifications?

Posted: Sat Mar 27, 2010 1:27 pm
by basn
Nice examples by everyone, i didnt find what i needed for myself so i wrote a more extensive bash script (bad coding but hey, it works)

Code: Select all

#!/bin/bash
# Script is for prowler for iPhone and mISC
# Written by Basn <basn at lan2k.org>
# Copy and Modify as you wish, ugly code yes ;)

# API KEY
APIKEY=YOURAPIKEY

# Script starts
PRIOR=$1
APPR=$2
EVENTR=$3
FIRST=$@
shift
SECND=$@
shift
THIRD=$@
shift
FINAL=$@
if [ $PRIOR = "-v" ] ; then
   echo "usage: $0 prio applicationname event description"
   echo "prio: 2 - -2 (standard prowler)"
else
   curl -s https://prowl.weks.net/publicapi/add -F apikey=$APIKEY -F priority=$PRIOR -F application=$APPR -F event="$EVENTR" -F description="$FINAL" >> /dev/null
fi


Right now i use this script with irssi's trigger.pl to trigger different stuff from different channels/pm's.

Re: what are people doing with custom notifications?

Posted: Fri Apr 23, 2010 3:25 am
by Lazybones
I use it with flexget to notify me when new downloads have started.

Re: what are people doing with custom notifications?

Posted: Wed May 12, 2010 9:51 pm
by fwd4
I'm using Prowl to send the following:

    send word of the day
    send quote of the day
    send alerts from Nagios
    monitor changes of job webpages of companies I want to work at

I've also added a form to my website so my friends can message me directly like a normal SMS.

Re: what are people doing with custom notifications?

Posted: Fri Aug 13, 2010 7:07 pm
by garman
I have custom build program that listen to my tweets and allow me to send instructions to my PC, I use Growl( windows) -> Prowl for feedback.
I have a couple of NAS devices that will alert me if they have disk problems, however for soem reason the messages are not being forwarded to Prowl

Re: what are people doing with custom notifications?

Posted: Fri Sep 03, 2010 7:22 pm
by slashk
bobpatterson wrote:just wondering what people are doing with custom notifications with prowl.


I get updates on my Google AdSense account via a ruby script in crontab:

  • Install the Mechanize and Prowly ruby gems:

    Code: Select all

    $ gem install mechanize prowly
    If you have issues installing the Mechanize gem, see http://nokogiri.org/tutorials/installing_nokogiri.html. You are probably missing the required libraries for Nokogiri.

  • Get the code for the script from http://gist.github.com/564369

  • Edit the top part of the code (between the "CHANGE VARIABLES BELOW") to add your AdSense login/password and Prowl API Key:

    Code: Select all

    #### CUSTOMIZE THE VARIABLES BELOW
    ADSENSE_LOGIN = "ENTER YOUR ADSENSE EMAIL LOGIN HERE"
    ADSENSE_PASS = "ENTER YOUR ADSENSE PASSWORD HERE"
    PROWL_API_KEY = "ENTER YOUR PROWL API HERE"
    ### DON'T CHANGE ANYTHING BELOW HERE

  • Make the script executable:

    Code: Select all

    $ chmod +x adsense_prowler.rb

  • Add to crontab with something like

    Code: Select all

    30 12,23 * * * /home/mtbcalendar/adsense_prowler.rb

This configuration sends me prowl messages at 12:30 PM and 11:30PM that look like this:

Code: Select all

Google AdSense - Info
Today's haul is $1.04
Monthly haul is $23.73

Re: what are people doing with custom notifications?

Posted: Tue Oct 12, 2010 6:25 am
by southfreo
Mobile/ISP/Weather monitoring via an app I wrote called Quota for OSX

http://www.southfreo.com/QuotaforOSX/Notifications.html

Re: what are people doing with custom notifications?

Posted: Tue Mar 15, 2011 12:25 am
by mrwoodo
I have a trading app I've written, on and off, for the last couple of years. The original idea was to have it buy / sell autonomously during the day. 99% of the task is to come up with the parameters to determine a 'buy' signal. Over time I've come to realise I cannot capture this entirely in code - The further I refine the parameters, the less buy-signals are produced. Broadening the parameters produces too many duds / bad trades.

So with this, I've decided to use prowl for sending me a url, with a chart showing price / volume information at the time of the potential buy. On this page, I press a 'confirm' button to complete the buy (currently working on getting this to be valid for only 60 seconds after the notification).

Prowl has become my safety-net :grin: