The first step in using the Oracle IoT Cloud Service is registering the devices sending the raw data. There are two categories of devices:
- Directly connected devices are devices with a direct connection to the internet and thus to the IoT Cloud servers. These devices are capable of directly sending the data to the cloud.
- Gateways are devices which collect (and maybe even filter) data from other devices – for example because those devices are not able to communicate over the internet – and forward the data they receive to the cloud.
Registering a new device using the user interface is pretty straight-forward: you use the menu Registration on the tab Devices.
First of all, single device or batch registration must be chosen.
Batch registration is useful if a large amount of devices is to be registered at once – for example if you have a list of vending machines you own with their attributes and you want to register them all – we will come to this point later. For now, lets consider a single device registration.
- Name is the name of the device under which it can later be found in the list for devices. Although it is not required it is good idea to keep the names unique for easy filtering of devices.
- Shared secret is basically the password used for initial authentication of the device. The device must first connect to the IoT Cloud Service using this password. Having successfully connected once, the device will receive a private key. This key should be stored at a safe location on the device and can be then used to start further authentication requests.
Having filled out all the fields, the last screen comes up. A unique ID is automatically assigned to the device, the device must use this ID for starting authentication requests (this ID basically serves as the user name).
The newly configured device can now be found in the Management menu. This is the menu where all the registered devices can be monitored. The most important properties are state and connectivity status. Connectivity status tells you if the device is online (sending at least ping messages to the IoT Cloud) or not. State is used for device activation.
The newly configured device is currently in the state Registered. At this point, all of the device properties can still be edited. Having successfully connected the device to the IoT Cloud Service once, its state will move to Activated. From now on, the shared secret of the device cannot be modified (all other properties can still be edited).
The messages sent by the device can now be live found in the menu Messages on the tab Data.
Note that each message must contain a unique format identifier, this identifier describes the payload structure. These identifiers must be registered with the IoT Cloud – this can be done by selecting a message with the given format and clicking on the button Register Message Format. By clicking the button, the payload structure is automatically analysed. If this step is omitted, the messages are received by the IoT Cloud but cannot be be further processed (neither analysed, nor forwarded to other systems). A message format is of course not unique to a device, multiple devices may send messages with the same format. In this case, the format must be registered only once.
We have shown a single device can be registered using the user interface. The wizard guides the registration process nicely but its usage is still cumbersome if you have a lot of devices to register. In this case the batch registration can be used. Here you have to upload a CSV file containing the device data row by row. The fields each row must contain from left to right are:
- Device name
- Device type (Gateway = GWAY, Directly connected device = DDVC)
- Model number
- Serial number
- Device id
- Share secret
Please note that while using batch registration, the device id is not assigned automatically, you have to guarantee that the ids you assign are unique.
Having registered devices with the IoT Cloud Service and received the first data packets, the next step is to analyse/filter these and forward the analysis results (or even the raw data) to external systems. These aspects will be covered in the next part.