Device Configuration Application Behavior
Summary
This article explains how configuration changes are delivered and applied on LightMetrics devices, how applyImmediately affects trip behavior, and what operational impact Support should expect. The design ensures that each trip runs with a consistent configuration set.
Core Behavior
Trip-Based Configuration Consistency
From APK version 1.23.0 onward, configuration changes are downloaded during an active trip but are not applied until the device completes a safe lifecycle transition (boot or suspend). This prevents mid-trip configuration drift and ensures consistent trip data.
Configuration Delivery
- Primary: Push notification (near real-time delivery)
- Fallback: Polling every 24 hours (guaranteed delivery window)
Default Application Flow
Standard Mode (applyImmediately = false)
The device downloads and stores the latest configuration locally but continues the current trip using the existing configuration. The update is applied only after the trip ends and the device enters suspend or completes a power cycle.
The diagram illustrates this behavior: the configuration is changed in the backend during an active trip, fetched by the device, but not applied. After the trip ends and the device transitions through suspend, the next trip starts with the updated configuration.
Lifecycle Behavior
- Suspend enabled → Config applies after suspend → next trip
- Suspend disabled → Config applies on next boot
Immediate Application Flow
Immediate Mode (applyImmediately = true)
The current trip is terminated immediately and a new trip begins with the updated configuration.
[!warning] Immediate Apply Impact Enabling
applyImmediately = truerestarts the trip instantly, resets trip-level identifiers, and may result indriverIdbecoming UNASSIGNED depending on driver persistence configuration. GPIO-triggered behaviors may also occur due to trip restart.
Sample JSON Body for API Users
Full Example
{
"configuration": {
"light": {},
"medium": {},
"heavy": {},
"default": {}
},
"applyImmediately": true
}
Minimal Example
{
"configuration": {},
"applyImmediately": true
}
Behavior Summary
true→ Ends current trip, applies config immediatelyfalse→ Applies config on next trip
Limitations
Platform
- Fleet / Master Portal → Does not support immediate apply
API
- Package Change API → Does not support
applyImmediately
Version Notes
Version 1.24
MDVR configuration changes trigger trip restart instead of app restart
Version 1.24.5
MDVR-related actions (package add/toggle) trigger trip restart instead of app restart
Decision Guidance
Use Immediate Apply When
- Immediate enforcement is required
- Trip interruption is acceptable
Use Default Mode When
- Trip continuity is required
- No disruption to field operations is desired
Operational Notes
- Configurations are always downloaded before application
- Max delay for delivery is 24 hours
- Each trip runs with a single configuration snapshot
Attribution
LightMetrics https://lightmetrics.freshdesk.com/support/solutions/articles/61000317212