1

How to get Unit Last update date and time

(23/09/2020 12:58:42 отредактировано trushal.shah)

Тема: How to get Unit Last update date and time

Hello Team

How i can get the attached screenshot details from the item search API 

http://gps.tawasolmap.com/wialon/ajax.h … mp;params= {"id":20646,"flags":4611686018427387903}&sid=96d4c9e77d385ddf775f64d3c5dbd85b

As i have thought as per below please correct me if i am wrong

1) Name of the Unit                    items[0][nm]
2)Unit id                                      items[0][id]
3)Unit Latitude                            items[0][pos][x]
4)Unit Longtude                        items[0][pos][y]
) Speed of the Unit                     items[0][pos][s]
Date of last active
Engine status (On/Off)
Unit is in the parking or not
Last speed

How i can get from the above API if you

  • How to get Unit Last update date and time
2

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

1) Last data information (unit name, speed, position, date/time) you can get via request search item (or search items ) with correspodings flags value.

2) Engine status , moving/parking status you can get via Events - trips and igntion 
To get live events the steps are the following

  • Then execute request events/check_updates, for example every 2-5 sec, to get response with online data

For example

1. First (after login) it needs to add required units to session via request  svc=events/update_units

https://hst-api.wialon.com/wialon/ajax.html?svc=events/update_units&params={"mode":"add","units":[{"id":2147,"detect":{"ignition":0,"trips":0}},{"id":2174,"detect":{"ignition":0,"trips":0}}]}&sid=023078baa1999df1ea0da05cd4cbc9a02cb

"units" - units array where  'id' - unit's id, 'detect' - required events types, in our case only "ignition":0 and trips "trips":0, 0 means all ignition sensors, if you know that unit has only 1 ignition sensor, you can set up '0'.
If there is several ignition sensors it's better to set up sensor's id. But sure it depends on appropriate business task. For trips is always 0 ("trips":0).
It needs to specify for each units 'id' each 'detect' type.

2. After required units has been added to session, we can monitor online ingtion state via request events/check_updates which can be executed for example every 2 sec or rarely , it depends on how often the device sends data to the server

https://hst-api.wialon.com/wialon/ajax.html?svc=events/check_updates&params={"detalization":3}&sid=023078baa1999df1ea0da05cd4cbc9a02cb

"detalization":3  means that server will return  JSON information for flags plus

Diana Cheley
Wialon Hosting Expert
Gurtam
3

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Thanks for your support

as I got below response with once I follow the above steps 1 and 2 and below response I got

I got ignition and trip array,

how I can get value under the unit image "11s"
Date and time with speed
All the movement of the unit on the selected date


"20317": [
  {
    "ignition": {
      "1": {
        "from": {
          "t": 1601453651,
          "y": 26.5767269135,
          "x": 50.0240821838
        },
        "to": {
          "t": 1601454262,
          "y": 26.5540847778,
          "x": 50.021686554
        },
        "m": 1601454262,
        "f": 0,
        "state": 13.635,
        "type": 1,
        "hours": 821580,
        "switches": 505,
        "value": 13.635
      }
    }
  },
  {
    "trips": {
      "from": {
        "t": 1601453652,
        "y": 26.5767288208,
        "x": 50.0240821838
      },
      "to": {
        "t": 1601454262,
        "y": 26.5540847778,
        "x": 50.021686554
      },
      "m": 1601454262,
      "f": 0,
      "state": 1,
      "max_speed": 74,
      "curr_speed": 43,
      "avg_speed": 32,
      "distance": 5486,
      "odometer": 10899730,
      "course": 177,
      "altitude": 2
    }
  }

  • How to get Unit Last update date and time
4

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

You can get  "avg_speed" speed parameter, or "curr_speed": - current speed, parameter "m" shows the time of last message (Unix time UTC+0), the trip duration is calculated as difference between "from" and "to"

Diana Cheley
Wialon Hosting Expert
Gurtam
5

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Thanks for the solutions,

Last point that how I can get the movement of the units with start and [Between each] endpoint the day, or between dates

6

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

trushal.shah пишет:

Thanks for the solutions,

Last point that how I can get the movement of the units with start and [Between each] endpoint the day, or between dates

Hello!

To get history data of events (trips, ignition) you need to execute  events/load & events/get
First you load events for some period  - , then get  it
For example,

Get trips from Oct 1 - Oct 5 , unix time UTC+0

Load events

https://hst-api.wialon.com/wialon/ajax.html?svc=events/load&params={"ivalType":1,"itemId":214,"timeFrom":1601510400,"timeTo":1601942399,"detectors":[{"type":"trips","filter1":0}]}&sid=028384ac3f02f18c414208758685b320

Get result

https://hst-api.wialon.com/wialon/ajax.html?svc=events/get&params={"selector":{"type":"trips","timeFrom":1601510400,"timeTo":1601942399,"detalization":3}}&sid=028384ac3f028758685b320
Diana Cheley
Wialon Hosting Expert
Gurtam
7

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hi, thanks for the update

If you can please help me to set the direction of the unit as i can see in the wialon app on the map each unit icon have a different direction, I am using google map to display unit

8

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

trushal.shah пишет:

Hi, thanks for the update

If you can please help me to set the direction of the unit as i can see in the wialon app on the map each unit icon have a different direction, I am using google map to display unit

Good day!

To display direction we use the parameter course which device can send.
If your device type sends this parameter, you can get it from messages.
For example, pos: {y: 53.9058786, x: 27.4569481, c: 38, z: 302.700012207, s: 0, sc: 11}, where parameter 'c' is course , integer (from 0 to 359 degrees, where 0 - means North)

Diana Cheley
Wialon Hosting Expert
Gurtam
9

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hi, thanks for the update

If you can please help me how i can get the report pdf file of the units same wialon App

1) Which API we can integrate to get all template to belong to the account
2) which API should help me to execute the report of the unit and in response get a pdf file with details of the movement with address 

