github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/content/en/docs/plugins/uptime.md (about)

     1  
     2  ---
     3  title: "Uptime"
     4  linkTitle: "uptime"
     5  date: 2021-10-20
     6  description: >
     7    
     8  ---
     9  
    10  {{< figure src="/smart-home/uptime1.png" width="300" >}}
    11  
    12  &nbsp;
    13  
    14  &nbsp;
    15  
    16  In the **Smart Home** system, there is a plugin called "uptime" that allows displaying the parameters related to the system and application uptime. This plugin provides access to the following parameters:
    17  
    18  1. `total`: The `total` parameter displays the total uptime of the system or application. It indicates the amount of time that has passed since the start.
    19  
    20  2. `app_started`: The `app_started` parameter indicates the application's start time. It shows the date and time when the application was launched or restarted.
    21  
    22  Here's an example of using the "uptime" plugin to retrieve uptime parameters:
    23  
    24  ```javascript
    25  const uptimeParams = EntityGetAttributes('uptime.uptime')
    26  console.log(uptimeParams.total);
    27  console.log(uptimeParams.app_started);
    28  ```
    29  
    30  You can use these parameters to display information about the system or application uptime in your **Smart Home** project.