How to post device data?
 

You can use your Web browser to post device data or, if available, let your devices directly post this data (your devices must be connected to the Internet using, e.g., Barionets from barix.com). Technically, the posting is a HTTP GET request. In order to post device data, please, use the following URL:

http://www.barimon.net/postdata.php?projectId=PROJECTKEY&mac=010203040506&alarm=false&info=VAL1=5.0,VAL2=ABC,VAL2=DEF
This post is composed of several parts:

  • http://www.barimon.net/postdata.php?: The Internet address of this server (URL).

  • projectId=PROJECTKEY: Replace PROJECTKEY with the key of your project. This part is only required if your project has a key assigned. You can set a key for your project on the "Project Administration" page.

  • mac=010203040506 A MAC address that uniquely identifies a device. You can manage the data of any number of devices in your project; for example, you could have a device for each floor of your house. You are responsible to keep track of the ids of all your devices. Using 35 as an id is just an example and you may wish to choose a different id.

  • info=VAL1=5.0,VAL2=ABC,VAL2=DEF: In this string the device readings are posted. "info" is a reserved word (like "projectId" or "key"). VAL1 and VAL2 are names of variables that contain device readings. A device can report on the state of any number of variables with different types (numbers and ASCII) and precision. In this example, the device reports on two variables: the first variable (VAL1) is a numer and has a precision of 1 digit; the second variable (VAL2) contains ASCII values. It is also possible to post several values to one variable at once: in the example, two values of VAL2 are posted. This is useful if a device periodically posts, say, the names of persons who past a gate in the last, say, 10 minutes. If you wish, you can choose different variable names for your variables (VAL1 and VAL2 are only examples) and you can use any number of variables.

We have created a demo project so that you can test the posting of data. You can post any data to the demo project without causing any damage (the data will be deleted periodically anyway). In order to post to the demo project use the following URL (cut and paste into your Web browser and edit the variable names and values in the info part):

http://www.barimon.net/postdata.php?mac=001122334455&alarm=false&info=VAL1=5.0,VAL2=ABC,VAL2=DEF

If you received a "Device data recorded" message, then everything went well. Otherwise, please, double-check the URL and the modifications you made. In order to see the effects of your posting, log into project "demo":

  • Click on "Login Into Demo Project" in the left menu bar.

  • Enter "demo" as Project Name and leave the Password field empty.

  • Click on "View all devices" in order to see the effect of your last posting to the device that you specified. (Please, keep in mind that there might be postings by other users to the same or other devices. So, there is a chance that your posting has been overwritten in the meantime. Select an exotic nodeId in order to avoid this.)