English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development Platform

App development platform provides multiple development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex
DocumentationData CenterDevice Log Service

Device Log Service

Last Updated on : 2021-07-27 07:15:12download

What is Log Service?

The device log storage service provides the near real-time record and long-term storage of data usage of online activated devices, and thus safely and flexibly improves the capability of data operation.

Note: The device log is the device usage record sorted by time. This service can store the logs of online activated devices on the Tuya IoT Platform > Product > Device Logs. You can view the logs in real-time after your subscription.

Scenarios

Business customer—24h device experience

It allows you to precisely track the actual conditions of devices and consumables, so as to provide timely care for users including device maintenance and consumable replacement. You can also retrace the scene by checking the device logs to help locate and troubleshoot problems when feedback problems are raised by users.

End-user—logging displayed on the panel

End users can customize the data point (DP) records that need to be displayed on the panel. When users operate a specific DP, relevant operation records will be displayed on the panel. For example, security alert records and door unlocking records help users track alerts and the operation status of the device.

Note: By default, a seven-day free version is provided. You can customize the log storage period by subscribing to value-added services.

Differences between the free version and the paid version

In terms of the free version, you can only query seven-day logs on the Tuya IoT Platform, and the panel also displays logs for the last seven days.
In terms of the paid version, you can select the storage periods for different types of logs and extend the storage periods for some reported DPs. Besides, you can set the log types and storage periods for queries as needed.

Note: The APIs of the free version and the paid version are different. If the paid version is activated, contact our customer service to get the API of the paid version.

Product pricing

Billing method of the paid version

Billing period

The log service calculates the number of writing and storage items of each device on a daily basis. The amount over the threshold is settled according to the usage.

Billing components

Billing items Description Billing formula
Device lifetime usage fee After the device is activated, a one-time fee for the lifetime usage of the device is charged, and usage within the daily free writing and storage quota is free for life. The unit price is determined according to the first-level category and storage period of the device
Overage writing fee An overage fee is charged for the writing items over the daily writing threshold for each device. (Number of daily writing items – daily free writing quota) × unit price for each writing item
Overage storage fee An overage fee is charged for the storage items above the daily storage threshold for each device. (Number of daily storage items – daily free storage quota) × unit price for each storage item

After the device is activated, a one-time fee for the lifetime usage of the device is charged. Usage within the daily writing and storage quota is free, while the amount over the daily writing and storage quota is calculated daily and charged monthly.

The unit price of a device is determined according to the first-level category and log storage period of the device. Different writing and storage quotas are set for different categories and storage periods. See the table below for details:
Device Log Service
The amount over the quota is calculated individually in terms of writing and storage. It is shown as follows:

Device Log Service

Note: For most products, the free quota can meet your needs and the overage fee is almost negligible. In case some products generate too many logs, you can reduce daily writing and storage items by opting for certain log types to cut the cost.

Billing example

Example 1: 100 devices in the general categories are activated daily with 900 writing items and 20,000 storage items each, and the storage period is one month.

The daily cost is 100 × 1 + 0 + 0 = CNY100. See the table below for details:

Billing items Description
Device lifetime usage fee For a storage period of one month, the unit price of lifetime usage for a device in a general category is CNY1. Therefore, the daily cost is 100 × 1 = CNY100.
Overage writing fee No overage fee is charged as the number of the writing items of each device are within the quota of 1,000 items.
Overage storage fee No overage fee is charged as the number of the storage items of each device is within the quota of 30,000 items.

Example 2: A total of 10,000 devices in the general categories are activated with 1,100 writing items and 31,000 storage items each, and the storage period is one month.

The daily cost is 0 + 1.4 + 0.013 = CNY1.413. See the table below for details:

Billing items Description
Device lifetime usage fee No overage fee is charged as no new devices are activated.
Overage writing fee A total of 10,000 devices with 100 writing items above the quota each. The overage fee is 10,000 × 0.0000014 × (1,100-1,000) = CNY1.4
Overage storage fee A total of 10,000 devices with 1000 storage items above the quota. The overage fee is 10,000 × 0.0000000013 × (31,000-30,000) = CNY0.013

Use price calculator

On the Logs Storage Service page, click Price calculator.

