This article comes from the official official account of the project: “AirtestProject” copyright statement: reprint is allowed, but reprint must retain the original link; Do not use for commercial or illegal purposes

preface

In recent years, large companies are in favor of building large scale equipment cluster in the enterprise, to facilitate them to carry out a variety of automated test practice. In addition, these device clusters come in different shapes, some are just built on ordinary racks, some are built on professional equipment cabinets.

(Figure 1: Various device clusters)

However, in the process of long-term use, we found that large-scale equipment cluster is online for a long time, so we have to face frequent battery bulge or battery aging and other problems.

(Figure 2: A phone with a bulging battery)

This will undoubtedly add significant maintenance costs to our cluster operations.

Causes of battery bulge or battery aging

So, what is the root cause of the frequent device battery shell problem? There are two main reasons:

  • ① The ambient battery temperature is too high
  • (2) Battery overcharge (long time charging)

1) The ambient battery temperature is too high

If the ambient temperature of the battery is too high, you can reduce the temperature of the space where the device cluster is located (usually the equipment room).

For example, you can use air conditioners, fans, and heat dissipation panels to lower the ambient temperature of the battery. Even we can also be equipped with remote temperature and humidity monitoring system, to monitor the environment temperature, temperature alarm in time to deal with.

(Figure 3: Temperature monitoring function of DeviceKeeper)

2) The battery is overcharged

It is more complicated to solve the problem of battery overcharge in the cabinet cluster. Devices on the cabinet are plugged with USB cables for a long time. Unless we power off the cabinet or remove the USB cables, the devices are powered on.

During the day, the device cluster is generally in working state. If you power it off at this time, it is easy to cause the device power shortage and the operation task failure.

It is very painful for the equipment manager to get up in the middle of the night to power off the equipment when there is no test task.

This section describes the intelligent power control system

Therefore, we need a set of intelligent power control system to achieve “remote” charge and discharge control of the cabinet cluster, and even “timed” charge and discharge management of the device to reduce the overcharge of the device and extend the life of the device battery.

In order to realize such an intelligent electric control system, we have carried out a lot of experiments, and finally successfully customized the “program-controlled version” of THE USB-Hub.

The device is connected to the hub through USB cable, and then we can remotely control the charging and discharging of the device on the hub through the program.

(Figure 4: Customized programmable hub)

In addition, during the experiment, we also realized the data transmission of the devices on the hub, that is, the operation of plugging and plugging of simulated USB through the program. This function is very significant to simulate USB plug and insert operation:

  • Firstly, it is convenient for device administrators to remotely maintain unstable devices in the cluster. Some devices are disconnected due to unstable data transmission. Administrators need to remove and insert devices on site to make them online. Here, direct program control is very convenient.
  • Secondly, it is convenient for some hardware testing, such as USB hot swap data stability test, can be carried out through the simulation of USB plug operation.

Finally, we integrated these functions into our device management system DeviceKeeper, so that it is very easy to perform remote batch charge and discharge management and simulate USB plug and plug operation for devices:

(Figure 5: Intelligent power control function of DeviceKeeper)

Intelligent electric control system demonstration

Here’s a simple video to see how the program controls the Hub in action:

summary

In a traditional cabinet, the heat dissipation is insufficient and the device stays online for a long time, which causes great damage to the battery of the device. The maintenance cost is relatively high, which increases the operating cost of the entire device cluster.

In addition, the cabinet with intelligent power control system and good physical heat dissipation measures can greatly reduce battery growth and aging, prolong the service life of cluster devices, and reduce the overall operating cost.


AirtestIDE download: airtest.netease.com/ Airtest tutorial website: airtest.doc.io.netease.com/ build enterprise private cloud service: airlab.163.com/b2b

Official Q group: 654700783

Ah, so serious all see here, help in the left side of the article click like and collection, give me a support, ash often thanks ~