Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

What is a Model in LoopCloud?

Before you can add a Device to a Project in LoopCloud, Device Models must be created. Models are specific to a project. 

A device model must be created to initiate a communication channel for the device to connect to LoopCloud with specific protocol parameter settings. Standard protocols include: HTTP, HTTPS, MQTT, MQTTS, LWM2M, LWM2M with DTLS. In addition, custom data blocks can be configured. Additional protocol descriptions can be found in:

When you configure a model, choose from a predefined set. A JSON file with configuration parameters can be downloaded and this file can be used to set up your device. You can also supply parameters, if your device requires additional key-value pairs.

A model cannot be deleted if it is being used by a device. The device must be deleted before the model can be removed.

Use the following procedures to add a model to a project:

Create a Model for a Project

Several options can be chosen when creating a model. For the purpose of this Getting Started Guide, the steps cover a basic configuration.

To create a model:

  1. Click the company name at the top of the LoopCloud window.
  2. Click a Project.
  3. In the navigation panel, select Configuration > Models.
  4. Select the LOOPEDGE tab. The other tabs, EMBEDDED and POLL, will be covered in a more advanced topics section.
  5. Click New Model.
  6. In the Device Model Editor, select the CONFIG tab.
  7. Enter a Model Name.
  8. Click a checkbox from the Predefined Sets list to select a model and view its JSON code.
  9. Click Save.

Example

This example shows the JSON code for the MQTT TLS/SSL connection parameters selection.

{
  "mqttHostName": "%MQTT_HOST%",
  "mqttSslPort": "%MQTT_SSL_PORT%",
  "mqttServerCA": "%MQTT_CA_CERT%",
  "mqttUserName": "%MQTT_USERNAME%",
  "mqttPassword": "%MQTT_PASSWORD%",
  "mqttClientId": "%MQTT_CLIENT_ID%",
  "mqttReqTopicName": "%MQTT_REQ_TOPIC%",
  "mqttRespTopicName": "%MQTT_RESP_TOPIC%",
  "mqttDataTopicName": "%MQTT_DATA_TOPIC%"
}

Change the Model Image

To easily identify a device's model, a specific graphics file, such as a vendor's image, can be uploaded and inserted into the project's model. Standard image formats, such as jpg and gif, are supported.

Generic Model Image

To change a model's image:

  1. Click the company name at the top of the LoopCloud window.
  2. Click a Project.
  3. In the navigation panel, select Configuration > Models.
  4. Find the model to be updated and click the small camera icon at the bottom of the model.
  5. Click Select Image and then select a saved image.
  6. Click Upload.





  • No labels