Avtale om digitale tjenester - ADT 4.x

Ruters digitale plattform

This specification contains interfaces to be used between PTOs (operators) and Ruter. The API describes a set of MQTT topics which are used to distribute data onboard public transport vehicles/vessels as well as between the vehicle/vessel and Ruter’s Back Office or vv.

General information

Upgrades to the API

The API follows the upgrade cycles of ADT. Major releases are done more or less once a year and usually include breaking changes.

Minor/build releases are performed as continual deliveries and are non-breaking. New versions of this document will be published when new topics and/or fields are added.

Consumer Client Requirements

Clients consuming information posted on the topics must be tolerant to:

  • That optional properties can be null or left out.
  • That arrays can contain any number of elements including zero.
  • That returned data can be extended with new properties without notice.

Quality of Service, Retained Flag and Persistence

Generally, QoS level 1 is applied for most topics and the retain flag is true for most topics. See the respective topic for precise info.

Subscribers should start with Clean Session set to True to assure that they get the latest information at reconnection (the retained info) and avoid first having to process a long queue of outdated old information that in reality hinders new relevant information to reach the subscriber.

Translation of topic names

Global topic names are generally written on the format of {recipient}/{sender}/{vehicleid}/{topic} to make it easy to identify the source and destination of the messages. Local topic names have omitted the {recipient}/{sender}/{vehicleid} part in order to have onboard equipment pre-configured with vehicle independent settings.

All topic names must thus be rewritten local/global in the MQTT bridge according to a provided configuration file.

Data format

All data must be JSON and UTF-8 encoded.

Overview

The diagram below shows an overview of the most important messages that manage the assignment and journey of a vehicle.

Overview of important messages

  1. The vehicle signs on
  2. Ruter sends a response with the status of the signon
  3. Based on the location of the vehicle, Ruter calculates which journey in the assignment the vehicle is on, which stop it is going to next, etc.
  4. If the position matches a journey in the assignmment, Ruter sends a journey message to the vehicle,
  5. ...and Ruter changes external display

More info

For more information, please go to: Ruter’s ADT agreement.

Comments or suggestions

Please open an issue here: ADT-DOC Issues

Servers

  • mqtt.transhub.iomqttmqtt.transhub.io

    Ruters central MQTT broker

    port
    required
    string

    The mqtt broker is available through TCP (:8883) and Websockets (:9883)

    Default value:"8883"
      Allowed values:
    • "8883"
    • "9883"
    Security:

