getDpsInfos(params: IGetDpsInfos)

Requires:
@ray-js/ray≥1.5.2

Description

Get all DP information for a device, typically to retrieve DP names, used with updateDpName

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<IGetDpsInfosResponse[]>
Array of DP info; each item contains code, dpId, value, time, type, name

Examples

Basic usage

import { getDpsInfos } from '@ray-js/ray';

getDpsInfos({
  devId: 'vdevo169477319679442',
  gwId: 'vdevo169477319679442',
}).then((res) => {
  console.log('DP info:', res);
}).catch((error) => {
  console.error(error);
});