Send Notification from Electric Imp to iOS

Here is an easy way to send notifications to iOS devices from your electric imp.

  1. Download <a href=https://itunes.apple.com/us/app/prowl-growl-client/id320876271?mt=8>Prowl (iphone link)
    $2.99 -I have no association with Prowl BTW :slight_smile:

  2. Generate an API key to allow you to generate notifications.

  3. In the electric imp planner connect your impee to a HTTP request

  4. Edit the URL in the planner HTTP request as;
    ‘https://api.prowlapp.com/publicapi/add?apikey=c9fae6029b37e29ba203d79c9929c99bc79c99bc&application=Garage-Door&event=Activated-from-WWW’

There are three variables in this URL;
–apikey=c9fae6029b37e29ba203d79c9929c99bc79c99bc //Dummy key - use yours from step 2
–application=Garage Door // Text you will see on your notification
–event=Activated - from WWW // Text you will see on your notification

  1. On your IOS device that is connected with your Prowl API you should see a notification;

  2. There are further options within the Prowl API - check them out here

Might work with Android too, but we are all IOS here so I can’t test it out.

Prowl is iOS only. The same concept will also work with Pushover ($3.99, iOS and Android) and Boxcar (Free, iOS only, Android is coming soon).

I thought I read somewhere here that there would be an Electric Imp “Dashboard” iOS app for monitoring/controlling things via your imp. If so, it would be awesome if it supported push natively. Sort of lame that if you click on a notification you don’t go to the thing it is notifying you about.

I have implemented a push server myself for my custom app and it is pretty simple (some examples online), when we get VIMPs, push will be the only thing requiring me to keep a server around.

There will be an integrated imp-branded app, yes - but that’s later in 2013. Until then you may need to push via other means :slight_smile:

Is it possible to pass variables to prowl? I would like to pass the state of another sensor to the prowl notification tried %value but get exactly that and not the value itself.

@302tt: I have done all described in your post but get no notification!? There are a few ‘unknowns’ for me in the description: which method should I choose: ‘POST’ or 'PUT and what Content Type: ‘…urlencoded’ or ‘json’ ? Perhaps a stupid question: what (if any) lines do I need to add to my code to get a message actually being output, i.e. what triggers a notification being sent?

P.S. I have checked the url used in the planner directly in Safari and get the notification, but now I want to know how I can trigger this via the Imp

@302tt: Looking through the examples (again!) I now found the answer to my question! Have to look better in future before asking questions… Sorry :">

ok So I have played with this and get the connection to PROWL and can send a message to the IPAD using prowl but is there anyway to send the message from the IMP and thus change it in the IMP vs. just whats inbedded in the URL request via post on the PLANNER.

Ok playing with this further. I found you can have multiple outputs in the imp and then connect to multiple HTTP requests in planner then in the address to prowl set different messages. this works but is the only way I have found to send different messages. Hopefully you will develop better methods for interacting with the iOS/

Agents are the better method, in closed beta right now but will be available in the near future.

@ Hugo

Hi, and thanks

Its “later” Please choose one:

Baseball, Cricket, Pay Period, Period Period, Seasonal, Fiscal, Cosmic ???

Throw us a bigger bone, Thanks!!

(Already LOVE my little Imp!)

The aim is for mid-feb, but a lot depends on how much breakage the betatesters find :slight_smile:

Thats close enough, thanks!

I’ll be wating - patiently :-*

No, really :-* :-*

Typical for me would be:

Hugo_Push_Release_Day = I_Get_It_Working_On_Own_Day +1

Any possible documentation we can see ahead of time to give us an idea how they might work etc.

We’re working on that bit too! There are some rough docs for beta testers but we’re planning on posting better docs and various examples (eg: weather.com, twilio, etc etc)

Im trying a similar mechanism with android. i need to create the following http packet:
POST /1/messages.json
Host: api.pushover.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 180

token=…&user=…&message=…

So I tried to make an output port with some string in it, with the format i need, eg
output.set(“token=…&user=…”);
and i added in planner http request, POST, to https://api.pushover.com/1/messages.json
i connected the output of my imp to this request. i keep getting error 400.
I tried both json and urlencoded.

what do i need to change in order for it to work properly?

I have mine up and running, but I do need help to set up multiple outputs.

<?php curl_setopt_array($ch = curl_init(), array( CURLOPT_URL => "https://api.pushover.net/1/messages.json", CURLOPT_POSTFIELDS => array( "token" => "Token", "user" => "User", "title" => "Title", "message" => "Message", "sound" => "bugle", ))); curl_exec($ch); curl_close($ch); ?>

Hope it helps :slight_smile: Any help with multiple outputs would be much appreciated!

I have an Android and I want to use the “Notify My Android” public API to send info from my Electric Imp to my phone the URL command line is https://www.notifymyandroid.com/api.jsp#verifyWill you please give me a step by step code and set up example for the planners HTTP Request I have my API keys. I have provided a link to the Public API Documentation. https://www.notifymyandroid.com/api.jsp