Please check I have attached two files

  • How to get Unit Last update date and time
  • How to get Unit Last update date and time
10

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

1) To get all reports created in account via request search items or
search item by ID  with flags = 8193 ( base flag + 8192 reports data)
2) To execute report - please look example  https://sdk.wialon.com/wiki/en/sidebar/ … es/reports
3) After report executed you can export it to file - please look the request format here https://sdk.wialon.com/wiki/en/sidebar/ … ort_result

Diana Cheley
Wialon Hosting Expert
Gurtam
11

How to get Unit Last update date and time

(19/10/2020 16:30:18 отредактировано trushal.shah)

Re: How to get Unit Last update date and time

Thanks for the reply

i do execute each but in the last export report getting an error

http://gps.tawasolmap.com/wialon/ajax.html?svc=core/search_items&params={"spec":{"itemsType":"avl_resource","propName":"sys_user_creator","propValueMask":"*","sortType":"sys_name","propType":"creatortree"},"force":1,"flags":8192,"from":0,"to":1000}}],"flags":0}&sid=17c6be7cb59c41cdf2996f20b18ac2b7

Got success

http://gps.tawasolmap.com/wialon/ajax.html?svc=report/exec_report&params={"reportResourceId":55874,"reportTemplateId":10,"reportObjectId":20646,"reportObjectSecId":0,"interval":{"from":1601449803,"to":1601877534,"flags":0}}&sid=17c6be7cb59c41cdf2996f20b18ac2b7

Got success

http://gps.tawasolmap.com/wialon/ajax.html?svc=report/export_result&params={"format":2,"pageOrientation":portrait,"pageSize":a4,"pageWidth":0,"coding":utf8,"delimiter":semicolon,"headings":0,"compress":1,"attachMap":0,"extendBounds":0,"hideMapBasis":0,"outputFileName":"Online_report"}&sid=17c6be7cb59c41cdf2996f20b18ac2b7

getting error in last API

{
    "error": 4,
    "reason": "WRONG_PARAMS"
}

12

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

There is not quotes for text parameters, like "pageOrientation":portrait, "coding":utf8 and etc.

the correct params

{"format":2,"pageOrientation":"portrait","pageSize":"a4","pageWidth":0,"coding":"utf8","delimiter":"semicolon","headings":0,"compress":1,"attachMap":0,"extendBounds":0,"hideMapBasis":0,"outputFileName":"Online_report"}
Diana Cheley
Wialon Hosting Expert
Gurtam
13

How to get Unit Last update date and time

(21/10/2020 13:40:35 отредактировано trushal.shah)

Re: How to get Unit Last update date and time

Hello Thanks for the reply


As its works but still that i need to display in a PDF file to the user

Three Query I have on the sensor value, Execute unit command and get unit notifications next its details 


