Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Prowl plugin - send messages to iPhone/iPad

Questions and comments specific to a particular plugin should go here.
Post Reply
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Prowl plugin - send messages to iPhone/iPad

Post by mickelin »

I have put together a simple Prowl plugin that lets you send messages to your iOS device(s). Great for getting push notifications from EventGhost when you are away from home etc. This plugin sends directly to the iOS device, no need to install Growl.

You need to purchase the Prowl app from App Store, register an account at http://www.prowlapp.com and generate an API Key that you enter in the plugin config. The rest should be fairly straight forward. You can specify your own message parameters or forward {eg.event.string}, {eg.event.payload} etc.

In addition to showing the message, Prowl also lets you start an app on the device or redirect to a web page when the message arrives. For instance, you could have a motion detector at home, let EventGhost send a message when motion is detected, and have Prowl redirect to a web camera on the iPhone, showing you what's going on.

It uses Jacob Burch's prowlpy library (included) and some code is borrowed from Pako's Growl plugin. Thanks guys!

Try it and let me know what you think.

/mickelin

Newest version always here:

Version 0.2 - added support for unicode characters in message
Attachments
Prowl.zip
(11.17 KiB) Downloaded 188 times
Last edited by mickelin on Wed Jan 30, 2013 6:35 pm, edited 1 time in total.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Prowl plugin - send messages to iPhone/iPad

Post by krambriw »

Nice, thank you,
Initial test is working fine, currently using Growl and Growl plugin in my "production system" but it is always nice to remove software layers in between...

BestR Walter
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Prowl plugin - send messages to iPhone/iPad

Post by mickelin »

Thanks! Yes, I wrote it because I wanted to avoid installing any extra software on my "production system" :D Trying to keep it to a minimum to ensure stability.
User1306
Experienced User
Posts: 53
Joined: Sat Oct 13, 2012 4:37 pm

Re: Prowl plugin - send messages to iPhone/iPad

Post by User1306 »

works perfectly, amazing thanks :D
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Prowl plugin - send messages to iPhone/iPad

Post by mickelin »

I'm trying to add support for unicode characters (ÅÄÖ) but the whole encoding thing has got me confused. Adding .encode(eg.systemEncoding) to the message parameters gets rid of the Python errors, but the messages turn up in Chinese characters on the iPhone! Any tips on properly handling unicode? I have read a lot but still can't get it right.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Prowl plugin - send messages to iPhone/iPad

Post by krambriw »

You could try the code below, it works fine for me after the change and restart of EG (I receive ├Ñ├ñ├ in my iPhone). It might be that you could do it smarter in a way but I think this was simple and easy enough.

BestR

Code: Select all

    def Push(self, application, event, description, url, prio):
    	p = Prowllib.prowlpy.Prowl(self.apikey)
    	try:
    	    p.post(
    	        application.encode('utf-8'),
    	        event.encode('utf-8'),
    	        description.encode('utf-8'),
    	        prio,
    	        None,
    	        url
    	    )
    	except Exception,msg:
    	    print msg

    def QuickPush(self, message):
    	application = eg.ParseString(self.application)
    	event = eg.ParseString(self.event)
    	p = Prowllib.prowlpy.Prowl(self.apikey)
    	try:
    	    p.post(
    	        application,
    	        event,
    	        message.encode('utf-8'),
    	        self.prio,
    	        None,
    	        self.url
    	    )
    	except Exception,msg:
    	    print msg
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Prowl plugin - send messages to iPhone/iPad

Post by mickelin »

That did it, thanks Walter! :D
Rauna
Posts: 4
Joined: Wed Jan 30, 2013 11:29 am

Re: Prowl plugin - send messages to iPhone/iPad

Post by Rauna »

Hi

Stupide question, where do you put the code to get ├Â├ñ├Ñ ?

Kenneth
Rauna
Posts: 4
Joined: Wed Jan 30, 2013 11:29 am

Re: Prowl plugin - send messages to iPhone/iPad

Post by Rauna »

Hi

Stupide question, where do you put the code to get ├Â├ñ├Ñ ?

Kenneth
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Prowl plugin - send messages to iPhone/iPad

Post by mickelin »

New version with Walter's unicode fix in first post
Post Reply