Asset tracking does not update device location in SAP IoT sapiot-23

Asset tracking stopped updating device locations for our mobile assets. We have 180 GPS-enabled trackers sending location data via MQTT every 2 minutes, but the asset management module shows stale location information from several days ago.

The MQTT topic for location updates (assets/+/location) is receiving data correctly based on broker logs. But when I check asset details in the asset management console, the location coordinates and last_updated timestamp don’t reflect recent GPS data.


Asset: mobile_tracker_047
Last Location Update: 2024-11-12T14:22:00Z
Current Coordinates: null
MQTT Topic: assets/mobile_tracker_047/location
Data Flow: Active (120 msgs/hour)

This is affecting our logistics operations since we can’t track asset movements. Has the asset tracking configuration changed in sapiot-23, or is there an MQTT topic mapping issue?

Check if your location data messages include the required fields for asset tracking. sapiot-23 expects latitude, longitude, and timestamp in specific field names. If your GPS devices use different field names (like lat/lon or gps_lat/gps_lon), the asset tracking service won’t recognize them and will ignore the updates.

Found the field mapping section and created a mapping rule. But I’m not seeing any change in the asset locations yet. Do I need to restart the asset tracking service, or is there a delay before the mapping takes effect? Also wondering if historical location data can be reprocessed with the new mapping.

Our GPS messages do use lat/lon field names instead of latitude/longitude. Is there a field mapping configuration where I can specify this, or do we need to change the device firmware to use the expected field names? Updating firmware on 180 mobile devices would be quite challenging.

Field mapping changes apply only to new incoming messages, not historical data. You don’t need to restart services, but there can be a 5-10 minute delay before the mapping is active due to configuration caching. For historical data reprocessing, you’d need to use the asset tracking reconciliation API to replay location messages through the new mapping rules.

I’ve implemented asset tracking for multiple large-scale deployments. Here’s the complete solution:

Asset Tracking Configuration: Configure the field mapping for your GPS data format in Asset Management → Tracking Configuration:

{
  "mapping_rules": [
    {
      "source_field": "lat",
      "target_field": "latitude",
      "data_type": "float"
    },
    {
      "source_field": "lon",
      "target_field": "longitude",
      "data_type": "float"
    },
    {
      "source_field": "ts",
      "target_field": "timestamp",
      "data_type": "datetime"
    }
  ]
}

MQTT Topic Subscription: Ensure the asset tracking service is subscribed to your location topics:


POST /asset/v1/tracking/subscriptions
{
  "topic_pattern": "assets/+/location",
  "message_format": "json",
  "field_mapping_id": "gps_field_mapping_001"
}

Location Data Validation: Your GPS messages must include these minimum fields after mapping:

{
  "latitude": 40.7128,
  "longitude": -74.0060,
  "timestamp": "2024-11-26T14:30:00Z",
  "accuracy_meters": 5.0
}

The accuracy_meters field is optional but recommended for filtering poor GPS signals.

Implementation steps:

  1. Create the field mapping configuration with your lat/lon to latitude/longitude translation
  2. Update the asset tracking subscription to reference your mapping configuration
  3. Clear the tracking service cache: POST /asset/v1/tracking/cache/clear
  4. Verify mapping is active: GET /asset/v1/tracking/mappings/gps_field_mapping_001/status
  5. Monitor incoming location updates: GET /asset/v1/tracking/diagnostics/update-rate

For your 180 mobile assets, the tracking service should process 360 location updates per minute (180 assets × 2 updates/minute). If the diagnostics show lower rates, there may be message validation failures.

To reprocess the stale location data from November 12-18:


POST /asset/v1/tracking/reconciliation
{
  "asset_group": "mobile_trackers",
  "date_range": {
    "start": "2024-11-12T00:00:00Z",
    "end": "2024-11-18T23:59:59Z"
  },
  "apply_field_mapping": true,
  "mapping_id": "gps_field_mapping_001"
}

This reconciliation API replays MQTT messages through the new field mapping, updating asset locations retroactively. Processing typically takes 2-3 minutes per day of historical data.

One additional recommendation: enable location validation to filter out invalid GPS coordinates (latitude outside ±90 or longitude outside ±180). This prevents tracking errors from GPS signal issues or device malfunctions.