Device Log Service

Last Updated on : 2024-06-24 03:41:49download

Device logs are used to record device usage. These logs are sorted by time. Tuya’s Device Logs Service visualizes usage data of online activated devices securely in near real-time records and long-term storage as needed. Thus, enhance your data operations capabilities and make data-driven decisions.

Scenarios

  • 24/7 device logging and monitoring:

    • Help device administrators get to know the usage of devices and consumables, and timely provide designated users with services, such as device maintenance and consumables replacement.

    • In response to user feedback, device administrators can view device logs, restore scenarios, find out problems, and step up troubleshooting efforts.

  • Show logs on the user panels:

    Customize the usage records of features, also known as data points (DPs), to be presented on the panel. When the user operates the specified DP, the usage records are displayed on the panel.

    For example, security alarm records and door unlocking records let users better understand the alarms and operating conditions of the devices.

Logs storage period

Free edition

On the Tuya Developer Platform, you can query device logs of the last seven days and show them on the panel.

Paid edition

Select a desired storage period depending on log types. Currently, available storage periods range from 1 month, 3 months, 6 months, 1 year, 2 years, to 3 years. Also, you can:

  • Extend the storage period for the specified DPs reported by devices.
  • Customize the log type and storage period you need to query.

Billing method

The device logs service counts monthly cumulative usage.

Editions

Edition Annual fee Monthly free quota Discount Reference number of devices and reported logs
Standard Edition USD1,500 USD150 17% off Support 10,000 devices. Up to 1,500 logs are reported by each device every day and stored for 1 month.
Premium Edition USD7,500 USD900 30% off Support 60,000 devices. Up to 1,500 logs are reported by each device every day and stored for 1 month.
Flagship Edition USD15,000 USD2,250 45% off Support 160,000 devices. Up to 1,500 logs are reported by each device every day and stored for 1 month.
  • The number of devices and number of reported logs in the above table are for reference only. The number of logs reported by different devices varies greatly every day, so you can calculate the number of logs as needed. For example, assuming that a device reports 15,000 logs per day, the basic edition of the device logs service enables you to store the logs generated by 1,000 devices.
  • If your usage exceeds the monthly free quota, you will need to pay for the overage on a pay-as-you-go basis. The bill is issued at the beginning of the next month. For more information about how to calculate the fees, see Billing Examples.

Fee breakdown

Billing item Data center Billing unit Unit price (USD)
Data writing All data centers Per million logs 0.21
Data storage All data centers Per million logs every day 0.003

Both the data writing fee and the storage fee are calculated on a monthly basis. If there are less than one million pieces of data, they are rounded up to one million pieces of data.

Billing example 1

Billing information Description
Selected edition Standard Edition
Number of logs of the month
  • 10 million logs are written every day, and the number adds up to 300 million logs every month.
  • 3 billion logs are stored every day.
Monthly fee
  • Writing fee: 300 million logs × USD0.21 per million logs = USD63
  • Storage fee: 300 million logs × 30 days × USD0.003 per million logs per day = USD27
Total fee USD63 + USD27 = USD90
Whether an additional fee is required The total fee USD90 is within the USD150 limit. No additional fees are billed.

Billing example 2

Billing information Description
Selected edition Flagship Edition
Number of logs of the month
  • 300 million logs are written every day, and the number adds up to 9 billion logs every month.
  • 20 billion logs are stored every day.
Monthly fee
  • Writing fee: 9 billion logs × USD0.21 per million logs = USD1,890
  • Storage fee: 20 billion logs × 30 days × USD0.003 per million logs per day = USD1,800
Total fee USD1,890 + USD1,800 = USD3,690
Whether an additional fee is required The total fee USD3,690 exceeds the USD2,250 limit. You need to pay an additional fee of USD1,440.

Subscription

  1. Visit and subscribe to the Logs Storage service.

  2. After you subscribe to the paid edition, contact Tuya’s customer service staff to get the panel debugging APIs of the paid edition.

    The free edition and paid edition offer different APIs for you to try out the panels.

View logs

  1. Log in to the Tuya Developer Platform.

  2. In the left navigation bar, choose Product > Device > Device Logs.

  3. Enter the device ID to query the logs of the last seven days. You can filter data by data point ID, log type, and log time.

    Device Log Service

    Field Description
    Time The time that is converted based on the selected time zone.
    Device event The type of log.
    Event name The name of the specified event. For logs of reporting and sending types, the specific data point (DP) functions are displayed.
    Event details The content of the specified log. For logs of reporting and sending types, this field indicates the content reported by a DP.
    Source Sources support the device itself, the cloud, the client, and third-party voice platforms.
    Source details The reason for triggering the event. For example, if the source is a third-party voice platform, the source details might be Alexa.

    By default, you can view the data of the last seven days. If you have subscribed to the device logs storage service, you can view log data for a longer period of time.

Log event and source

  • Software reset

    When a device is activated and paired successfully for the first time, the event is logged as a software reset in the cloud.

    Device Log Service

  • Hardware reset

    When the module Vcc is powered on and off or the RST pin is reset at a low level, and then powered on and connected to the network, the event is logged as a hardware reset in the cloud.

    Device Log Service

  • Heartbeat timeout (keepalive_timeout)

    After a module gets offline for more than three minutes, a heartbeat timeout (keepalive_timeout) event is logged in the cloud and the event name is offline. When the module is connected to the router again, the event is logged as online.

    Device Log Service

  • Offline less than three minutes

    When a device is offline for less than three minutes and connected to the network again, only the online events are logged. If the device is repeatedly connected to and disconnected from the unstable network, multiple online events are logged in the cloud.

    Device Log Service

  • Device reset

    If you remove a device from the app or restore the factory settings to make the device enter the pairing state, a device reset event is logged in the cloud. The detailed reason is specified in the source details column.

    Device Log Service

  • Device semaphore

    The larger the semaphore value, the better the signal quality. Refer to the following table for signal strength:

    Semaphore value Signal strength
    Less than or equal to -100 No signal
    Between -100 and -66 Poor signal
    Between -66 and -55 Normal signal
    Greater than -55 Good signal
    Equal to 99 Wired connection

Configure log data

If you want to configure the panel, contact Tuya’s customer service or account managers to get APIs. After you subscribe to the device logs service, you can get APIs of the paid edition.

FAQs

How to choose the editions of the device logs service?

A higher discount is provided for a higher service edition. However, pay attention to the real usage consumed by the devices. The fee is calculated based on the number of written logs and stored logs.

The standard edition, which costs USD1,500, can meet your requirements in any of the following cases:

  • Support 10,000 devices. Up to 1,500 logs can be generated for each device every day.

  • Support 100,000 devices. Up to 150 logs can be generated for each device every day.

You can make estimates based on the current number of devices and data reporting frequency, as well as the expected number of activated devices over the next year.

I have multiple products under one account. Do I need to subscribe to the service respectively for each of the products?

No.

After the subscription to the logs storage service, you can set up the logs storage rules under your IoT account for any product ID (PID) in any data center. Fees are calculated together by account.

What if I subscribe to the service multiple times?

Multiple subscriptions do not increase the quota of service editions, but the validity period is extended accordingly.

For example, if you subscribe to the standard edition of the service twice, you do not have a USD3,000 quota for this year, but the service is valid for 2 years with a USD1,500 quota each year.

How can I store only the data of certain DPs reported to the cloud and the DPs sent by the cloud?

Currently, you cannot choose the specified DPs on the Tuya Developer Platform to store respective log data. If you need any help, contact Tuya’s account manager or operations staff.