1) Which field we should take value of sensor i got this sensor list in the search_item api same as below response

"sens": 
                "1": {
                    "id": 1,
                    "n": "حالة المحرك",
                    "t": "engine operation",
                    "d": "",
                    "m": "On/Off",
                    "p": "adc3",
                    "f": 0,
                    "c": 
                "3": {
                    "id": 3,
                    "n": "حساس كفاءة المحرك (wizard)",
                    "t": "engine efficiency",
                    "d": "",
                    "m": "",
                    "p": "time:d",
                    "f": 0,
                    "c": 
                
                "4": {
                    "id": 4,
                    "n": "حساس كفاءة المحرك (wizard)",
                    "t": "engine efficiency",
                    "d": "",
                    "m": "",
                    "p": "(speed+#speed)/const2",
                    "f": 0,
                    "c": 

               
Please check the screenshot which value we should use to be display


2) Also we are getting a

command list 

"cmds": [
                {
                    "n": "إطفاء المحرك",
                    "a": 1,
                    "t": "tcp,vrt",
                    "c": "custom_msg",
                    "p": "Out 0,0"
                },
                {
                    "n": "تشغيل المحرك",
                    "a": 1,
                    "t": "tcp,vrt",
                    "c": "custom_msg",
                    "p": "Out 0,1"
                },
                {
                    "n": "Arnavi 2",
                    "a": 1,
                    "t": "tcp,vrt",
                    "c": "custom_msg",
                    "p": ""
                }

               
How I can execute these commands for example if there is commands like Engine start, Engine Off


3) How to get notifications of the units and it details..

  • How to get Unit Last update date and time
  • How to get Unit Last update date and time
14

How to get Unit Last update date and time

(23/10/2020 10:51:09 отредактировано trushal.shah)

Re: How to get Unit Last update date and time

Hello Gurtam team

I stuck with at below APi request that my client request to  notification send to login user users as their engine is on, engine off, speed limit and geozone

How i can set notification with specific units


like
1)Unit engine is on and get mobile notifications

2)Unit engine is Off and get mobile notifications

3) Unit is running more then set speed

next is get all notification of the units same as current attached screenshots

http://gps.tawasolmap.com/wialon/ajax.html?svc=resource/get_notification_data&params={"itemId":55874,"col":]}&sid=c59a1d9fe2a4927c94d540dd190b6956
  • How to get Unit Last update date and time
  • How to get Unit Last update date and time
15

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

As I understand you need to create the following notifications with required parameters:

1) Control engine is on, action  - get mobile notifications
If unit has Engine Ignition sensor, you can create notification to control sensor by type = Engine Ignition Sensor ("engine operation")
Use the following parameters:

{"n":"example engine On","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[1326],"trg":{"t":"sensor_value","p":{"sensor_type":"engine operation","sensor_name_mask":"*","lower_bound":1,"upper_bound":1,"prev_msg_diff":0,"merge":1,"type":0}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1027]}"}}],"txt":" notification text","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":930849,"callMode":"update"}

2) Control engine is Off, action  - get mobile notifications
The same parameters as above, just change value range to 0 - "lower_bound":0,"upper_bound":0

3) Speed limit (the action as above)

{"n":"example1","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[826],"trg":{"t":"speed","p":{"sensor_type":"","sensor_name_mask":"","lower_bound":0,"upper_bound":0,"merge":0,"min_speed":0,"max_speed":60,"driver":0}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1427]}"}}],"txt":" notification text","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":849,"callMode":"update"}

where "min_speed":0,"max_speed":60 is allowed range.

4) Geofences control - in geofence ("type":0)

{"n":"example geo","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[1186],"trg":{"t":"geozone","p":{"sensor_type":"","sensor_name_mask":"","lower_bound":0,"upper_bound":0,"merge":0,"geozone_ids":"930849_40:1595402237","geozone_id":"930849_40:1595402237","type":0,"min_speed":0,"max_speed":0,"lo":"OR"}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1427]}"}}],"txt":"%UNIT% arrived to %ZONE%. At %POS_TIME% it moved with speed %SPEED% near '%LOCATION%'.","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":949,"callMode":"update"}

5) To get all notification with their params
Use the request resource/get_notification_data , the empty "col":"" returns all notifications

Diana Cheley
Wialon Hosting Expert
Gurtam
16

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello, Team Thanks for the Replay,

