Viewing models and things in the AWS IoT Things Graph console - AWS IoT Things Graph

Viewing models and things in the AWS IoT Things Graph console

The models section of the AWS IoT Things Graph console shows you all of the available services, devices, and device models in your namespace and in the public namespace. It also provides important information about each device and device model, including its definition and associated things. The things section of the console shows you all of the things in your AWS IoT registry. It also enables you to associate those things with devices in your namespace and in the public namespace.

This topic describes the features of the models and things sections and explains how to use them.

Models list

The main page of the models section contains a list of all of the devices and device models in your namespace and in the public namespace, as shown in the following screenshot.


          The Models list page displays services, devices, and device
            models. It also shows their AWS IoT Things Graph Data Model URNs.

To create a model, choose Create Model. Follow the instructions to upload a file that contains all the components (properties, state, actions, events, and capability) of your service, device, or device model. You can also edit the model in a GraphQL editor in the browser, as shown in the following screenshot.


          The MotionSensor device model definition appears in the browser-based GraphQL
            editor.

For more information about creating device definitions with the AWS IoT Things Graph Data Model, see the AWS IoT Things Graph Data Model Reference and Example device and service definitions.

Model details

To see details about each service, device, or device model, select the linked name in the Device class/subclass column. (You can also select the box next to the name, and then choose View details.) The default Details tab on the page that's displayed provides summary information about the definition, as shown in the following screenshot.


          The Model details page contains the URN of the service, device,
            or device model. It also displays the properties, actions, and events in the
            definition.

If you're viewing a device model, the Device models and Associated things tabs also appear. The Device models tab displays all of the devices in your namespace and in the public namespace that implement the device model and its capability. The following screenshot shows one device that implements the MotionSensor device model.


          The Device models section for the
              MotionSensor device model displays the
              HCSR501MotionSensor device.

If you're viewing a device model, the Associated things tab displays all of the things in your AWS IoT registry that are associated with the devices that implement the device model. You can also search for associated things from this page.


          The Associated things tab for the
              MotionSensor device model displays the associated things and
            their ARNs.

Model definition

You can view the definition of a service, device, or device model in two ways. To download a file that contains the definition, choose Download model. To view the definition in the browser, choose View definition. The complete model definition appears in a new window.


          View definition displays the MotionSensor definition, including
            its capability, state, event, and property.

When you select the Details tab, Edit model and Edit appear on the right side of the screen and are enabled. The two buttons perform the same operation. To edit the definition, choose Edit or Edit Model. Follow the instructions to upload a file containing updated versions of the components (properties, state, actions, events, and capability) of your service, device, or device model. You can also edit the model in a GraphQL editor in the browser.

Associating things with devices

The things section of the AWS IoT Things Graph console lists all of the things in your AWS IoT registry. You can use this page to associate each thing with a device in your namespace or in the public namespace.

After you associate a thing with a device, you can include that thing in a deployment that includes a flow that contains the device or a device model from which the device inherits. The following screenshot shows an example of the things list.


          The MotionSensor1 thing is associated with the
              HCSR501MotionSensor device. the Associated entity
              ID column displays the AWS IoT Things Graph Data Model URN of each device.

To associate a thing with a device, select the thing and then choose Associate with model. The Select device model list appears. You can page through the list or use the Search device models box to find the device you want.


          The HCSR501MotionSensor is selected in the Select
              device model window.

A thing can be associated with only one device. To dissociate a thing with a device, select the thing and then choose Dissociate with model.