A Wialon integrator was asked something that sounds trivial: who was using this vehicle before the device went offline?
The customer wanted more than a name. One table, one row per unit, with:
- the unit’s last known address
- the state of ten sensors at that moment
- the date of the last message
- the last driver, plus that driver’s license number, personnel number, phone and RFID code
Wialon stores all of it. The work is that these fields live in different places, and pulling them into a single row is the part that takes a day.
Here are the three routes the integrator took, in the order they took them.
1. Reports and Excel
The first attempt used stock Wialon only:
- Last-message report over all units, for position, address and time of the last message.
- A second report for the sensors. Last-message values for custom sensors are missing from the first report, so a geofence-based report was used instead, because that one can output custom sensor values. Getting the non-custom sensors to appear meant duplicating each of them as a custom sensor first.
- The report execution time limit. The fleet was too large to render in one pass, so the reports had to run as scheduled tasks, with the units split into groups.
- Collect the Excel files from email, one per group, and paste them into a single workbook.
- VLOOKUP the sheets together to join each unit’s last message to its sensor values.
- Export the drivers separately. The report gives the driver’s name and nothing else. License number, personnel number, phone and RFID live in driver custom fields, so that is a second join.
- Normalize the driver data with a ChatGPT-built formula, because the custom fields were not filled in consistently.
- Fix the leftovers by hand, since the formula did not catch every case.
The result was correct. It also took most of a working day, and it is a snapshot: asking the same question next week means running the whole chain again. The data was all there. It just was not in one place.
2. FleetTAB Assets
The second route replaced all eight steps with one screen.
FleetTAB is a free application in the Wialon marketplace. Its Assets tab shows each unit’s last message together with the driver assigned at that moment and that driver’s full record (license number, personnel number, phone, RFID code), next to the address, the counters, and the latest valid value of every sensor on the unit.
The job was: log in, open Assets, switch on the columns the customer asked for, export. Two minutes. Running it again next week is another two minutes. The view itself is covered in Wialon Fleet in One Table.
Where the last value is not enough
The customer passed the export to their own client, and got a fair objection back.
Sometimes the last driver is not the driver you want. If a driver was unassigned from the unit with a workshop key before the device stopped reporting, the last assignment points at the workshop rather than at the person who had been using the vehicle. The snapshot is accurate and still answers the wrong question.
Good enough for most of the fleet, then, but not for the units that mattered.
3. A year of history in SQL
For those units the integrator came to Asset Track, and we connected FleetSQL.
We pulled a year of unit data and the full driver list with custom fields, then wrote one query. It returned the same table as before, plus something the reporting module cannot produce: the last ten drivers of every unit, in order, each with their complete record.
Instead of who held the assignment at the final message, you can see who had the vehicle through the whole run-up to it, including anyone swapped out before it went quiet.
What the history showed
Read side by side, the sequences had a pattern in them. A small group of drivers kept appearing in the last positions before a unit stopped reporting.
The operator pulled the camera footage for those vehicles, confirmed that the devices were being tampered with, and acted on it. The fleet’s hardware reliability problem was not a hardware problem.
Choosing a route
All three answer the question. They differ in what they cost and in what they can see.
- Reports and Excel need nothing but Wialon, and make sense for a one-off on a small fleet. Budget a day, and budget it again next time.
- FleetTAB Assets answers the plain version in minutes, with the driver record already joined, and it is repeatable. It shows current state, so use it when current state is the answer.
- FleetSQL is for history rather than a snapshot: the last N drivers, patterns across a year, questions the reporting module was never meant to express.
It is worth starting at the top of that list. Plenty of Wialon questions that look like a data project are already a column in a table somewhere, so check that before reaching for SQL.
Have a question like this one?
If a Wialon question of yours keeps turning into a spreadsheet, send us a note. If it belongs in FleetTAB, we will build it in. If it needs history, we will show you what it looks like in SQL.