Skip to content

Drive Asset

smartreport.v3.reports.drives.asset.sections.asset_details.AssetDetailsSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Asset details section.

The section is made of 3 tables:

  • Drive and customer details
  • Monitoring details
  • Fault time overview

It ends with a page break.

Details

Drive and customer details table has 12 rows: Location, Customer device name, Customer equipment ID, Application type, Life cycle status, Type code, Serial number, Country, Site, Commissioning, Warranty valid until. Data to fill this table is taken from the CMD Drive details and Report API drive nameplate.

Monitoring details table has 3 rows: Monitoring period , gateway version and Environmental sensors. Monitoring period shows the start and end date of the report. Gateway version informs about the version of gateway. Environmental sensor shows if the drive has the sensor or not.

Fault time overview table shows information about total time spent in fault time, and the time not available on the network. It's calculated based on the Drive Status KPI details.

Settings

Bases: Settings

Attributes:

Name Type Description
REMOVE_EMPTY_VALUES bool

If true, then the table rows with empty values are not displayed.

calculate_no_data_time(df)

Calculate the time not available on network

make_fault_time_overview_table(drive_asset)

It is based on drive status KPI

smartreport.v3.reports.drives.asset.sections.climatic_conditions.ClimaticConditionsSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Climatic Condition KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The sensor is present). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

For the expert version, there is a scatter plot of temperature vs humidity with limits and KPI values. It is done using the plot_climatic_condition_kpi_scatter function.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

add_expert_climatic_condition_plots(df, drive_asset)

Add expert plots for climatic conditions.

That is a scatter plot of temperature vs humidity with limits and KPI values.

There is a separated plot for each month of the reporting period

Parameters:

Name Type Description Default
df DataFrame

Dataframe with climatic conditions KPI

required

smartreport.v3.reports.drives.asset.sections.current_overload.CurrentOverloadSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Current Overload KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

smartreport.v3.reports.drives.asset.sections.dc_voltage.DcVoltageSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report DcVoltage KPI details sections; namely DcVoltage graph, DcVoltage events, Explanation events.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

smartreport.v3.reports.drives.asset.sections.deionizer.DeionizerIndicatorSection

Bases: DriveAssetReportSection

Creates a DeionizerIndicator KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The drive is of ACS800, ACS880 or ACx580 type). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

is_supported(drive_asset)

smartreport.v3.reports.drives.asset.sections.drive_air_temperature.DriveAirTemperatureSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Air Temperature KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The sensor is present). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

HEADING str

Heading for the section.

USE_HIGH_THRESHOLD_FROM_DF str

If True, then the high threshold values are taken from the DataFrame.

create(drive_asset)

is_supported(drive_asset)

Checks if the section is supported for the given drive asset. The section is supported if the drive asset supports the Air Temperature KPI. Returns: bool: True if the section is supported, False otherwise.

smartreport.v3.reports.drives.asset.sections.drive_events.DriveEventsSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Drive Events KPI details sections; namely Protection events, Operational events, Other events.

Each one of these sections has the same structure: an introduction text, followed by a timeseries traffic light bar and a table with summary statistics about events of the category in the reporting period.

Before each subsection a general text for Drive Events is shown.

Details For each sub-section:

First it reads the data for Drive Events KPI from Drive Asset object. Based on that it creates the timeseries traffic light bar.

Finally, a table is created that shows the summary statistics for the whole reporting period.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

smartreport.v3.reports.drives.asset.sections.drive_status.DriveStatusSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Drive Status KPI details section.

The section is made of introduction text, two donut charts, and a table with overview of time spent in abnormal states.

Details

First it reads the data for Drive Status KPI from Drive Asset object. Based on that it creates two donut charts. One that shows the distribution of time with data and no data. And the second one that shows the distribution of time spent in different drive statuses.

Finally, a table is created that shows the time spent in abnormal states.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

clean_up_extended_data(df) staticmethod

When data frame is naively extended all extended rows are filled with nans.

To clean it up we need to apply following rules, for all extended rows: 1. Set KPI column nans to ConditionKPI.NO_DATA 2. Set NoData column nans to expected interval in seconds (24h = 86_400 s) 3. Set all remaining numeric columns to 0

create(drive_asset)

smartreport.v3.reports.drives.asset.sections.environment_humidity.EnvironmentHumiditySection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Environment Humidity KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The sensor is present). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

smartreport.v3.reports.drives.asset.sections.environment_temperature.EnvironmentTemperatureSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Environment Temperature KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The sensor is present). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

is_supported(drive_asset)

Checks if the section is supported for the given drive asset. The section is supported if the drive asset supports the Environment Temperature KPI. Returns: bool: True if the section is supported, False otherwise.

smartreport.v3.reports.drives.asset.sections.introduction.IntroductionSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report introduction section.

The section is made of a heading and the introduction text.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

ADD_PAGE_BREAK bool

If True, a page break is added after the introduction section.

smartreport.v3.reports.drives.asset.sections.kpi_overview.KpiOverviewSection

Bases: CommonKpiOverviewSection

Creates a Drive Asset Report KPI overview section.

The section is made of introduction text, and collection of donut charts for each KPI. Donut charts are displayed in two columns.

Details

Each donut chart figure is created using the make_kpi_overview_donut_figure method. First, it reads the data for the given KPI from the DriveAsset, then it cleans the data and enhance it with data annotations for not supported drives. If KPI is not supported nor present then the figure will show 100% of the data as "Not supported" or "No data" respectively.

Finally, the figures are added to the report document in two columns layout.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

SUPPORTED_KPIS Dict[str, str]

List of dictionaries with KPI and plot title.

HEADING str

Heading for the section.

is_kpi_supported(entity, kpi_id)

Check if the given KPI is supported by section.

smartreport.v3.reports.drives.asset.sections.power_module_temperature.PowerModuleTemperatureSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Power Module Temperature KPI details section.

The section is made of introduction text, and a trend plus kpi plot.

Details

After adding an introduction text, the section logic checks if the KPI is supported by the drive. (The drive is of ACS800, ACS880 or ACx580 type). If not then the empty plot with "KPI not supported" text is added to the report.

If the KPI is supported it tries to get the KPI data from DriveAsset object. If the data is missing then the empty plot with "No data" text is added to the report.

Finally, a plot_kpi_timeline function is used to create the plot, which is added to the report document.

Settings

Bases: Settings

Attributes:

Name Type Description
INTRODUCTION TEXT

Custom introduction text to be used. If not provided, then the default text, specific for a given asset type, is used.

create(drive_asset)

smartreport.v3.reports.drives.asset.sections.report_overview_table.ReportOverviewTableSection

Bases: DriveAssetReportSection

Creates a Drive Asset Report Overview Table section.

This section adds a first page table the following rows:

  • Asset name (from drive nameplate)
  • Drive serial number (from drive nameplate)
  • Monitoring period (from report parameters)
  • Report creation date (automatic or user provided)

Settings

Bases: Settings

Attributes:

Name Type Description
SHOW_POWERTRAIN_LINK bool

If true, then the link to asset details in the Powertrain portal is added under the table. Default: True

REPORT_TIME Optional[datetime]

Date of report generation. If empty, then the utcnow is used.

create(drive_asset)

Adds the Report Overview Table Section. It adds table with asset and report overview, followed by links to asset details page in the portals.