Scan QR Code

Last Updated on : 2022-05-27 03:55:33download

You can scan a QR code to easily control a device. This capability can be embedded into a third-party app. You can scan the QR code with the third-party app, and wake up the H5 page to control the device.

Sequence diagram

Scan QR Code

Prerequisites

You have subscribed to commercial lighting SaaS services.

Integration guide

  1. Generate a QR code.

    1. Log in to the SaaS management background.
    2. Select a project.
    3. Choose Value-Added Application Configuration > Area Management.
    4. Select Device QR Code Sharing.
      Scan QR Code
  2. Integrate a third-party application:

    1. Scan the QR code with the third-party app, parse and get the value of URL.
    2. Get a ticket. Get a login ticket.
    3. Add the ticket parameter to the end of the URL address obtained in Step 1. For example, &ticket=xxxxx.
    4. Access the URL changed in Step 3 by using the webView component of the app.
    5. Visit the webpage properly.

    This is an example of the URL. https://wx-saas-lighting.ismartlife.me/#/views/scan_code/index?id=xxx&ticket=xxx.

Error message

Error message Description
Failed to get the information. Scan the QR code again. The ticket is invalid.