Define a Device

Add a Device to the Category

Things represent the entities in your world, for example your computer. You can create a Thing using diverse methods, as highlighted in the image below. You can get more information in Online Help. For this training we will create a Thing by uploading a schema, that is, using Option B highlighted in the image below.



Figure 1. Create a new Thing

Upload a Schema

  1. To upload a schema for a new Thing, in the top right corner of the editor, click + New Thing .


    The New Thing dialog opens.
  2. Click Skip to Schema.
  3. Copy the following code into the section and click Save.
    {
    	"actions": {},
    	"description": "This is a standard description for a Laptop. ",
    	"events": {},
    	"properties": {
    		"color": {
    			"title": "Computer color",
    			"type": "string"
    		},
    		"computerType": {
    			"title": "Computer Type",
    			"type": "string"
    		},
    		"computerstatus": {
    			"title": "Computer Status",
    			"type": "string"
    		},
    		"cpu": {
    			"title": "CPU",
    			"type": "number",
    			"unit": "%"
    		},
    		"disk": {
    			"maximum": 100,
    			"minimum": 0,
    			"title": "Disk",
    			"type": "number",
    			"unit": "%"
    		},
    		"latitude": {
    			"maximum": 180,
    			"minimum": -180,
    			"title": "Latitude",
    			"type": "number",
    			"unit": "º"
    		},
    		"longitude": {
    			"maximum": 180,
    			"minimum": -180,
    			"title": "Longitude",
    			"type": "number",
    			"unit": "º"
    		},
    		"memory": {
    			"title": "Memory",
    			"type": "number",
    			"unit": "%"
    		},
    		"owner": {
    			"title": "Owner",
    			"type": "string"
    		},
    		"statecpu": {
    			"type": "string"
    		}
    	},
    	"title": "Laptop"
    }
    The Thing is created.


    Figure 2.

Add Thing Properties

Properties define the attributes that should be expected for a given entity in the real world.

To add any additional properties to the ones already provided in the Schema, follow the steps below.

  1. Click the Laptop Thing to add Properties.
    The Details tab appears, which includes Overview, Properties, Actions, and Events.
  2. Add a new Property by clicking the plus icon in the Properties section.


    Figure 3. New Property creation
    The New Property dialog opens.
  3. Set the following:
    1. Property Key: the title of the property
    2. Type
    3. Initial values: optional parameters
    4. Optional Descriptors such as description, unit or type read-only.


    Figure 4. New Property form