English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Tuya Testing Machine Installation

Last Updated on : 2022-03-02 06:45:29download

This topic describes how to install a Tuya testing machine.

Preparations

Hardware

  • A Raspberry Pi 4 Model B

    Buy a Raspberry Pi 4 Model B (4G RAM) and necessary add-ons such as an official Raspberry Pi power supply and case. For more information, visit official website.

  • A Micro SD card

    Prepare a Micro SD card with available space no less than 64 GB. We recommend the SanDisk 64GB Extreme Pro Micro SD card (U3, C10, A2, V30, and 4K).

  • A computer with a Micro SD card reader for image flashing

  • A wired router

Software

  • balenaEtcher

    Download balenaEtcher from the official website and install it. balenaEtcher will be used to flash the image file to the Micro SD card later.

  • Tuya testing machine image file

    Download the image file from image download link.

  • Activation code

    Send an activation code application email to testing_machine@tuya.com. The email must contain your company’s name, the purpose of the application, and the name of the business or project manager.

Hardware assembly

  1. Attach the heat sink to the Raspberry Pi.

  2. Insert the Raspberry Pi motherboard into the case.

  3. Insert the cooling fan into the case.

  4. Connect the power supply of the cooling fan to the power supply pins on the Raspberry Pi motherboard. For more information, see the following figure.

    Tuya Testing Machine Installation

    For now, do not insert the Micro SD card into the Raspberry Pi and do not supply power to the Raspberry Pi.

Software installation

Flash the image file

  1. Insert the Micro SD card into your computer.

  2. Use balenaEtcher to flash the image file to the Micro SD card.

    1. Run balenaEtcher on your computer.

      Tuya Testing Machine Installation
    2. Click Flash from file. Select the image file that you downloaded.

      Tuya Testing Machine Installation
    3. Click Select target. In the pop-up window, select the Micro SD card that you inserted into the computer.

      Tuya Testing Machine Installation

      Before you flash the image file, remove any other USB drives or external hard drives from the computer to avoid data loss caused by misoperations.

    4. Click Flash.

      If you use a computer that runs Windows, you may be prompted to format the Micro SD card during the flashing process because Windows cannot recognize the Linux file system. Ignore this prompt and never format the Micro SD card throughout the flashing process.

      Tuya Testing Machine Installation
    5. Wait for the flashing to complete. The flashing process generally takes two to three minutes.

      Tuya Testing Machine Installation
  3. If you see the following page, the flashing is successful. If the flashing fails, repeat the aforementioned steps.

    Tuya Testing Machine Installation

Write device configuration information

Things to note

Make sure that the extension of the device configuration file is .json. An extension other than .json causes your device to be unrecognizable. To check the file extension on Windows, follow the steps in the following figure.

Tuya Testing Machine Installation
  1. After the flashing is completed, remove the Micro SD card and insert it into your computer again.

  2. Under the boot partition, create a device configuration file named product.json.

  3. Write the following device configuration information into the product.json file:

    {"pid":" 5soed7acpyyza9bu", "uuid":" tuya\*\*\*\*\*\*a6f6f", "authkey":" Tex\*\*\*\*\*\*\*\*\*vhF"}

    pid is a fixed value and uuid and authkey are obtained from the activation code.

    Tuya Testing Machine Installation

Start the device

  1. Insert the Micro SD card into the card slot on the Raspberry Pi.

    Tuya Testing Machine Installation
  2. Connect the Raspberry Pi to the router by using a network cable and power on the Raspberry Pi.

    Tuya Testing Machine Installation

    When the Raspberry Pi is powered on for the first time, it takes some time to initialize.

  3. After the Raspberry Pi starts, the red indicator flickers quickly. This indicates that the Raspberry Pi needs to be paired.

    Tuya Testing Machine Installation
  4. The Raspberry Pi is installed. You can use the Smart Life app or Tuya Cloud Test app to pair the Raspberry Pi.

Indicator status description

  • Two indicators are near the Micro SD card slot on the testing machine: a red one and a green one.

    Tuya Testing Machine Installation
  • The following table describes the indicator statuses.

    Working mode Device status Red indicator Green indicator
    Power-on Steady on Flickers irregularly
    Normal device operations Removed from the app or waiting to be paired Flickers quickly (at an interval of 250 ms) Off
    Connecting to the cloud Off Flickers slowly (at an interval of 1,500 ms)
    Paired Off Steady on
    OTA updates in progress Flicker synchronously (at an interval of 1,500 ms)
    Failure Disconnected from the router Flicker alternatively (at an interval of 500 ms)
    product.json missing Flicker alternatively (at an interval of 100 ms)