Before I call this API, Which API should i need to call to set that this login customer would get push notifications, like that

like Customer ABCD login with the application after authentication success, there are three Units associate with customer

1. BMW
2. Audi
3. Toyota

Now customers want to set a notification on each unit start. stop and speed that I will use your example API,

But my query is how that customer will get push notification in his Device- the phone  is there an API call for that to get notification

17

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello Team,


How to delete a group of units

like I have created a new unit group with API

http://gps.tawasolmap.com/wialon/ajax.html?svc=core/create_unit_group&params={"creatorId":58415,"name":"Reddd","dataFlags":1}&sid=75bb13461791e60dabe4ff590d8aee4

e

Add Unit in the group

http://gps.tawasolmap.com/wialon/ajax.html?svc=unit_group/update_units&params={"itemId":62282,"units":[2751,20646]}&sid=5c2ce8bcaa3a2222f14cea9665f770b7

Now i want to delete this group name Reddd, which APi should i use

18

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

trushal.shah пишет:

Hello, Team Thanks for the Replay,

Before I call this API, Which API should i need to call to set that this login customer would get push notifications, like that

like Customer ABCD login with the application after authentication success, there are three Units associate with customer

1. BMW
2. Audi
3. Toyota

Now customers want to set a notification on each unit start. stop and speed that I will use your example API,

But my query is how that customer will get push notification in his Device- the phone  is there an API call for that to get notification

If you can please help in this also that how Notifications would work, like steps

19

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello!

To send mobile notification (push-notification) there is not API, because the action is executed from back-end side in Wialon.
For this it needs to activate the corresponding action in notifications settings - Send mobile notification

or you can don't use the our functional, but realize something on your side.

Diana Cheley
Wialon Hosting Expert
Gurtam
20

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

trushal.shah пишет:

Hello Team,


How to delete a group of units

like I have created a new unit group with API

http://gps.tawasolmap.com/wialon/ajax.html?svc=core/create_unit_group&params={"creatorId":58415,"name":"Reddd","dataFlags":1}&sid=75bb13461791e60dabe4ff590d8aee4

e

Add Unit in the group

http://gps.tawasolmap.com/wialon/ajax.html?svc=unit_group/update_units&params={"itemId":62282,"units":[2751,20646]}&sid=5c2ce8bcaa3a2222f14cea9665f770b7

Now i want to delete this group name Reddd, which APi should i use

Just use the request svc=item/delete_item where itemId is id of group.

Diana Cheley
Wialon Hosting Expert
Gurtam
21

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

chdi

Thanks delete group works for me.. thanks

22

How to get Unit Last update date and time

(06/11/2020 13:03:27 отредактировано trushal.shah)

Re: How to get Unit Last update date and time

chdi пишет:

Hello!

As I understand you need to create the following notifications with required parameters:

1) Control engine is on, action  - get mobile notifications
If unit has Engine Ignition sensor, you can create notification to control sensor by type = Engine Ignition Sensor ("engine operation")
Use the following parameters:

{"n":"example engine On","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[1326],"trg":{"t":"sensor_value","p":{"sensor_type":"engine operation","sensor_name_mask":"*","lower_bound":1,"upper_bound":1,"prev_msg_diff":0,"merge":1,"type":0}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1027]}"}}],"txt":" notification text","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":930849,"callMode":"update"}

2) Control engine is Off, action  - get mobile notifications
The same parameters as above, just change value range to 0 - "lower_bound":0,"upper_bound":0

3) Speed limit (the action as above)

{"n":"example1","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[826],"trg":{"t":"speed","p":{"sensor_type":"","sensor_name_mask":"","lower_bound":0,"upper_bound":0,"merge":0,"min_speed":0,"max_speed":60,"driver":0}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1427]}"}}],"txt":" notification text","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":849,"callMode":"update"}

where "min_speed":0,"max_speed":60 is allowed range.

4) Geofences control - in geofence ("type":0)

{"n":"example geo","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[1186],"trg":{"t":"geozone","p":{"sensor_type":"","sensor_name_mask":"","lower_bound":0,"upper_bound":0,"merge":0,"geozone_ids":"930849_40:1595402237","geozone_id":"930849_40:1595402237","type":0,"min_speed":0,"max_speed":0,"lo":"OR"}},"d":"","act":[{"t":"mobile_apps","p":{"apps":"{\"Wialon\":[1427]}"}}],"txt":"%UNIT% arrived to %ZONE%. At %POS_TIME% it moved with speed %SPEED% near '%LOCATION%'.","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":28,"itemId":949,"callMode":"update"}

