Obd Manager

Converters

battery

Enriches a voltage reading result with battery charge state and level.


dtc

Converts Diagnostics Trouble Codes (DTCs) result into a cloud friendly format.

Filters

alternating_readout

Filter that only returns alternating/changed values.

Handlers

commands

Lists all supported OBD commands found for vehicle.


connection

Manages current connection.

OPTIONAL ARGUMENTS

  • baudrate (int): Changes baudrate used to communicate with interface.
  • reset (str): Reboots interface and re-initializes connection.

context

Gets current context.


dump

Dumps all messages from bus to screen or file.

OPTIONAL ARGUMENTS

  • duration (int): How many seconds to record data? Default value is 2 seconds.
  • file (str): Write data to a file with the given name.
  • description (str): Additional description to the file.
  • protocol (str): ID of specific protocol to be used to receive the data. If none is specifed the current protocol will be used.
  • baudrate (int): Specific protocol baudrate to be used. If none is specifed the current baudrate will be used.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.

execute

Executes an AT/ST command.

ARGUMENTS

  • cmd (str): Command to execute.

OPTIONAL ARGUMENTS

  • assert_result (str or list): Validate the response by checking that is matches this specific value.
  • reset (str): Reset interface after execution. Valid options are: warm, cold
  • keep_conn (bool): Keep connection to interface after execution or close it permanently? Default value is True.
  • type (str): Specify a name of the type of the result. Default is the given command.

filter

Manages filters used when monitoring.

ARGUMENTS

  • action (str): Action to perform. Available actions are list, add and clear.

monitor

Monitors messages on bus until limit or duration is reached.

OPTIONAL ARGUMENTS

  • wait (bool): Wait for each message/line to read according to the default timeout of the serial connection (default 1 second). Otherwise there will only be waiting on the first line. line/message. Default value is False.
  • limit (int): The maximum number of messages to read. Default value is 500.
  • duration (float): How many seconds to monitor? If not set there is no limitation.
  • mode (int): The STN monitor mode. Default is 0.
  • auto_format (bool): Apply automatic formatting of messages? Default value is False.
  • filtering (bool): Use filters while monitoring or monitor all messages? Default value is False.
  • protocol (str): ID of specific protocol to be used to receive the data. If none is specifed the current protocol will be used.
  • baudrate (int): Specific protocol baudrate to be used. If none is specifed the current baudrate will be used.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.
  • type (str): Specify a name of the type of the result. Default is raw.

play

Plays all messages from a file on the bus.

ARGUMENTS

  • file (str): Path to file recorded with the obd.dump command.

OPTIONAL ARGUMENTS

  • delay (float): Delay in seconds between sending each message. Default value is 0.
  • slice (str): Slice the list of messages before sending on the CAN bus. Based one the divide and conquer algorithm. Multiple slice characters can be specified in continuation of each other.
    • t: Top half of remaining result.
    • b: Bottom half of remaining result.
  • filter (str): Filter out messages before sending on the CAN bus. Multiple filters can be specified if separated using comma characters.
    • +[id][#][data]: Include only messages matching string.
    • -[id][#][data]: Exclude messages matching string.
    • +duplicate: Include only messages where duplicates exist.
    • -duplicate: Exclude messages where duplicates exist.
    • +mutate: Include only messages where data mutates.
    • -mutate: Exclude messages where data mutates.
  • group (str): How to group the result of sent messages. This only affects the display values returned from this command. Default value is id.
    • id: Group by message ID only.
    • msg: Group by entire message string.
  • protocol (str): ID of specific protocol to be used to send the data. If none is specifed the current protocol will be used.
  • baudrate (int): Specific protocol baudrate to be used. If none is specifed the current baudrate will be used.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.
  • test (bool): Run command in test-only? (dry-run) mode. No data will be sent on CAN bus. Default value is False.

protocol

Configures protocol or lists all supported.

OPTIONAL ARGUMENTS

  • set (str): Change to protocol with given identifier.
  • baudrate (int): Use custom protocol baudrate.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.

query

Queries an OBD command.

ARGUMENTS

  • name (str): Name of the command.

OPTIONAL ARGUMENTS

  • mode (str): Service section of the PID.
  • pid (str): Code section of the PID.
  • header (str): Identifer of message to send. If none is specifed the default OBD header will be used.
  • bytes (int): Default value is 0.
  • decoder (str): Specific decoder to be used to process the response.
  • formula (str): Formula written in Python to convert the response.
  • unit (str): Unit of the result.
  • protocol (str): ID of specific protocol to be used to receive the data. Default value is auto.
  • baudrate (int): Specific protocol baudrate to be used. If none is specifed the current baudrate will be used.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.
  • force (bool): Force query of unknown command. Default is False.

recordings

Lists all dumped recordings available on disk.


send

Sends a message on bus.

ARGUMENTS

  • msg (str): Message to send.

OPTIONAL ARGUMENTS

  • header (str): Identifer of message to send. If none is specifed the default OBD header will be used.
  • auto_format (bool): Apply automatic formatting of messages? Default value is False.
  • expect_response (bool): Wait for response after sending? Avoid waiting for timeout by specifying the exact the number of frames expected. Default value is False.
  • raw_response (bool): Get raw response without any validation nor parsing? Default value is False.
  • echo (bool): Include the request message in the response? Default value is False.
  • protocol (str): ID of specific protocol to be used to receive the data. If none is specifed the current protocol will be used.
  • baudrate (int): Specific protocol baudrate to be used. If none is specifed the current baudrate will be used.
  • verify (bool): Verify that OBD-II communication is possible with the desired protocol? Default value is False.
  • output (str): What data type should the output be returned in? Default is a list.
  • type (str): Specify a name of the type of the result. Default is raw.

status

Gets current status information.