To detect idling on a Toyota RAV4, query the DIMO Telemetry API for segments using the idling detection mechanism. On a Toyota RAV4, both the DIMO LTE R1 (2007 and newer) and AutoPi (2009–2024) report engine RPM (powertrainCombustionEngineSpeed) and idling events. DIMO finds contiguous periods where engine RPM stays in the idle range, and this detection requires a DIMO device. See the Toyota RAV4 vehicle page for the full signal list. For any other vehicle, see how to detect vehicle idling.
DIMO gives developers API access to vehicle-state data: diagnostics, fault codes, battery and fuel health, odometer, and maintenance signals. Vehicle owners consent to and control sharing, so builders get data with clear provenance.
Steps
- Create a Developer License in the Developer Console and generate an API Key. You need your Client ID, Redirect URI and API Key.
- Get the RAV4 shared with your app. Owners grant access through DIMO Connect, and you need a shared vehicle before you can fetch a Vehicle JWT.
- Get a Developer JWT, then exchange it for a Vehicle JWT through the Token Exchange API for that vehicle's token ID. Request privilege 1 (all-time, non-location data) together with privilege 4 (all-time location). The
segmentsquery requires both of them. - Send the Vehicle JWT with each Telemetry API request as
Authorization: Bearer <Vehicle JWT>. - Query
segmentswithmechanism: idling, a time range of at most 31 days, and your RAV4's token ID. - Tune detection with
config.maxIdleRpmsets the upper RPM bound for idle (default 1000, min 300, max 3000).minSegmentDurationSecondsfilters short segments (default 240 seconds).signalCountThresholdsets how sensitive activity detection is. - Read
start,end,durationandisOngoingon each returned segment. UsesignalRequeststo ask for specific aggregates per segment, such asspeedwith a MAX aggregation. They are returned alongside a default signal set.
Code
This GraphQL query returns a week of idle segments and asks for the maximum speed in each one. Replace 12345 with your RAV4's token ID, set your own dates, and send your Vehicle JWT in the Authorization header.
query GetIdlingSegments {
segments(
tokenId: 12345
from: "2026-11-01T00:00:00Z"
to: "2026-11-08T00:00:00Z"
mechanism: idling
config: { maxIdleRpm: 1000, minSegmentDurationSeconds: 240 }
signalRequests: [
{ name: "speed", agg: MAX }
]
limit: 50
) {
start {
timestamp
value { latitude longitude }
}
end {
timestamp
value { latitude longitude }
}
duration
isOngoing
startedBeforeRange
signals { name agg value }
}
}
To run this against a real RAV4, create a Developer License in the Developer Console and then follow the authentication guide.
FAQ
Which RAV4 hardware supports idling detection?
The DIMO LTE R1 and AutoPi both report idling events and engine RPM on the Toyota RAV4. Idling detection requires a DIMO device.
What counts as idling?
An idling segment is a contiguous period where engine RPM remains in the idle range. You can adjust the upper bound with maxIdleRpm.
How far back can I query?
The segments query accepts a maximum date range of 31 days. Use limit and after to paginate results.
What does isOngoing mean?
It is true when the segment extends beyond your query time range. In that case end is not included in the response.
Methodology: based on the DIMO documentation for Authentication, Building Your First App, and the Telemetry API Vehicle Segments reference, together with the Toyota RAV4 vehicle page.