Operations

  • SUB di/available_destination_displays

    Available Destination Displays Message

    Field Value
    Central Topic {operatorId}/{authorityId}/backoffice/adt/v4/di/available_destination_displays
    Schema available-destination-displays.json
    Maintainer Assignment
    Producer Assignment
    Consumer PTO
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Provides a list of available destination displays. The list should be used for external displays, in case the vehicle has lost connection to the backoffice.

    Note that the list of available destination displays is no longer available per vehicle. The topic structure includes backoffice at the vehicleId position. This is an effort to reduce the amount of data stored on the broker

    Accepts the following message:

    AvailableDestinationDisplays
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/di/available-destination-displays/available-destination-displays.json

    Examples

  • PUB di/override_attempt/destination_display

    Destination Display Override Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/di/override_attempt/destination_display
    Schema destination-display-override.json
    Maintainer Assignment
    Producer PTO
    Consumer Assignment
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    To construct a message, refer to the Available Destination Displays Message list and ensure that all fields provided in the list are included in the message.

    If an entry contains publicCode, destination, and alternativeMessage, all three fields must be included exactly as specified in the list. The only additional fields you need to provide are a current eventTimestamp and a unique traceId.

    Accepts the following message:

    DestinationDisplayOverride
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/di/override_attempt/destination_display/destination-display-override.json

    Describes a request from MADT or other GUI to manually override the information shown on the destination display. It is up to the presenting system to decide how and for how long the override will apply. A rule could be until next journey begins or a new override_attempt/destination_display is received. The topic could be blanked (provided with a zero-byte payload) to indicate that any overriding information is no longer valid and that the destination display can return to normal

    Examples

  • PUB pe/active_cab

    ActiveCab Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/active_cab
    Schema active-cab.json
    Maintainer DPI
    Producer PTO
    Consumer DPI, Progress
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Accepts the following message:

    ActiveCab
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/active-cab/active-cab.json

    Used to keep track of what direction the train is driving

    Examples

  • SUB pe/audio

    Audio Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/audio
    Schema audio.json
    Maintainer DPI
    Producer DPI
    Consumer PTO
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    The topic used for transmitting these audio messages is dedicated exclusively to audio playback through the vehicle's speaker system. The audio messages may contain an array of sound clips that should be played sequentially as they were received.

    In some cases, multiple speaker groups may be targeted by the same audio message.

    Audio Message Playback

    • When a vehicle receives an MQTT message containing audio content, the PTO must play the audio, which can be in either OPUS or MP3 format.
    • If the message defines an expiration timestamp that has passed, the audio content must not be played.
    • If a message contains multiple audio files, these must be played in the order in which they appear in the message.
    • MQTT messages with audio content must be processed synchronously, ensuring that new messages are only played after the previous one has finished.

    Accepts the following message:

    Audio
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/audio/audio.json

    This topic provides an audio message intended for passengers onboard the vehicle that should be played on speaker(s) defined in the speaker property of the payload.

    Examples

  • PUB pe/cardreader_diagnostics/vix/{deviceRef}

    VIX Card Reader Diagnostics MQTT Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/cardreader_diagnostics/vix/{deviceRef}
    Schema vix-cardreader_diagnostics.json
    Maintainer Betjent salg
    Producer VIX
    Consumer PTA
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Diagnostics message sent from any Vix-validator running Ruter-firmware in the vehicle. Can be used by both PTA and PTO to monitor the operational status of these units.

    deviceRef
    required
    string
    uid: deviceRef

    An unique ID of the unit.

    Accepts the following message:

    VixCardreaderDiagnostics
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/cardreader-diagnostics/vix/vix-cardreader_diagnostics.json

    Examples

  • PUB pe/door_lock

    DoorLock Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/door_lock
    Schema door-lock.json
    Maintainer DPI
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    This message is used to track if the vehicle doors are locked or unlocked.

    Frequency: on change

    Accepts the following message:

    DoorLock
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/door-lock/door-lock.json

    Door lock event

    Examples

  • PUB pe/doors_individually

    DoorsIndividually Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/doors_individually
    Schema doors-individually.json
    Maintainer Passasjertelling
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    This topic is used to track the individual status of doors. One use case is to improve the data quality of APC counts. See also topic sensors/door for status of anyDoorOpen/allDoorsClosed.

    Accepts the following message:

    DoorsIndividually
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/doors-individually/doors-individually.json

    This object is used to represent a door individually.

    Examples

  • PUB pe/dpi/ack

    Acknowledge Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/ack
    Schema dpi-acknowledge.json
    Maintainer DPI
    Producer PTO, DPI
    Consumer DPI
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    The DPI Ack topic is used to inform the PTA Backoffice about the correct transfer and interpretation of messages to the vehicle.

    PTA shall receive an acknowledgment message for the following topics:

    Topic Responsible for producing ack
    External display messages PTO
    Audio messages PTO
    Journey messages DPI application
    NextStop messages DPI application

    The ack message should be produced as soon as the message is received and validated. This is a confirmation that the system on board the vehicle have received the data and is capable of acting on it.

    No confirmation message should be returned if the system is unable to playback the content. (e.g. invalid message format)

    Accepts the following message:

    DpiAcknowledge
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/ack/dpi-acknowledge.json

    The DPI Ack topic.

    Examples

  • SUB pe/dpi/arriving

    Arriving Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/arriving
    Schema dpi-arriving.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Notice to passengers that the bus is approaching a stop.

    Accepts the following message:

    DpiArriving
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/arriving/dpi-arriving.json

    For display of arriving information to passengers

    Examples

  • SUB pe/dpi/command

    Command Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/command
    Schema dpi-command.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    This channels is reserved for command and control messages originated by the PTA. Typical use cases include:

    • Diagnostics / debugging
      • Trigger transfer of debug information
      • Trigger screenshot of DPI screen
      • Trigger clearing of cache and refresh of webpage
    • Content
      • Trigger display of campaign

    The payload is defined as an object with no structure to provide flexibility.

    Accepts the following message:

    DpiCommand
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/command/dpi-command.json

    Message sent to bus to control DPI functions

    Examples

  • PUB pe/dpi/command_response

    Command response message

    Responses generated from requests sent on /pe/dpi/command

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/command_response
    Schema dpi-command_response.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    This API is reserved for command and control messages for debugging purposes of DPI client.

    Accepts the following message:

    DpiCommandResponse
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/command_response/dpi-command_response.json

    Message sent from vehicle as response to DPI commands

    Examples

  • PUB pe/dpi/connection_status

    Connection Status Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/connection_status
    Schema dpi-connection-status.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Connection messages sent when the DPI client connects and disconnects from the MQTT broker. It is used to monitor the connection status of the DPI client and detect screens where the browser may be in restart loop.

    Accepts the following message:

    DpiConnectionStatus
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/connection_status/dpi-connection-status.json

    DPI Connection status topic

    Examples

  • SUB pe/dpi/connections

    Connections Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/connections
    Schema dpi-connections.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    List of connections for the remaining stops on a journey with expected departures.

    Accepts the following message:

    DpiConnections
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/connections/dpi-connections.json

    This schema defines the connection message sent as an MQTT message to buses

    Examples

  • PUB pe/dpi/diagnostics

    Diagnostics Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/diagnostics
    Schema dpi-diagnostics.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Report to PTA BO about a screen.

    The DPI application itself produces diagnostic messages. The payload is defined as an object with no pre-defined structure to provide flexibility.

    Accepts the following message:

    DpiDiagnostics
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/diagnostics/dpi-diagnostics.json

    Examples

  • PUB pe/dpi/display_status

    DPI Display Status

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/display_status
    Schema dpi-display-status.json
    Maintainer DPI
    Producer DPI
    Consumer PTO, DPI
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    The DPI Display status topic is used to inform the Ruter BO about the current state (Tilstandsmelding) for DPI.

    This messages is produced every fifth minute and every time a message is received on pe/dpi/journey and used in SLA measurement.

    Accepts the following message:

    DpiDisplayStatus
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/display_status/dpi-display-status.json

    DPI Display status topic

    Examples

  • SUB pe/dpi/eta

    Eta Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/eta
    Schema dpi-eta.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Estimated arrival at the remaining stops.

    Accepts the following message:

    DpiEta
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/eta/dpi-eta.json

    Estimated time of arrival for future stops on a journey

    Examples

  • SUB pe/dpi/externaldisplay

    Externaldisplay Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/externaldisplay
    Schema dpi-externaldisplay.json
    Maintainer DPI
    Producer DPI
    Consumer PTO
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Message to be shown on the external destination display. Usually line number (publicCode) and routeName, with support for alternative message.

    Accepts the following message:

    DpiExternaldisplay
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/externaldisplay/dpi-externaldisplay.json

    Notification that the external displays should show new destination information

    Examples

  • SUB pe/dpi/feature_toggle

    Feature Toggle Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/feature_toggle
    Schema dpi-feature-toggle.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Message with all active and inactive features.

    Accepts the following message:

    DpiFeatureToggle
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/feature_toggle/dpi-feature-toggle.json

    Message sent to vehicle to feature toggle DPI functions

    Examples

  • SUB pe/dpi/journey

    Journey Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/journey
    Schema dpi-journey.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Message containing the stops included in the journey, connections to other lines, positions ++.

    Accepts the following message:

    DpiJourney
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/journey/dpi-journey.json

    List of stops for current journey in block

    Examples

  • SUB pe/dpi/key_stops

    Key Stops Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/key_stops
    Schema dpi-key_stops.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    List of X number of most trafficked stops in the rest of the journey. Based on predicted number of passengers leaving on each stop

    Accepts the following message:

    DpiKeyStops
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/key_stops/dpi-key_stops.json

    This schema defines the Key Stops message sent as an MQTT message to vehicles

    Examples

  • PUB pe/dpi/logs

    Command Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/dpi/logs
    Schema dpi-logs.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Logs from the DPI client are published to this topic. The payload includes the log level and message, and may include a stack trace when available.

    Accepts the following message:

    DpiLogs
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/logs/dpi-logs.json

    Logs from the DPI client

    Examples

  • SUB pe/dpi/nextstop

    Nextstop Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/nextstop
    Schema dpi-nextstop.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Next stop on the buss route after leaving a stop.

    Accepts the following message:

    DpiNextstop
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/nextstop/dpi-nextstop.json

    Notification that vehicle has a new next stop

    Examples

  • SUB pe/dpi/pa

    Pa Message

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/dpi/pa
    Schema dpi-pa.json
    Maintainer DPI
    Producer DPI
    Consumer DPI
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Message to be shown on internal displays. May contain references to videos, html, images, text etc.

    Accepts the following message:

    DpiPa
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/pa/dpi-pa.json

    Examples

  • SUB pe/input/stop_button

    Remote Stop Button Message

    Field Value
    Central Topic {operatorId}/ruter/{vehicleId}/adt/v3/pe/input/stop_button
    Schema stop-button.json
    Producer Ruter DPI
    Consumer PTO
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    This message should be interpreted as if the stop button, accessibility button or the stop was served by the vehicle.

    A corresponding message should be produced on /sensors/stop_button as normal, confirming that the stop signal lights was lit and the vehicle actually served the stop.

    Frequency: on change

    Accepts the following message:

    Stop Button Message
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/stop-button/stop-button.json

    Describes if passengers have requested that the bus should stop (stop button pressed).

    Examples

  • SUB pe/sales/current_stop

    RuterSalg current_stop

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/sales/current_stop
    Schema sales-current_stop.json
    Maintainer Betjent salg
    Producer Betjent salg
    Consumer Betjent salg
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Used to alert the RuterSalg app about the current stop. This message is triggered when the Progress entity determines that the bus is arriving at the quay, meaning it is maximum 35 meters from the quay, approaching it. Contains information about the zone the current stop belongs to.

    The message also contains information about the NEXT stop and its zone. This is used to determine if the bus is approaching a zone border. One use for this is whether or not to sell a "smart ticket" if the passenger has funds in their travel purse.

    Accepts the following message:

    SalesCurrentStop
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/sales/current_stop/sales-current_stop.json

    Examples

  • PUB pe/sales/diagnostics

    RuterSalg diagnostics

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/sales/diagnostics
    Schema sales-diagnostics.json
    Maintainer Betjent salg
    Producer Betjent salg
    Consumer Betjent salg
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Diagnostics message generated by Betjent Salg.

    This topic is intended for applications interested in health status for the Betjent Salg application on each vehicle. The health status is intended both as a real time surveillance of health status for each individual vehicle as well as for aggregating data per operator to see larger, more general issues. The topic can also, when enriched by other data, determine whether or not Betjent Salg was used and working on a specific departure.

    Accepts the following message:

    SalesDiagnostics
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/sales/diagnostics/sales-diagnostics.json

    Examples

  • PUB pe/sales/sla

    Betjent Salg diagnostics

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/pe/sales/sla
    Schema sales-sla.json
    Maintainer Betjent salg
    Producer Betjent salg
    Consumer Betjent salg
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    SLA message generated by Betjent salg (RuterSalg app and clones).

    The topic is used in SLA measurements. The 'metrics' section contains the SLA-related fields, while the 'context' section contains meta data related to a potential breach.

    Accepts the following message:

    SalesSla
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/sales/sla/sales-sla.json

    Examples

  • SUB pe/vehicle/api

    Vehicle API

    Field Value
    Central Topic {operatorId}/{authorityId}/{vehicleId}/adt/v4/pe/vehicle/api
    Schema api.json
    Maintainer DPI
    Producer DPI
    Consumer DPI, Betjent salg
    Service Level ⛔ PTA internal API. No restrictions apply. May be removed or modified freely by the PTA

    Message used by the PTA to distribute information about the vehicle and it's supported APIs as provided by the PTO.

    Accepts the following message:

    Api
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/pe/vehicle/api/api.json

    Vehicle API topic

    Examples

  • PUB sensors/accelerometer

    Accelerometer Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/accelerometer
    Schema accelerometer.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Expects a message that provides aggregated acceleration measurements over a 10-second interval. Each payload must include the minimum, maximum, and average acceleration values along the X, Y, and Z axes.

    Message Specifications

    • Message Frequency: 6 messages per minute (every 10 seconds)
    • Unit: All acceleration values are reported in g (1 g ≈ 9.81 m/s²)
    • Sampling Bandwidth: ≥ 100 Hz
    • Resolution: ≤ 0.01 g

    Expected Orientation

    By default, the schema assumes the accelerometer is mounted so that:

    • X-axis points forward (toward the vehicle’s front)
    • Y-axis points left (toward the vehicle’s left side)
    • Z-axis points up (toward the vehicle’s roof)

    If no orientation override fields are present, consumers should interpret the numerical values according to these defaults.

    Orientation Overrides

    Producers may optionally set xOrientation, yOrientation or zOrientation, each of which must be one of the six values: F (forward), B (backward), L (left), R (right), U (up) or D (down). If none are provided, the system assumes xOrientation = "F", yOrientation = "L", and zOrientation = "U".

    For a valid override, exactly one axis must be aligned along the forward/backward direction (F or B), exactly one along the up/down direction (U or D), and exactly one along the left/right direction (L or R). In other words, among the three fields there must be one value from { F, B }, one from { U, D }, and one from { L, R }. Any other combination is considered invalid and must be corrected before publishing.

    Accepts the following message:

    Accelerometer
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/accelerometer/accelerometer.json

    Schema for accelerometer sensor data. Accelerations are measured along the sensor's axes: X points forward, Y points left, and Z points upward. 'Forward' is defined relative to the vehicle's front (as configured or physically marked). All acceleration values are in units of g (where 1g ≈ 9.81 m/s²). Any divergence from the standard must be specified using the optional axis orientation overrides (fields xOrientation, yOrientation, and zOrientation).

    Examples

  • PUB sensors/apc/{sensorId}

    Apc Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/apc/{sensorId}
    Schema apc.json
    Maintainer Passasjertelling
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.
    sensorId
    required
    string
    uid: sensorId

    Identification of the physical sensor, e.g. serial number

    Accepts the following message:

    Apc
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/apc/apc.json

    Raw-data from door-sensor for later evaluation.

    Examples

  • PUB sensors/charging

    Charging Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/charging
    Schema charging.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the charging status and details of an electric vehicle. The message includes information about whether the vehicle is connected to a charging point, if it's actively charging, and the current charging effect in kilowatts (kW).

    Message Specifications

    • Message frequency: Messages should be sent on change, i.e., when there's a change in connection status, charging status, or a change in charging effect more or equal to 10kW.

    • Properties:

      • isConnected: Boolean value indicating if the vehicle is connected to a charging point
      • isCharging: Boolean value indicating if the vehicle is actively charging
      • chargingEffect:
        • Unit: Kilowatts (kW)
        • Resolution: Minimum one decimal (<=0.1kW)
        • Range: >=0.0kW

    Accepts the following message:

    Charging
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/charging/charging.json

    Schema for vehicle charging data

    Examples

  • PUB sensors/door

    Door Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/door
    Schema door.json
    Maintainer Passasjertelling
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Frequency: on change

    Accepts the following message:

    Door
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/door/door.json

    Describes if any door is open (if the door lock is released). Also see topic pe/doors_individually for status on individual doors.

      Examples values:
    • {"doorOpen":true,"atDateTime":"2021-11-30T23:45:52.006Z","traceId":"2d826a9a-2474-11ed-861d-0242ac120002"}

    Examples

  • PUB sensors/energy_consumption

    Accumulated Energy Consumption Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/energy_consumption
    Schema energy-consumption.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Energy consumption in kilowatt-hours (kWh), including all onboard systems such as HVAC. The value should always accumulate over time.

    Message Specifications

    • Message frequency: Once per minute (every 60 seconds)
    • Unit: kWh

    Accepts the following message:

    EnergyConsumption
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/energy-consumption/energy-consumption.json

    Schema for energy consumption sensor data. The value represents accumulated energy consumption in kilowatt-hours (kWh), including all onboard systems such as HVAC. The value should always accumulate over time.

    Examples

  • PUB sensors/location

    Location Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/location
    Schema location.json
    Maintainer Progress
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the GNSS navigation receiver feedback in metric format.

    The GNSS type is expected to be GPS. The GNSS coordinate system is expected be “WGS84”. Negative values is used south of the equator and west of Greenwich.

    Frequency is expected to be at 1 message per second.

    Accepts the following message:

    Location
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/location/location.json

    Location sensor data

    Examples

  • PUB sensors/odometer

    Odometer Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/odometer
    Schema odometer.json
    Maintainer Progress
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes an odometer value in meters based on total vehicle distance or similar. Absolute value of less importance but should be increasing within the scope of a journey.

    Frequency is expected to be at 1 message per second.

    Accepts the following message:

    Odometer
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/odometer/odometer.json

    Odometer data

    Examples

  • PUB sensors/state_of_charge

    State of Charge Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/state_of_charge
    Schema state-of-charge.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the current charge level of the vehicle's battery.

    Message Specifications

    • Message frequency: Once per minute (every 60 seconds)
    • Unit: Percentage (%)
    • Resolution: <= 1%
    • Range: 0% - 100%

    Accepts the following message:

    StateOfCharge
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/state-of-charge/state-of-charge.json

    Schema for state of charge sensor data. The value represents the battery's charge level as a percentage (%), typically ranging from 0 to 100. The value should generally increase while charging and decrease during operation.

    Examples

  • PUB sensors/stop_button

    StopButton Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/stop_button
    Schema stop-button.json
    Maintainer DPI
    Producer PTO
    Consumer DPI
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    This message should be produced whenever the stop signal is turned on or off. Depending on whether the regular stop button is pressed or the blue accessebility button is pressed, a different signal should be produced.

    Whenever the vehicle has serviced a stop, the signal is to be reset.

    Frequency: on change

    Accepts the following message:

    StopButton
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/stop-button/stop-button.json

    Describes if passengers have requested that the bus should stop (stop button pressed).

    Examples

  • PUB sensors/temperature_indoor

    Temperature Indoor Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/temperature_indoor
    Schema temperature-indoor.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the measured air temperature inside a vehicle. Each message corresponds to one physical sensor and includes contextual information that indicates its approximate location, based on defined temperature zones along the vehicle’s length and its vertical level if applicable.

    Message Specifications

    • Message frequency: 6 times per minute (every 10 seconds)
    • Unit: Degrees Celsius (°C)
    • Resolution: <= 1°C

    Location Semantics

    To support consistent interpretation across vehicle types, each temperature message includes:

    Field Type Description
    zone Int Position along the vehicle’s length. Divided into zones (starting from front = 1). Zone 0 is reserved exclusively for the driver's cabin.
    level Int Vertical level of the sensor. Only applicable for multi-level vehicles. If not provided, it will be interpreted as 1 (platform level).

    Note: All zones are approximate and not intended to represent exact physical locations. They serve to provide a general understanding of where a sensor is located within the vehicle.

    Temperature Zones

    Accepts the following message:

    TemperatureIndoor
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/temperature-indoor/temperature-indoor.json

    Schema for indoor temperature sensor data. The value represents the measured air temperature in degrees Celsius (°C) at a specific location within the vehicle. Location is defined by the car, zone (front, middle, rear, driver cabin), and level (e.g. below platform, platform, or upper level).

    Examples

  • PUB sensors/temperature_outdoor

    Temperature Outdoor Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/temperature_outdoor
    Schema temperature-outdoor.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Measurement of the external temperature around the vehicle.

    Message Specifications

    • Message frequency: Once per minute (every 60 seconds)
    • Unit: Degrees Celsius (°C)
    • Resolution: <= 1°C

    Accepts the following message:

    TemperatureOutdoor
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/temperature-outdoor/temperature-outdoor.json

    Schema for outdoor temperature sensor data

    Examples

  • PUB sensors/temperature_water

    Temperature Water Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/temperature_water
    Schema temperature-water.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the water temperature in Celsius, measured 1 meter below the water surface. The value should be a float with a resolution of 1°C or better.

    Data specification

    • Message frequency: 1 message per minute (1/min)
    • Unit: Celsius
    • Resolution: <= 1°C
    • Measurement depth: 1 meter below the water surface

    Accepts the following message:

    TemperatureWater
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/temperature-water/temperature-water.json

    Schema for water temperature sensor data

    Examples

  • PUB sensors/windscreen_wiper

    Windscreen Wiper Active Message

    Field Value
    Central Topic {authorityId}/{operatorId}/{vehicleId}/adt/v4/sensors/windscreen_wiper
    Schema windscreen-wiper.json
    Maintainer Miljødata
    Producer PTO
    Consumer PTA
    Service Level ✅ External API. Restrictions apply. Only backward compatible changes may happen within the major version.

    Describes the activity of the windscreen wipers.

    Message Specifications

    • Message frequency: On change

    Accepts the following message:

    WindscreenWiper
    object
    uid: https://schemas.ruter.no/adt/ota/api/v4.x/sensors/windscreen-wiper/windscreen-wiper.json

    Schema for windscreen wiper sensor data. The value represents the the active status of the windscreen wipers

    Examples