Device Log Service

Select a product and storage period after entering the Price calculator page. You can see the Average number of newly activated devices per day in the last seven days, the Average number of above-quota items per day, and the Average number of above-quota storage items per day. You can enter a proper number to calculate. Click Start calculating and you can see the daily cost.

Device Log Service

FAQ

1. Why is the billing fee so high in the first month after subscription?

The subscription for the first time is not charged. The bill for the first month covers not only an overage fee of the above-quota writing and storage items, but also the lifetime usage fee of all the activated devices concerning a product. From the second month, the bill only covers the lifetime usage fee of newly activated devices and an overage fee of above-quota writing and storage items in the same month.

For example:

One-month storage period is chosen for a product in the general category which owns 1000 activated devices. 100 new devices are activated in the present month and no device is activated in the second month… The numbers of daily writing items and daily storage items are 900 and 20,000 respectively for each device. Only the lifetime usage fee is charged since the numbers of writing and storage items are below the quotas.

The fee for the first month: (10000 + 100) × 1 = CNY10,100

The fee for the second month is 0 as no new devices are activated.

2. What are the prerequisites for the device log storage service?

The device log storage service can be subscribed to for all products that have been mass-produced and sold on the market.

3. What are the options for the storage periods of the device log?

Currently, the options are one month, three months, six months, one year, two years, and three years.

4. How can I extend the storage period of Report DP?

On the Logs Storage Service page, after you select a product, select Report in the General configuration list, and you will see DP configuration. Then you can extend the storage periods of some DPs. As is shown below, after configuration, you can see 3-month logs of two DPs—Switch and Spray. Device Log Service

Note: The Report in General configuration is the report status of all the DPs, and the DP configuration below is the storage period status of some DPs. The larger value between the two is taken as the storage period. For example, when the period of the Report in General configuration is three months and the period of the DP configuration below is one month, the storage period of all the DPs is still three months.

5. How can I stop being billed?

You can contact customer service to cancel the service. After the fee is cleared, the service will be canceled in seven working days.

Warning: If the service is canceled, the logs older than seven days will be deleted irrecoverably. And the device activation fee will be charged again the next time you subscribe to the service.

Product usage

View the device logs on the Tuya IoT Platform

Log in to the Tuya IoT Platform, and select Product > Device > Device Logs in the left navigation bar to enter the Log query page.

Enter the device ID to search for the logs of the last seven days by default. You can filter logs by DP ID, log type, and period.

The fields are described as follows:

Field Description
Index Sort the logs according to the log generation time in descending order.
Time The time converted according to the selected time zone.
Device event Log types.
Event name Specific event names. The logs of report and send types indicate specific DPs.
Event details Content of logs. If the log type is report or send, the report content is the content of a specified DP.
Source It is currently divided into the device itself, the cloud, the client, and the third-party voice platform.
Source details The cause that triggers the event. For example, if the source is a third-party voice platform, the source detail might be Alexa.

Note: You can view the data of the last seven days by default. If you have subscribed to the storage service, you can view the log data for a longer period.

Events and source details

Software reset
A device is activated and paired successfully for the first time. This event is recorded as software reset.

Device Log Service

Hardware reset
The module VCC is powered on or off, or the RST pin is reset at a low level and then powered on and connected again. The event is recorded as hardware reset. Device Log Service

Keepalive timeout
If the module is offline for more than three minutes, the cloud will generate a keepalive_timeout log. The event is recorded as Offline. And it will record Online when the device is connected to the router again. Device Log Service

Less-than-three-minute offline time
If the module is offline and then connected again within three minutes, the log will only record the online time. If the module keeps connecting and disconnecting in an unstable network, the cloud will generate multiple online records. Device Log Service

Device reset
The device is pending for pairing after the device is removed or restored to factory defaults. The cloud records the event as Device reset and shows the detailed reason in the column of source details. Device Log Service

Device semaphore

A larger value of the device semaphore represents a better signal. Refer to the table for the 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.
Larger than -55 Good signal.
Equal to 99 Wired connection.

Configure log data on the panel

Contact customer service or business manager to configure the panel. You can get paid APIs if you have subscribed to the log service.

Subscription process

For more information, see Service Subscription Process.