I have no mobile phone that works with Instapush, but I did manage to send event notifications from VC to Instapush without a problem. In my Instapush dashboard I can see that all the events were successfully transmitted.
My steps:
INSTAPUSH
1. Signed up for an Instapush account at
https://instapush.im/2. Noted my user token number, which is shown in the INFO tab of the dashboard.
3. Clicked on the APPS tab and added an application (+AddApplication). (I called mine "myVox". Call it whatever you want.) This generates an app id and application secret, both of which can be found under the Basic Info tab of the newly created myVox app.
4. My notification will send info on the song that is now playing on my computer. In the Events tab of the myVox app, I added a new event.
-->4a. I named the event "new_song"
-->4b. I will be passing it 2 "trackers": {title} and {artist}.
-->4c. I then entered the Push Message: "Now playing {title} by {artist}"
IN VOXCOMMANDO
1. Created an instapush map in VoxCommando in which to store user token, app id, and app secret for easy access later.
2. Created a command that is triggered by a new_song event within VC, when a new song starts playing on my computer (you can use existing event triggers or whatever you want -- I made this one up). In VC, my new_song event includes 2 payload values: {1} song title, {2} artist name. These are used in the command itself.
3. The command only requires a Scrape.Post request. To figure out the syntax, I referred to Instapush's REST API page:
https://instapush.im/developer/rest.
They are giving curl examples, but it doesn't matter. -H in curl refers to the Header, -d to Datastring. Compare it to the parameters in VC and you'll see how it works.
(HTTP requests, used by "
RESTful" web services, have standard parameters that must be used, no matter which programming language or tool you are using. Any example online in one particular language should be translatable. In VC, the scrape actions are how we handle basic get/put/post requests.)
For Scrape.Post actions in VC, it's usually easiest to enter the parameters using the Parameter Helper.
http://voxcommando.com/mediawiki/index.php?title=Parameter_HelperSee below.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.2.3-->
<command id="273" name="New song notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape.Post</cmdType>
<params>
<param>https://api.instapush.im/v1/post</param>
<param>{"event":"new_song","trackers":{"title":"{1}","artist":"{2}"}}</param>
<param />
<param />
<param>application/json</param>
<param>x-instapush-appid: {M:instapush.appID}</param>
<param>x-instapush-appsecret: {M:instapush.appSecret}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Now playing {1} by {2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<event>new_song</event>
</command>