Back

Topic

[KB1239]Get SOFREL LogUP data in PcVue using REST API and LX CONNECT platform

Tags: Provider, Rest, Web Services

2 months ago
By PADJ
Options
Print
Applies to:
PcVue 16.2 onwards
Summary:
This article shows how to configure PcVue to retrieve data from SOFREL’s “LogUP” DataLogger using the REST API and LX CONNECT platform. The data can be archived using a SQL database or a proprietary type archive.
Details:

This exchange with the LX CONNECT platform is possible thanks to PcVue’s REST Provider.

Note that the use of the Provider is subject to an option on the license.

Download and install the latest version of the Provider proposed in this article.

Follow the instructions given in the article on how to install ADO.Net Providers to install this Provider.

The steps are as follows:

  1. Declare a connection in PcVue,

Go to General -> Data connections -> Add SQL connection

Select the data source “Built-in providers”,

Then select the data provider “. NET Framework Data Provider for REST”:

REST API CONNEXION

Finally, go to the second tab (Built-in) to configure the connection as below:

REST API CONNEXION 2
REST API CONNEXION 2
REST API CONNEXION 3
REST API CONNEXION 3

Legend:

      5: https://lxconnect-ihm.sofrel.com/auth/realms/Lxconnect/protocol/openid-connect/token

      6: your ClientID received from SOFREL: Example in my case PCVue-STC

      8: your ClientSecret received from SOFREL

      9: https://lxconnect-ihm.sofrel.com/lxc-as-appm/lxconnect/api/

The LX CONNECT platform has two versions of APIs to retrieve data.

The v1 API allows you to:

• Retrieve list of all devices

• Retrieve information from a device

• Retrieve a device configuration

• Retrieve archives with Unix date format

The v2 API allows you to:

• Retrieve archives in ISO8601 date format

2. Create SQL Read query

Retrieve equipment list

REST API QUERY All DEVICES
REST API QUERY All DEVICES

Select * from [get_v1/devices]

QUERYSTRING(“deviceType=LogUp“)

Retrieve information from an equipment

Select * from [get_v1/devices/9fec58d9-c7a6-4e48-974d-77352f2345c9]

QUERYSTRING(“deviceType=LogUp”)

Note: 9fec58d9-c7a6-4e48-974d-77352f2345c9 = deviceUID retrieved from previous query result

Retrieve configuration of an equipment

Select * from [get_v1/devices/9fec58d9-c7a6-4e48-974d-77352f2345c9/configuration]

QUERYSTRING(“deviceType=LogUp”)

Retrieve telemetry archives of equipment in Unix timestamp format

Select * from [get_v1/devices/9fec58d9-c7a6-4e48-974d-77352f2345c9/telemetry/AI_1_SCALING_VALUE]

QUERYSTRING(“deviceType=LogUp&startTimestamp= 1733907061000000&endTimestamp= 1733907961000000“)

Note: AI_1_SCALING_VALUE is a «telemetryName» obtained from the result of the previous query on the configuration. The correct start and end date will be required.

PcVue tolerates a maximum of 5000 cells as a result of a read query with SQL connections. Please play on the time interval to stay in this constraint.

Retrieve telemetry archives of an equipment in ISO8601 format (Remember this work with V2 of API)

Select * from [get_v2/devices/9fec58d9-c7a6-4e48-974d-77352f2345c9/telemetry/AI_1_SCALING_VALUE]

QUERYSTRING(“deviceType=LogUp&startDateTime=2024-12-23T08:51:00.000Z&endDateTime=2024-12-23T09:06:00.008Z“)

3. Retrieval of all archives from the LX CONNECT platform

The LX CONNECT platform only stores data from the last three months.

To retrieve all archive data from the platform, you can refer to KB1105 : Repeat Query for Sql variables.

Attached fileDescription
sv-adonet-provider_Rest_1.0.667.zipVersion 1.0.667 of REST provider
Provider Rest – GuideLine – draftThe documentation

Created on: 13 May 2025 Last update: 24 May 2025