General-motors-onstar protocol

Protocol used to to fetch vehicle telematics data via General Motors OnStar Data Services API.
flespi parses the General-motors-onstar protocol messages into a JSON object with the fields listed below in the Parameters tab.

The channel will expect HTTP POST requests with payload data in GM OnStar protocol format.

To start receiving vehicle data from the GM OnStar platform perform the following steps:

1. Create a channel with ‘general-motors-onstar’ protocol. Contact your GM manager and provide them with a channel URI, so that they configure the Target URL where GM will be pushing vehicle data to.

(Optional: You may also create a second channel and provide them with a second URI - for QA environment)

2. Provide GM with the subnet mask 193.193.165.0/25, so that they whitelist this IP addresses range for inbound requests to GM from the flespi platform

3. Once you have received the API credentials from GM, paste them into the Credentials section of the channel configuration on the Edit tab:

gm onstar protocol credentials

Note: be careful not to mix up credentials for Production and QA environments!

4. Execute the “provision_device” command (Commands tab) for each vehicle that you want to receive the telemetry from. Use vehicle VIN as an ident for the command:

gm onstar send provision device command

When sending the command you may leave the Service and Credentials fields blank. By default the command will Opt In the vehicle for TELEMETRY data service in the GM platform. Credentials from the channel (configured on step 3) will be used if no other credentials are specified for the command.

As soon as the command is executed successfully, the GM platform will start sending the vehicle telemetry data to the channel. You can see the incoming messages on the Logs & Messages tab.

battery.voltage
number
volts
Internal battery voltage
can.ambient.air.temperature
number
celsius
CAN ambient air temperature
can.exhaust.fuel.indicator.status
boolean
can.fuel.consumed
number
liters
Fuel volume totally consumed by vehicle read from CAN
can.fuel.economy
number
km/liters
CAN instantaneous fuel economy
can.soot.filter.indicator.status.1
boolean
can.soot.filter.indicator.status.2
boolean
can.vehicle.speed
number
km/h
Vehicle speed read from CAN
channel.id
number
ID of channel that received a message
device.id
number
ID of device that received a message
device.name
string
Name of device that received a message
device.type.id
number
ID of device type of device that received a message
driver.seatbelt.indicator.status
boolean
dtc.action
string
dtc.active.status
boolean
dtc.code
string
dtc.description
string
dtc.module.id
string
dtc.open.timestamp
datetime
dtc.reset.timestamp
datetime
dtc.severity.code
number
dtc.status.byte
string
dtc.subsystem.id
number
dtc.subsystem.name
string
dtc.system.name
string
engine.coolant.temperature
number
engine.ignition.change.status
boolean
engine.ignition.status
boolean
Engine ignition status
engine.motorhours
number
hours
Total calculated engine motorhours
engine.rpm
number
rpm
Engine RPM read
fuel.capacity
number
fuel.level
number
percentage
Fuel level percentage
fuel.volume
number
liters
Fuel volume
gas.range
number
gsm.network.type
string
The type of the mobile network the device is currently registered to
ident
string
Device unique identifier like serial number, IMEI, etc
oil.life
number
passenger.seatbelt.indicator.status
boolean
passenger.seat.occupied.status
boolean
peer
string
IP:port from which device connecting to the channel
position.altitude
number
meters
Altitude value for position
position.direction
number
degrees
Heading angle at position detection moment
position.latitude
number
degrees
Latitude coordinate value
position.longitude
number
degrees
Longitude coordinate value
position.speed
number
km/h
Instant speed at position detection moment
power.mode
string
protocol.id
number
ID of protocol
segment.max.acceleration
number
g
Maximum acceleration value that occured on the segment
segment.max.braking.acceleration
number
g
Maximum braking acceleration value that occured on the segment
server.timestamp
number
seconds
Timestamp when server received a message
timestamp
number
seconds
Message timestamp
tire.placard.front
number
tire.placard.rear
number
tire.pressure.lf
number
tire.pressure.lr
number
tire.pressure.rf
number
tire.pressure.rr
number
tire.pressure.state.fr
string
tire.pressure.state.lf
string
tire.pressure.state.lr
string
tire.pressure.state.rr
string
total.engine.idle.time
number
trip.mileage
number
km
Distance driven since engine start
vehicle.mileage
number
km
Total calculated mileage
Properties
Send a custom command to device
custom
Send a POST HTTP request to On Star API /account/vehicles/{vin}/commands/{cmd_name} with provided {cmd_param} in request body
cmd_name: Command Name
cmd_param: Command Parameter
credentials: Credentials
Provision device
provision_device
Consent and opt in device for given data services in OnStar API
services: Services
credentials: Credentials
Remove device
remove_device
Opt out device for given data services in OnStar API
services: Services
credentials: Credentials