Create projects and products

Updated at:
Copy as MD

This topic shows you how to create a project in IoT Studio and then create products and devices for it.

Step 1: Create a project

  1. Sign in to the IoT Studio console. In the upper-left corner of the page, select Public Instance. In the left-side navigation pane, click Projects.

  2. On the Projects page, click New Project.

  3. On the New Project page, hover over the Create Blank Project area and click Create Blank Project.

  4. In the Create Blank Project dialog box, enter a project name and description. For this example, use "Indoor Temperature Monitoring" as the project name.

  5. Click OK.

Step 2: Create products and devices

  1. On the project home page, click Products in the left-side navigation pane.

  2. On the Products page, click Create Product in the upper-left corner of the product list.

  3. On the Create Product page, enter a product name, select Custom Category, keep the other parameters at their default values, and click OK. Then, repeat this step to create the following five products: Living Room Temp/Humidity, Bedroom Temp/Humidity, Kitchen Temp/Humidity, Air Detector, and Switch Remote.

    After you create the products, the system redirects you to the Products page, where you can find them in the list.

  4. In the product list, find the target product and click View in its row.

  5. On the Product Details page, click the Feature Definition tab, click Edit Draft, and then select Add Custom Feature.

    This example adds the following custom properties. For detailed instructions, see Add a TSL model for a product.

    Living Room Temp/Humidity, Bedroom Temp/Humidity, and Kitchen Temp/Humidity products

    Feature Name

    Identifier

    Type

    Value

    Unit

    Read/Write Type

    Humidity

    Humidity

    float

    0 to 100

    Percent (%)

    Read/Write

    Temperature

    Temperature

    float

    -20 to 50

    Degrees Celsius (°C)

    Read/Write

    Air Detector product

    Feature Name

    Identifier

    Type

    Value

    Unit

    Read/Write Type

    PM2.5 concentration

    PM25

    float

    0 to 10000

    Micrograms per cubic meter

    Read/Write

    Switch Remote product

    Feature Name

    Identifier

    Type

    Value

    Unit

    Read/Write Type

    Bedroom Light Switch

    RoomLightSwitch

    boolean

    • 0: Off

    • 1: On

    N/A

    Read/Write

    Living Room Light Switch

    LivingLightSwitch

    boolean

    • 0: Off

    • 1: On

    N/A

    Read/Write

    Air Conditioner Switch

    AirConditioningSwitch

    boolean

    • 0: Off

    • 1: On

    N/A

    Read/Write

    Air Purifier Switch

    AirCleanerSwitch

    boolean

    • 0: Off

    • 1: On

    N/A

    Read/Write

  6. In the left-side navigation pane, click Devices. On the Devices page, create a device for each of the five products.

    For more information, see Add a device. After you create the devices, you can view information such as DeviceName, Product, Node Type, Status (Online or Offline), and Last Online Time in the device list.

  7. This example uses the property submission feature of the device simulator to report data. For more information, see Device Simulator.

    1. Sign in to the IoT Platform console.

    2. On the Instance Overview page, click Public Instance to go to the Instance Details page.

    3. In the left-side navigation pane, choose Monitoring and Maintenance > Device Simulator.

    4. Select a device to simulate, such as Air Detector, and start the device simulator.

    5. Select the Property Submission feature to send a debug command.

      On the device simulator page, select Air Detector (Air-detector) as the device to debug, turn on the Online switch, and select Default Module. In the PM2.5 concentration(PM25) input box, enter 90, and click Send Command. The device-side logs section on the right displays the message exchange between the cloud and the device. After you send the data, the logs appear in the device-side logs section.

For more information, see the documentation for products and devices.

Next steps

Develop a mobile app to monitor the indoor temperature.