This guide describes how to configure units for automatic toll payment via Toll BG in Bulgaria. The configuration process consists of the following stages:
- registering in the Toll BG system;
- creating a channel on flespi;
- creating a retranslator in Wialon;
- creating a device on flespi;
- configuring a plugin on flespi;
- configuring a stream on flespi.
After completing all the stages, unit messages are retransmitted from Wialon to the flespi backend platform which adds the data required for payment to them. After that, the messages are forwarded from flespi to the Toll BG system.
Registering in the Toll BG system
To register in the Toll BG system, follow these steps:
- Register on the tollbg.eu website (the Request service button).
- Receive authentication credentials and indicate the plate numbers of the vehicles for which you want to configure automatic toll payment.
- Specify https://flespi.io/gw/hooks/toll_health as the endpoint to which the system should send a request to perform a health check on the flespi platform.
Creating a channel on flespi
In order for the flespi platform to receive the unit messages retransmitted from Wialon, you should create a channel on it. To do this, follow these steps:
1. Register in the telematics hub.
2. Open the Channels tab.
3. Click on the button in the lower-right corner of the screen.
4. In the name field, specify the channel name.
5. Activate the messages_ttl option and select Without TTL in the drop-down list.
6. In the protocol_id field, indicate wialon_retranslator.
7. Click Save.
8. Copy the host and port of the created channel by clicking on the icon .
Creating a retranslator in Wialon
In order for unit messages to be retransmitted from Wialon to the flespi platform, you should create a retranslator in Wialon. To do this, follow these steps:
1. In the management system, open the Retranslators tab.
2. Click Create retranslator.
3. Specify the name of the retranstlator.
4. Select Wialon Retranslator as a retranslation protocol.
5. Specify the server address (host) and port of the flespi channel in the Server and Port fields, respectively.
6. Using the arrow icon, move the units for which you want to configure automatic toll payment from the All units list to the Units for retranslation list.
7. Click OK.
8. Refresh the page and start the retranslator.
9. On the flespi platform, click on the channel card and make sure that at least one connection is established and unit messages are displayed on the Toolbox tab.
You cannot change the unique ID of the units for retranslation.
Creating a device on flespi
For each unit the messages of which should be forwarded to the Toll BG system, you should create a device on the flespi platform. To do this, follow these steps:
1. In the telematics hub, open the Devices tab.
2. Click on the button in the lower-right corner of the screen.
3. Select a device with a capability to store messages (Device with messages storing) or without it (Device without messages storing).
4. Enable the Device name option and specify the device name.
5. In the Device type field, specify the device type of your unit.
6. In the Device configuration section, specify the unique ID (Device identifier) of the unit. For some device types, you can also specify the password, phone number, etc.
7. If you have selected a device with the capability to store messages in step 3, specify their storage period (Messages TTL) and size (Messages rotation size).
8. Click Save.
Configuring a plugin on flespi
To add the data required for the Toll BG system to the unit messages, you should create a plugin on the flespi platform and activate if for the devices of the units. To do this, follow these steps:
1. In the telematics hub, open the Plugins tab.
2. Click on the button in the lower-right corner of the screen.
3. Click Plugin templates and select the tollbg template.
4. Click Save.
5. Go tho the Devices tab.
6. Click on the card of the device the messages of which should be forwarded to the Toll BG system.
7. Open the Plugins tab.
8. Click on the button in the lower-right corner of the screen.
9. In the drop-down list, select the tollbg plugin.
10. Enable the Axles count and specify the number of axle revolutions (optional).
11. In the Plate number field, specify the plate number of the vehicle.
12. Enable the Pan number option and enter the PAN number received when registering in the Toll BG system.
13. Enable the Weight option and specify the vehicle weight (optional).
14. Click Save.
Configuring a stream on flespi
In order for the unit messages with the added data to be forwarded from the flespi platform to the Toll BG system, you should create a stream on flespi and assign the devices to it. To do this, follow these steps:
1. In the telematics hub, open the Streams tab.
2. Click on the button in the lower-right corner of the screen.
3. Activate the name option and specify the stream name.
4. Activate the queue_ttl option and specify the period within which unsent messages should be stored when the Toll BG system is unavailable. After the specified period expires, these messages are not forwarded. If messages should be sent only in real time, select Queue with realtime delivery only in the drop-down list. By default, the storage period of unsent messages is one day.
5. In the protocol_id field, indicate tollbg.
6. In the configuration section, enter your Toll BG username and password.
7. Click Save.
8. Click on the stream card.
9. Open the Devices tab.
10. Click on the button in the lower-right corner of the screen.
11. Select the devices that should be assigned to the stream. To assign all of them at once, click on the icon .
12. Go to the Toolbox tab and monitor the messages sent to the Toll BG system.