Fuel Theft Alarm
GpsGate can help you to detect possible fuel theft, loss or leakage by using a script in your event rules. You can set up alerts when a significant loss of fuel is detected in your vehicles.
- A tracker with fuel level capabilities (check here for compatible devices by searching by the keyword fuel).
- Script Expressions enabled.
- The Fuel device signal (input) mapped to the variable Fuel level in the Device Mapper
1. Import Fuel Theft Alert script.xml file.
2. Execute the EV1000 report for getting historical results.
Optional: add Ignition
You can add an extra variable to ensure that fuel level script triggers on certain conditions. For example, you can edit the fuel theft script and combine it with the Ignition signal. When Ignition = Off (if available), you can ensure that you'll only get alerts when the device is parked and not when moving.
How it works
The script saves 8 consecutive fuel level measures and calculates the mean for the first 4 values and also the mean of the last 4 values.
If the difference is larger than the threshold specified, it would indicate abnormal fuel consumption.
By default, the script has a threshold of 3 (the difference between both means in liters). This value can be modified according to the fuel level signal inputs you receive from your device (liters/gallons). If you receive the fuel level input in voltage check this guide to convert that to liters.
Configure the event rule notifications
By default, the rule triggers 3 notifications. You can customize all these 3 notifications by editing the imported event rule.
- Icon on the Vehicle panel
Right-click on the vehicle panel and add the fuel theft column, then save the workspace.
- Report Argument
If you have fuel theft events, when executing the EV1000 report, select the Fuel Theft Alert script event rule in the report parameters to see the results.
Choose which users will receive SMS notifications in the Recipients field in the event rule. Make sure the user group you select contains users with mobile phone numbers.
For testing, you could use the script editor and select track point values to see the script outcome.
It's also possible to test the script using our device simulator.
When submitting Fuel Level values to your application, if the fuel consumption surpasses the threshold, you should get an alert as shown in the picture:
The event rule will react to those track points sent with the simulator to mimic a real-life situation.
Note: These calculations rely on the values sent from the device. This method cannot assure 100% that you are actually getting fuel theft. There could be another cause for the alarm being triggered: fuel leakage, bad readings from the fuel sensor, wrong threshold value, etc. The more accurate the values you receive, the more efficient the script will be.