3 Connect Vehicles to Oracle IoT Fleet Monitoring Cloud Service
A device connected to the vehicle sends real time data to Oracle Fusion Cloud IoT Intelligent Applications. A data logger connected to the OBD-II port of a fleet vehicle is a common device used to transmit location and operational data to Oracle Fusion Cloud IoT Intelligent Applications. A device model defines what data is collected and forwarded to Oracle IoT Fleet Monitoring Cloud Service. Oracle provides a default device model to collect typical OBD-II data.
Vehicles cannot transmit location and operational data independently. A data logger must be installed to allow vehicle data to be transmitted to the cloud service. A data logger is a physical device that is connected to the OBD-II port of a vehicle. The data logger reads the OBD-II data and then transmits the data to the cloud service.
Device Models Overview
A device model is an interface that lets any device communicate with Oracle Fusion Cloud IoT Intelligent Applications regardless of its manufacturer or operating system. A device model can represent a device, gateway, device adapter, or a device application.
A device model provides Oracle Fusion Cloud IoT Intelligent Applications access to:
-
metadata associated with the device type
-
message formats generated by the device
-
exposed web resources that can be used for sending commands
-
device capabilities, such as device software management
{
"urn": "urn:com:mycompany:mydevices:driverdevice1",
"name": "Driver Device 1",
"description": "A device assigned to driver 1",
"system": false,
"attributes": [ ],
"actions": [ ],
"formats": [ ],
"links": [ ]
}
A device model uses the URN as its unique identifier (ID). It also has a descriptive name and an optional description. When the system attribute has a value of true, it indicates that the device model was provided with Oracle Fusion Cloud IoT Intelligent
Applications instance. Each device model can be enhanced with three additional lists: attributes, actions, and message formats.
A device model’s attributes represent the variables that the device supports. Here is an example:
"attributes": [
{ "name": "oxygenSaturation", "type": "NUMBER" },
{ "name": "heartRate", "type": "NUMBER" }
]
Each attribute has a message format and web resources associated with it. Some device models are defined only by their attributes, but most are defined by some combination of attributes and accompanying alert message formats. Attributes may be read-only or readable and writable.
The actions identify the methods that can be remotely invoked on the device. They are similar to attributes, but are in invocable state, instead of readable state. Here is an example:
"actions": [
{ "name": "initialize", "description": "Returns the temp in C", "argType": "NUMBER" },
{ "name": "reset", "description": "Min measured value since ON" }
]
Formats specify the types of messages that the device can send to Oracle Fusion Cloud IoT Intelligent Applications. The URN defined is the ID used and must be unique. Here are two examples:
"formats": [
{
"urn": urn:oracle:iot:device:pulseoximeter",
"name": "Pulse Oximeter Data"
"description": "Pulse Oximeter format",
"type": "DATA",
"value": {
"fields": [
{ "name": "oxygenSaturation", "type": "NUMBER", "optional": false },
{ "name": "heartRate", "type": "NUMBER", "optional": false }
]
},
"links": [ "..."]
},
{
"urn": urn:oracle:iot:device:pulseoximeter:fatal",
"name": "Pulse Oximeter Alert"
"description": "Fatal alert for pulse oximeter",
"type": "ALERT",
"value": {
"fields": [
{ "name": "oxygenSaturation", "type": "NUMBER", "optional": false },
{ "name": "heartRate", "type": "NUMBER", "optional": false }
]
},
"links": [ "..."]
}
]
A device can implement multiple device models. For example, device models may exist for battery management and for temperature sensing. A single device might implement one or both of these device models.
When a registered device has device models that aren’t defined yet in Oracle Fusion Cloud IoT Intelligent Applications, the device can declare these models during activation. These draft device models aren’t usable until they are saved and become normal device models. When draft models are saved, the device that declared them during activation is also updated.
Device models that are included with Oracle Fusion Cloud IoT Intelligent Applications are known as system models. These models can’t be changed or deleted.
You can add a device model either from Oracle IoT Fleet Monitoring Cloud Service or from the Oracle Fusion Cloud IoT Intelligent Applications platform UI.
Device Overview
A device is a data logger that is connected to the OBD-II port of a fleet vehicle or a sensor that reads and transmits real time vehicle data. Vehicle data can include vehicle speed, engine revolutions per minute (rpm), vehicle diagnostic trouble codes (DTCs), coolant temperature, latitude, and longitude.
The data logger transmits location and operational data to Oracle Fusion Cloud IoT Intelligent Applications. The device model determines what data is sent from Oracle Fusion Cloud IoT Intelligent Applications to Oracle IoT Fleet Monitoring Cloud Service.
To associate sensors with your vehicles, make sure that the devices are registered and activated in Oracle Internet of Things Cloud Service. Oracle IoT Fleet Monitoring Cloud Service relies on Oracle Fusion Cloud IoT Intelligent Applications for its devices. If you do not already have your sensor devices set up in Oracle Fusion Cloud IoT Intelligent Applications, you need to register and activate these devices.
Register a Single Device
To communicate with Oracle Fusion Cloud IoT Intelligent Applications, every device that is connected to Oracle Fusion Cloud IoT Intelligent Applications must be registered and then activated. All devices are registered as a Directly Connected Device (DCD). During activation, the device indicates support for indirect enrollment. A device indicating indirect enrollment capability is automatically changed from DCD to Gateway.
Register a Batch of Devices
You can register a batch of devices that you want to connect to Oracle Fusion Cloud IoT Intelligent Applications using a comma-separated values (CSV) file.
About CSV Batch Registration File Properties
The following table provides descriptions of the properties that appear in the Comma Separated Values (CSV) file used to register a batch of devices with Oracle Fusion Cloud IoT Intelligent Applications. Mandatory and optional values are described in the table and are listed in the order they are expected to appear in the CSV file.
To register a batch of devices with Oracle Fusion Cloud IoT Intelligent Applications, see Register a Batch of Devices.
Property | Required / Optional | Description |
---|---|---|
|
Optional |
The String data type assigned to the registered device. This value can be modified after device registration. |
|
Required |
The manufacturer of the device. |
|
Required |
The model number of the device |
|
Required |
The serial number of the device. |
|
Optional |
A Device Unique Identifier (UID) that is required for device activation. If a value is not specified, an auto-generated value is assigned to the device after a successful registration. The value cannot be changed after the device is successfully registered. |
|
Optional |
The Activation Secret (also known as Shared Secret) value required to activate your device. If a value is not specified, an auto-generated string value is assigned to the device after a successful registration. This value is available after a successful registration. This value can be modified before you modify your device. |
|
Optional |
The decimal notation of the latitude of the device’s position. For example: -43.5723 [World Geodetic System 1984]. If you specify the latitude, then you must also specify the longitude. |
|
Optional |
The decimal notation of the longitude of the device’s position. For example: , e.g. -43.5723 [World Geodetic System 1984]. If you specify the longitude, then you must also specify the latitude. |
|
Optional |
The decimal notation of the altitude of the device’s position, in meters above sea level. |
|
Optional |
The accuracy of the device’s position in meters. This must be a positive number or zero. An accuracy value can only be specified if the latitude and longitude are provided. |
|
Optional |
Key/value pairs that are listed in successive columns. There must be an even number of columns containing keys and values. If there is an odd number of columns, an error message is returned. |
Activate a Device
A device can be activated after it is registered and an application has been created and run on the device. During activation, the device indicates support for indirect enrollment. A device indicating indirect enrollment capability is automatically changed from DCD to Gateway.
Activating a Batch of Registered Devices
After you’ve registered a batch of devices, you need to activate the devices before they can securely communicate with Oracle Fusion Cloud IoT Intelligent Applications.
- Register the devices and download the provisioning file. See Registering a Batch of Devices.
- Activate each of the registered devices. See Activate a Device.
- Verify that each of the registered devices has been activated.
- Open the Oracle Fusion Cloud IoT Intelligent Applications Management Console.
- Click the Menu () icon adjacent to the Oracle Internet of Things Cloud Service title on the Management Console.
- Click Devices.
- Click Management.
- Locate the device in the device table or use the Property and Value fields at the top of the table to search for a specific device.
- Verify
Activated
and notRegistered
is displayed in the State column.
Install the Sample Application for Testing
To view and monitor simulated vehicle data, you install a sample application on a mobile device. The sample application displays simulated vehicle data such as coolant temperature and throttle position. The sample application can help you determine what vehicle data to include in your own application.
Set Up a Freematics One Vehicle Data Logger for Testing
To view and monitor vehicle data sent by a Freematics One vehicle data logger, you install a sample application on an Android device. The sample application displays vehicle data such as coolant temperature and throttle position. Vehicle data is sent from the Freematics One vehicle data logger to the Android device, and then to Oracle IoT Fleet Monitoring Cloud Service. The sample application can help you determine what vehicle data to include in your own application.