How to add position coordinates resolved by Wialon LBS geocoding into the message?

Using plugins to resolve the coordinates of GSM base stations into position coordinates using Wialon LBS geocoding and add them into the device messages.

The "wialon-lbs-geocoding" plugin type is used to apply Wialon LBS service functionality to resolve the coordinates of GSM base stations into position coordinates. This may be helpful if for some reason GPS data is unavailable.

Click on the "+" button in the Telematics Hub -> Plugins section to create a new plugin:

flespi panel telematics hub plugins

Let's define a new plugin to resolve coordinates into addresses:

add wialon lbs geocoding plugin

We recommend putting into validate_message field next value: $position.latitude == 0 || $position.longitude == 0 || $position.valid == false. This filter will activate the plugin only for messages that do not contain valid coordinates or which coordinates are invalid.

Cool feature! You can set up the plugin to automatically put the LBS data into position.latitude and position.longitude parameters if the GNSS data is not available — just enable the option in the configuration.

Then we need to assign this plugin to the right devices. Go to the Plugins tab for the required device and click the "+" button:

assign wialon lbs geocoding plugin

And then you should be able to see the position.lbs.latitude and position.lbs.longitude fields in the new device messages. Go to the Logs & Messages tab for the given device to check:

check that position parameters added by wialon lbs plugin

Done.

Performance and stability considerations

  • The use of plugins may result in slower messages registration in the flespi platform since it is preceded by requests to the third-party system.
  • We cannot guarantee the performance or stability of the third-party systems involved in the process — in case of their service interruptions, flespi will not be able to save messages to devices and will respond with negative ACK and will also terminate the connection if the required flag is set.

Change log

Subscribe to the Wialon LBS geocoding plugin change log to stay in sync with any updates.

More plugin types

Find a comprehensive list of available plugins types here.


See also
Explore the pros and cons of various reverse geocoding services supported by flespi.