Xirgo Global devices working over "xirgo-mqtt" protocol connect to the MQTT broker to send messages and receive commands. Below is a detailed manual on how to configure the physical Xirgo Global device and the flespi channel to make them interact properly.
Configuration on the device side
a) MQTT topic configuration. The MQTT topics defined on the device side determine where the corresponding data will be saved. You have to subscribe to a certain topic (see Configuration on the flespi side below) to receive the necessary information on your end.
b) MQTT session parameters. Basic parameters for telemetry data sending to broker and connection timeouts.
c) MQTT broker address. Destination address where the data will be sent (depends on the broker).
d) MQTT authorization parameters. You have to define Client ID, Username, and Password in order to successfully authorize with the broker.
Note: if using the flespi broker, populate the Username field with the valid flespi token and leave the Password field blank.
You can generate a valid flespi token with the required set of permissions in the Tokens section of the flespi panel:
Note: on the screenshot above we specified the minimal permissions necessary for correct device operation — permission to publish the data received by the device and permission to accept configuration commands sent to the device. You can extend these permissions at your discretion if necessary.
Configuration on the flespi side
To start receiving data from the Xirgo MQTT device, first, we need a valid token with proper access permissions (inverse to the ones given to the device — see above):
Flespi needs to be able to subscribe to the data updates from the device and needs to able to send (publish) commands to the device to change its configuration.
Then we create a channel of "xirgo-mqtt" type. The channel configuration should be as follows:
As you may have noticed, the topics in the flespi channel configuration and the Xirgo device configuration should be identical to ensure seamless operability.
Note: you only need a valid flespi token to configure the flespi MQTT broker (suggested by default); to stick to another broker, pick the "arbitrary broker" option from the MQTT broker drop-down and configure appropriately.
Then you can create a flespi device for each tracker sending the data to the "xirgo-mqtt" channel to benefit from dedicated long-term storage, access to telemetry, analytics, and more.
Module of accelerometer vector
Internal battery voltage
CAN airbag fired status
CAN check engine warning is on
CAN driver door is opened
CAN driver seatbelt indicator is on
Engine coolant temperature read from CAN
Total engine motorhours read from CAN
Engine RPM read from CAN
CAN ESP warning is on
Fuel volume totally consumed by vehicle read from CAN
Engine fuel rate read from CAN
CAN passenger door is opened
CAN passenger seatbelt indicator is on
CAN brake pedal pressed
CAN rear left door is opened
CAN rear right door is opened
CAN tire pressure warning is on
Total vehicle mileage read from CAN
Vehicle wheel based speed, read from CAN
ID of channel that received a message
ID of device that received a message
Name of device that received a message
ID of device type of device that received a message
Digital inputs bitmask
Digital outputs bitmask
Event code, full list of codes available at separate table
External power voltage
Value reported by fuel sensor
Geofence entered status
GSM base station ID
Alarm status for GSM jamming
GSM location area code
GSM mobile country code
Strength of GSM signal
Device unique identifier like serial number, IMEI, etc
Current movement state
External 1-Wire temperature sensor value
IP:port from which device connecting to the channel
Altitude value for position
Heading angle at position detection moment
Horizontal dilution of precision
Latitude coordinate value
Longitude coordinate value
Quantity of satellites used to calculate coordinates for given position information
Instant speed at position detection moment
ID of protocol
User-defined sensor boolean value
User-defined sensor float value
User-defined sensor string value
User-defined sensor uint32 value
User-defined sensor uint8 value
Timestamp when server received a message
Slot activity from tachograph
Total mileage calculated by tacho
Total calculated mileage