custom temperature report using the api

Topic: custom temperature report using the api


We have a situation where we need to generate a report, that can't be done from the Wialon reports system. It is for a client who makes cold transportation and his customers ask for a specific type of report, which must contain the following columns for a specific interval:

Total number of measurements
Average temperature
Number of measurements for custom temperature ranges (for example how many measurements were made for temp range between 5 and 10 degrees)
Percentage of custom temperature ranges

For the moment i have just a "Sensor tracing" template made in Wialon,  from which i can extract the data, but i need a hint on how to generate it and how to get data from specific columns and put them into JSON arrays using the API.



custom temperature report using the api

(edited by kaippally 10/09/2017 16:21:24)

Re: custom temperature report using the api

1) Load the web form http://hosting.wialon.com/login.html
2) Enter your user login and password, press "login"
3) If authorisation was ok, in the web address field you will get the response with the token like


access_token=5bbfe4a4ad20f61f466ae093aeb811d3BB4432702CE8BC771547D35F32E0A0E64FAE40B6- this will be your token

The default token has several limitations, you can extand its access rights if you add the Additional parameters in the request from the specification https://weblog.gurtam.com/wp-content/up … hod_EN.pdf

4) After you get the token, you will be able to login under it.


For all subsequent queries you will use the eid from the login response as the sid (Session Id)
5) In order to query report you will need to know the Resource ID and report Template ID .

So query available resources .

https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items&params={"spec": {
                    "itemsType": "avl_resource",
                    "propName": "sys_name",
                    "propValueMask": "*",
                    "sortType": "sys_name"
                "force": 1,
                "flags": "8193",
                "from": 0,
                "to": 0

Once you get the resource and report template make a query


The result will have the total number of rows available

Now query for all the rows.

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."

custom temperature report using the api

Re: custom temperature report using the api

As i check to get all unit with its position i need details of the unit same as current wialon application have in their unit info and history page

i use APi

https://gps.tawasolmap.com/wialon/ajax. … p;params={

what would be field that i need to use for the below perimeters https://sdk.wialon.com/wiki/en/local/re … ormat/unit

Unit Name items[0][nm]
Unit id items[0][id]
Unit Latitude    items[0][pos][x]
Unit Longtude    items[0][pos][y]
Speed of the car items[0][pos][s]
Engine  status
In parking or driawing
Address of the unit
image for  the unit
Engine time of the unit

which are the field says for the remain filels