Skip to content

GetWirelessDeviceStatistics

Source: src/AWS/IoTWireless/GetWirelessDeviceStatistics.ts

Runtime binding for iotwireless:GetWirelessDeviceStatistics — read the bound wireless device’s operating information (last uplink time, RSSI/SNR gateway metadata, battery level, device state) from a deployed Lambda or Task.

Provide the GetWirelessDeviceStatisticsHttp implementation layer on the Function effect, bind the device in the init phase, then call the returned client at runtime.

// init
const getStats = yield* AWS.IoTWireless.GetWirelessDeviceStatistics(device);
// runtime
const stats = yield* getStats();
const lastSeen = stats.LastUplinkReceivedAt;
// on the Function effect:
// .pipe(Effect.provide(AWS.IoTWireless.GetWirelessDeviceStatisticsHttp))