Sending An AMMP Message With Only A Web Browser

You don't need hardware to try out the Axeda platform.  The Axeda platform communicates using AMMP - Adaptive Machine Message Protocol.  AMMP uses JSON encoded objects sent to the Axeda platform in an HTTP POST.  Any device that is capable of making an HTTP POST (such as a web browser) can send data into the Axeda platform.  When you type the URL of a website into a browser's address bar you are sending a GET message to that website.  On most websites, when you fill in a form and then hit 'Submit' you are sending the data in a POST message.  There are several testing websites and many browser plug-ins that let you POST data to any website.  Here are two I have used:

http://hackst.com
http://www.hurl.it

Another website that will act as a proxy and let you inspect messages going to and from a device is Runscope: https://www.runscope.com

To use Runscope you must create a free account.  Here is a quick, independent overview of Runscope: http://chrisrisner.com/Debugging-with-Runscope

Whatever method you choose to send an HTTP POST you will need three pieces of information: the URL where to send the data, the correct content type header for the message, and the JSON message itself.

To use the http://hackst.com website to send data fill in the top, URL field with: dev6-connect.axeda.com:52689/ammp/data/1/mbed!

We are using ‘mbed’ as a handy model that is already provisioned on the Axeda platform.  Enter a unique serial number after the exclamation point - use a number that includes your cell phone number to be sure no one else has used that number before.  Next, click on the drop down to the left of the URL field and select POST. The page should look like this before continuing:

mbed

Click on 'Set POST Body' than copy the JSON object below into the text box:

{
"alarms":[{"name":"lowTowel","description":"Less than 5 towels left","severity":100}],
"events":[{"name":"newDispensed","description":"A paper towel was dispensed"}],
"data":[{"dataItems":
{"CurrentBrand":"Burly","RemainingTowels": 4,"DispenseModeEnabled": true}}],
"locations": [{"lat": 42.098,"lon": -72.573,"elv": 15}]
}

Click on 'Add Header' and, in the left box, enter:

Content-Type
In the right box enter:
application/json

mbed 
Click on the blue 'Execute' button and less than a second later you should see the results page:

mbed 
Go to:
https://connect.axeda.com
Select mbed from the drop down and then enter the unique number in the serial number text box

mbed

Click on the ‘Check Connection’ button

mbed

Click below to learn how to route data into your devloper account

Comments

There are several testing

There are several testing websites and many browser plug-ins that let you POST data to any website. - Dr. Hicham Riba