13 Configure Your Devices
Configure the sensor devices in your factory to work with Oracle IoT Production Monitoring Cloud Service.
How to Connect Sensors to Your Application
Before using or uploading data to Oracle IoT Production Monitoring Cloud Service you must connect to your application the sensors that you are using to monitor your machines.
http://hostname/ui
. The credentials are the same credentials you use for Oracle IoT Production Monitoring
Cloud Service.
Using Oracle Internet of Things Intelligent Applications Cloud:
Using Oracle IoT Production Monitoring Cloud Service:
Create a New Device Model
A device model is an interface that lets any device communicate with Oracle Internet of Things Intelligent Applications Cloud regardless of its manufacturer or operating system.
Predefined Device Models
Oracle IoT Production Monitoring Cloud Service provides predefined device models to report the state of a machine or the production output for a product.
The following Oracle IoT Production Monitoring Cloud Service device models are included in Oracle Internet of Things Intelligent Applications Cloud:
- Machine State (
ProductionMonitoringMachineState
)A sensor attached to your machine can use this device model to report the state of the machine to Oracle Internet of Things Intelligent Applications Cloud. The states can be one of the following:INUSE
DOWN
IDLE
The device model specification is as follows:{ "urn": "urn:com:oracle:iot:pm:machine_state", "name": "Production Monitoring Machine State device model", "description": "Machine state device model", "system": true, "attributes" : [ { "name" : "state", "description" : "Machine state enum. This is one of INUSE, DOWN or IDLE", "type": "STRING", "writable" : false }, { "name" : "machine", "description" : "Machine Unique Identifier", "type": "STRING", "writable" : false } ] }
The following table describes the attributes used in the device model:
Attribute Type Description Required Default Value machine String The identifier of the machine for which the state information is being reported. Populated only if the message is sent by a gateway on behalf of the machine. If a device that implements this device model is associated with the machine (as a device attribute), then machineId
is derived from the device'ssourceId
.No none state String The physical state of the machine: INUSE
: Machine is up and running, and is actively producing a product.DOWN
: Machine is not running; could be down on account of a scheduled maintenance, outage, or hardware failure.IDLE
: Machine is running, but not actively producing any product.
Yes none - Production Output (
ProductionMonitoringProductionOutput
)Use this device model to report the production output for a product for the specified time period. The device model specification is as follows:
{ "urn": "urn:com:oracle:iot:pm:production_output", "name": "Production Monitoring Production Output device model", "description": "Production Output device model", "system": true, "attributes" : [ { "name" : "startTime", "description" : "Start time of the production output. This is specified as a Long value in milliseconds since epoch (Jan 1 1970)", "type": "DATETIME", "writable" : false }, { "name" : "endTime", "description" : "End time of the production output. This is specified as a Long value in milliseconds since epoch (Jan 1 1970). The value should be greater than the startTime attribute.", "type": "DATETIME", "writable" : false }, { "name" : "product", "description" : "Product Identifier that was produced.", "type": "STRING", "writable" : false }, { "name" : "quantity", "description" : "Quantity of the product produced. This should be within the range [1,Integer.MAXINT] (both inclusive)", "type": "INTEGER", "writable" : false }, { "name" : "factory", "description" : "Factory where the product was produced. The value specified should be a registered factory identifier.", "type": "STRING", "writable" : false }, { "name" : "productionLine", "description" : "Production Line within the factory where the product was produced. The value specified should be a registered production line identifier.", "type": "STRING", "writable" : false }, { "name" : "routingTask", "description" : "The routing task associated with the produced product. The value specified should be a registered routing task identifier.", "type": "STRING", "writable" : false }, { "name" : "machine", "description" : "The machine which produced the product. The value specified should be a registered machine identifier.", "type": "STRING", "writable" : false } ] }
The following table describes the attributes used in the device model:
Attribute Type Description Required Default Value startTime DateTime Start time of the production output, specified as a Long
value in milliseconds since epoch (Jan 1 1970).Yes none endTime DateTime End time of the production output, specified as a Long
value in milliseconds since epoch (Jan 1 1970). The value should be greater than the startTime attribute.Yes none product String Product identifier for the product that was produced. Yes none quantity Integer Quantity of the product produced. This should be within the range [1,Integer.MAXINT]
(both inclusive).Yes none factory String Factory where the product was produced. The value specified should be a registered factory identifier. No At least one of factory, productionLine, routingTask, or machine is required.
none productionLine String Production line within the factory where the product was produced. The value specified should be a registered production-line identifier. No At least one of factory, productionLine, routingTask, or machine is required.
none routingTask String The routing task associated with the product. The value specified should be a registered routing-task identifier. No At least one of factory, productionLine, routingTask, or machine is required.
none machine String The machine which produced the product. The value specified should be a registered machine identifier. No At least one of factory, productionLine, routingTask, or machine is required.
none
Register a Single Device
To communicate with Oracle Internet of Things Cloud Service, every device that is connected to Oracle Internet of Things Cloud Service 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
Registering a batch of devices reduces the time required to register multiple devices. You create a comma-separated values (CSV) file to define the settings for each device. You upload the CSV file to Oracle Internet of Things Intelligent Applications Cloud.
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 Internet of Things Intelligent Applications Cloud. 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 Internet of Things Intelligent Applications Cloud, see Registering 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.
Activate 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 Internet of Things Intelligent Applications Cloud.
- 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 Internet of Things Intelligent Applications Cloud 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.