Create a Thing and Model Schema

Things represent the entities in your world, for example your ESP32 module, sensors, or even ride instances. Properties define the attributes that should be expected for a given entity in the real world. In this tutorial, the Thing will represent a ride instance with many different Properties such as: humidity, temperature, username, age, bpm, and more. For this training we will create a Thing from scratch and then utilize a model schema to create more Things with the same Properties/structure.

  1. To add a Thing, in the top right corner of the web editor, click + New Thing .


    A new window opens, labeled New Thing.


    Figure 1.
  2. Enter the Thing name as user-ride and click Create.
  3. Add Properties by clicking on the + symbol next to Properties.
    Note: This Thing will represent a ride instance containing the following Properties as shown in the figure below.
  4. Create the following properties:
    1. Name: state and Type: String
    2. Name: humidity, Type: String and Initial Value: 48
    3. Name: temperature, Type: String and Initial Value: 26
    4. Name: username, Type: String and Initial Value: user
    5. Name: ride_type, Type: String and Initial Value: Test Ride
    6. Name: age, Type: Integer and Initial Value: 25


    Figure 2.
  5. After all the Properties are created, click on the magic wand icon in the upper-right corner to save a Model.


  6. Assign a name to the Model and click the + symbol to create the Model.
    Note: In the figure below, there is an existing Model type called user model. This is where your saved Model will appear in the future. You can overwrite an existing Model to create a newer version of that Model.


    Figure 3.
Tip: You can find the Model schema in JSON format by clicking on the note pad icon in the upper right corner. The Model component will be encapsulated inside a JSON array labelled "model".