Jump to content
Pete

Push notifications and a great API? Okay then!

Recommended Posts

This is pretty neat: https://pushover.net/

I had been thinking it would be great to have a notification app that you could somehow use with ProcessWire and this - with a little programming - would do nicely!

Notifications of new comments on your site? No problem. Built your own client support system in PW? Get push notifications of new tickets.

The possibilities are endless and the price tag isn't bad - free for up to 7,500 notifications per month and only $4.99 per user for the app :)


In fact, I already know a few clients who would love notifications of certain things to arrive this way!

  • Like 8

Share this post


Link to post
Share on other sites

You can use RSS to push things to IFFFT on the phone already :)

Share this post


Link to post
Share on other sites

RSS via IFTTT doesn't sound like it would be instant though. This would be pretty much real-time and something you can add anywhere in any project.

Share this post


Link to post
Share on other sites

Great thing about Pushover for my use case is that you can configure critical alerts to disregard things like phone being on silent mode.. and, of course, those can also trigger an alarm-sound that's sure to wake you up in no time. That combined with it being real-time (push, not pull) and a common hub (account) that all messages can go through (making it possible for one email or API request to trigger notifications on multiple devices simultaneously) make it pretty awesome :)

It would seem that IFTTT might supports something similar, but from different point of view: receiving an email (or text message or any other supported trigger) can trigger an event, which are apparently provided as applications of sorts. Interestingly one of those events is Pushover, so I'm guessing that "Pushover-like" functionality probably isn't built-in in IFTTT. @Diogo (or anyone else with experience using this), am I getting this right? :)

IFTTT website is so incomprehensible ("marketing-oriented" might be the correct word here -- a teaser with "join now" buttons everywhere) that I couldn't be really sure about anything. Being more than a bit stubborn, I refuse to install an app just to see what it does (or, better yet, "join" something that doesn't even explain what the heck it really is that I'm joining..)

  • Like 2

Share this post


Link to post
Share on other sites

There isn't much to explain in ifttt: if in one "channel" this happens then do in another "channel" that. Where channels are different social media sites, sms, email and others. But theres not much of a message hub as you mentioned and the triggers aren't realtime, they are triggered between every 15 minutes to a few hours, if I remember it right.

Ifttt is more useful for "yeah, thank you to remember me" notifications, where your usecase is more about really important notifications.

  • Like 2

Share this post


Link to post
Share on other sites

@LostKobrakai: right, the polling frequency was explained on the site after all -- 15 minutes "or even faster". I guess I didn't read the site carefully enough.. and the details being so scarce could be a result of each channel being so different from others. Might have to take another look :)

One thing that's still unclear to me is whether using the service costs anything and if there are any kind of limitations etc. to it's use? Also, is it possible to add things like new channels, or are these provided by the developers themselves and/or their official partners?

Just noticed that they've got specific channel for WordPress, but couldn't find a channel that would allow me to do something less specific via web, i.e. trigger an action on a ProcessWire site based on email. I might be misunderstanding something here, though, so perhaps I don't even need a channel for that? :)

Share this post


Link to post
Share on other sites
One thing that's still unclear to me is whether using the service costs anything and if there are any kind of limitations etc. to it's use?

It's free and if there are limitations, there never affected my "recipes". They only disable ones, which throw to much errors. (Edit: limitations in form of quantity of triggers/time)

Also, is it possible to add things like new channels, or are these provided by the developers themselves and/or their official partners?

I think they only add channels by themself.

Just noticed that they've got specific channel for WordPress, but couldn't find a channel that would allow me to do something less specific via web, i.e. trigger an action on a ProcessWire site based on email.

There is a "email" channel. So you could send emails to "trigger@ifttt.com" but right now I've no idea how they identify, that this mail is for you, maybe the senders mail has to be created as "channel". you could even fire different events of of differerent hash-tags inside the mail. The other option would be to create a RSS feed, which could trigger actions. 

Edit: Damn, just read it another time, you mean to trigger an action in ProcessWire, not the action being the email send. That's where the limitations of ifttt come into play. It's concept is more geared towards the user / one of his different internet accounts being the recipient of the action.

I played around it a little bit, with saving my favorites from my 500px account to my box account. The official channel doesn't provide this function, and I wouldn't get the biggest size, the images are available. So I created a php script, which logs me in, to get access to all pictures and not only the not hidden ones. Then it parses the page, which it gets from the ifttt rss channel, to get the right image. The script url replaces the "image url" which a get value of the disired image, which should be uploaded to box. But that's still quite hacky and doesn't work very well. 

  • Like 1

Share this post


Link to post
Share on other sites

Here's a fun recipe...

  1. Install https://play.google.com/store/apps/details?id=eu.apksoft.android.smsgateway on an old android phone with a cheap sim with plenty of free sms messages.
  2. Expose the phone's webserver using https://pagekite.net/ (might be a bit of a challenge) (PageKite has been mentioned here before. Thanks Marty!)
  3. Send sms messages to your heart's content.
  • Like 4

Share this post


Link to post
Share on other sites

If anyone is interested, this is a realtime commenting system I'm implementing using it. It's very alpha and I'm not sure if I'll ever to publish it as a module, but it was very easy to implement. The comments are posted using AJAX and the simple api router I use calls a function to post the comment. This function in turn creates a Pusher event in PHP and sends the data to Pusher, which sends it back to the client (this is all push). There are a few lines of javascript waiting for the event to trigger, which in turn renders the comment that was send back from the server through Pusher. I'm using all native PW fields and templates for this, this allows me to have caching enabled on the server. Each time a comment is posted, the discussion is re-cached, so if someone loads a page, it should get most of what's supposed to be there, then any updates are done client-side.

  • Like 8

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...