-
AuthorPosts
-
-
September 17, 2020 at 12:52 pm #10728Michel CastañoKeymaster
When using Syrus devices Trips separation is usually configured from unit’s configuration with XATT command and from Organization – Devices – Trips (Please check a forum of how to configure trip’s algorithm from Syrus here)
But when No-Syrus units are being used, or when it is just preferred to delegate the trips partition to Pegasus instead Syrus devices, the following method can be followed:
1. Create a token in Pegasus. (Instructions here)
2. Do a POST to
/vehicles/:vid/remote/segment_setup
With the following info:
vid Vehicle id
method Partition method. Allowed values: tracker, gps, ignition
mode 0, 1, or 2 when using tracker method, 0: uses motion | 1: uses ignition and motion | 2: uses ignition, leave null for other methods. Allowed values: null, 0, 1, 2
partition Partition timeout in seconds to end segment, leave null for other methods
distance Distance threshold in meters to start a segment, leave null for other methodsSo, for the purpose of this blog we should select either
Ignition
orgps
Example. Make Pegasus separate trips of a vehicle by ignition:
POST https://pegasus1.pegasusgateway.com/api/vehicles/1618/remote/segment_setup
headers:
Content-Type application/json
Authenticate 72c581a30d876c77ba89be644933cxxxxxdfad60184fd394b816d60d
Body
{
"method":"ignition",
"mode": null,
"partition": null,
"distance": null
}Remember that always you need to consult the current configuration of trip partition you can send a GET like this, specifying the device to be consulted:
https://pegasus1.pegasusgateway.com/api/devices/867698040023056?select=trip_setup
-
-
AuthorPosts
- You must be logged in to reply to this topic.