5) To get all notification with their params
Use the request resource/get_notification_data , the empty "col":"" returns all notifications



Push notification is not able to set as of with app, but as example I have set for the email and its works for the above example

for this simple text, i got a success message, but as i have set some dynamic as per that last example you have updated for the geozone same i have use for the engine status On 


http://gps.tawasolmap.com/wialon/ajax.html?svc=resource/update_notification&params={"n":"example engine On","ta":1603746000,"td":0,"tz":134228528,"la":"en","ma":0,"sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"ctrl_sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"un":[20646,55304,54533],"trg":{"t":"sensor_value","p":{"sensor_type":"engine operation","sensor_name_mask":"*","lower_bound":1,"upper_bound":1,"prev_msg_diff":0,"merge":1,"type":0}},"d":"","act":[{"t": "email","p":{"email_to":"trushal.shah@brainvire.com","html":1,"img_attach":1,"subj":"TawasolMap Notification"}}],"txt": "Name of the Unit %UNIT% . At %POS_TIME% near '%LOCATION%' Engine Status is ON","fl":0,"mast":0,"mpst":0,"cdt":0,"mmtd":3600,"cp":3600,"id":6,"itemId":55874,"callMode":"update"}&sid=662b6d5cd6dccfecc01266b7604690df

getting error

{
    "error": 4,
    "reason": "WRONG_PARAMS"
}

i have set below text from your last example

"txt": "Name of the Unit %UNIT% . At %POS_TIME% near '%LOCATION%' Engine Status is ON"

23

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello trushal.shah !

"txt": "Name of the Unit %UNIT% . At %POS_TIME% near '%LOCATION%' Engine Status is ON" - the special characters parameters, in this example %, should be URL-encoded - https://www.w3schools.com/tags/ref_urlencode.ASP
Please try to change % to  %25

PS. It's not advisable to provide sensitive real information like token, elements ID, session id. To check some your special case you can provide me this information via PM

Diana Cheley
Wialon Hosting Expert
Gurtam
24

How to get Unit Last update date and time

(09/11/2020 16:11:56 отредактировано trushal.shah)

Re: How to get Unit Last update date and time

Thanks for the update

Sure I will take care of this,

I just want to know  about engine status On/Off

Case1: Speed is greater then zero  then Engine is ON

Case 2" Speed is equal to zero then

Speed 0 then engine off but some time speed is zero but engine status looks ON in the wialon Application

so which field should i consider for the engine status

i have below details of ignition and trip


"20317": [
  {
    "ignition": {
      "1": {
        "from": {
          "t": 1601453651,
          "y": 26.5767269135,
          "x": 50.0240821838
        },
        "to": {
          "t": 1601454262,
          "y": 26.5540847778,
          "x": 50.021686554
        },
        "m": 1601454262,
        "f": 0,
        "state": 13.635,
        "type": 1,
        "hours": 821580,
        "switches": 505,
        "value": 13.635
      }
    }
  },
  {
    "trips": {
      "from": {
        "t": 1601453652,
        "y": 26.5767288208,
        "x": 50.0240821838
      },
      "to": {
        "t": 1601454262,
        "y": 26.5540847778,
        "x": 50.021686554
      },
      "m": 1601454262,
      "f": 0,
      "state": 1,
      "max_speed": 74,
      "curr_speed": 43,
      "avg_speed": 32,
      "distance": 5486,
      "odometer": 10899730,
      "course": 177,
      "altitude": 2
    }
  }
25

How to get Unit Last update date and time

Re: How to get Unit Last update date and time

Hello trushal.shah  !

You need to consider parameter "state"
"state" = 1 means ignition is ON when sensor is digital (so device sends 1 or 0 values, or ignition sensor has calculation table to get 1 or 0 values)
In your case I see the value  is , it means that Ignition is On (no zero value is ON also), but it's better to set up calculation table for sensor

Please note if we talk about history data (events/load/get) in this case the system always return intervals where Ignition is On ,parameter 'state' is not zero (like in report table Engine hours)

Diana Cheley
Wialon Hosting Expert
Gurtam