diff --git a/decoders/connector/milesight/ct101/v1.0.0/payload.ts b/decoders/connector/milesight/ct101/v1.0.0/payload.ts index ff17738a..d41edf82 100644 --- a/decoders/connector/milesight/ct101/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ct101/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - // Helper functions to read different data types from the payload function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; diff --git a/decoders/connector/milesight/ct305-ct310/v1.0.0/payload.ts b/decoders/connector/milesight/ct305-ct310/v1.0.0/payload.ts index 7468c7b4..567ff68b 100644 --- a/decoders/connector/milesight/ct305-ct310/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ct305-ct310/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - // Helper functions for decoding function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; diff --git a/decoders/connector/milesight/em400-mud-lora/v1.0.0/payload.ts b/decoders/connector/milesight/em400-mud-lora/v1.0.0/payload.ts index a30289f2..4cb3b7fc 100644 --- a/decoders/connector/milesight/em400-mud-lora/v1.0.0/payload.ts +++ b/decoders/connector/milesight/em400-mud-lora/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; return value & 0xffff; diff --git a/decoders/connector/milesight/em400-mud-nb-iot/v1.0.0/payload.ts b/decoders/connector/milesight/em400-mud-nb-iot/v1.0.0/payload.ts index 640f9aa1..f3e6ce41 100644 --- a/decoders/connector/milesight/em400-mud-nb-iot/v1.0.0/payload.ts +++ b/decoders/connector/milesight/em400-mud-nb-iot/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - /** * Payload Decoder for Milesight IoT EM400-MUD * diff --git a/decoders/connector/milesight/em400-udl-lora/v1.0.0/payload.ts b/decoders/connector/milesight/em400-udl-lora/v1.0.0/payload.ts index a30289f2..4cb3b7fc 100644 --- a/decoders/connector/milesight/em400-udl-lora/v1.0.0/payload.ts +++ b/decoders/connector/milesight/em400-udl-lora/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; return value & 0xffff; diff --git a/decoders/connector/milesight/em400-udl-nb-iot/v1.0.0/payload.ts b/decoders/connector/milesight/em400-udl-nb-iot/v1.0.0/payload.ts index 9df4b996..48139781 100644 --- a/decoders/connector/milesight/em400-udl-nb-iot/v1.0.0/payload.ts +++ b/decoders/connector/milesight/em400-udl-nb-iot/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - /** * Payload Decoder for Milesight IoT EM400-UDL * diff --git a/decoders/connector/milesight/vs330/v1.0.0/payload.ts b/decoders/connector/milesight/vs330/v1.0.0/payload.ts index 8292dce1..4a42c0f7 100644 --- a/decoders/connector/milesight/vs330/v1.0.0/payload.ts +++ b/decoders/connector/milesight/vs330/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - interface DecodedData extends Pick {} function mileSightDeviceDecode(bytes: Buffer): DecodedData[] { diff --git a/decoders/connector/milesight/vs340/v1.0.0/payload.ts b/decoders/connector/milesight/vs340/v1.0.0/payload.ts index 8e9ce739..e0caa995 100644 --- a/decoders/connector/milesight/vs340/v1.0.0/payload.ts +++ b/decoders/connector/milesight/vs340/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - interface DecodedData { [key: string]: number | string; } diff --git a/decoders/connector/milesight/vs341/v1.0.0/payload.ts b/decoders/connector/milesight/vs341/v1.0.0/payload.ts index 8e9ce739..e0caa995 100644 --- a/decoders/connector/milesight/vs341/v1.0.0/payload.ts +++ b/decoders/connector/milesight/vs341/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - interface DecodedData { [key: string]: number | string; } diff --git a/decoders/connector/milesight/ws202/v1.0.0/payload.ts b/decoders/connector/milesight/ws202/v1.0.0/payload.ts index 1097e8da..89927b15 100644 --- a/decoders/connector/milesight/ws202/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ws202/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - interface DecodedData { [key: string]: number | string; } diff --git a/decoders/connector/milesight/ws203/v1.0.0/payload.ts b/decoders/connector/milesight/ws203/v1.0.0/payload.ts index 280405c3..c7be9b2e 100644 --- a/decoders/connector/milesight/ws203/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ws203/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; return value & 0xffff; diff --git a/decoders/connector/milesight/ws302/v1.0.0/payload.ts b/decoders/connector/milesight/ws302/v1.0.0/payload.ts index 5eb1b165..67b81516 100644 --- a/decoders/connector/milesight/ws302/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ws302/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - function readFrequencyWeightType(type: number): string { switch (type) { case 0: diff --git a/decoders/connector/milesight/ws523/v1.0.0/payload.ts b/decoders/connector/milesight/ws523/v1.0.0/payload.ts index d61716bc..5b8d3e8b 100644 --- a/decoders/connector/milesight/ws523/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ws523/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - /* ****************************************** * bytes to number ********************************************/ diff --git a/decoders/connector/milesight/ws558/v1.0.0/payload.ts b/decoders/connector/milesight/ws558/v1.0.0/payload.ts index 822bb59f..ce38275c 100644 --- a/decoders/connector/milesight/ws558/v1.0.0/payload.ts +++ b/decoders/connector/milesight/ws558/v1.0.0/payload.ts @@ -1,7 +1,3 @@ -import { DataToSend } from "@tago-io/sdk/lib/types"; - -declare let payload: DataToSend[]; - function readUInt16LE(bytes: Buffer): number { const value = (bytes[1] << 8) + bytes[0]; return value & 0xffff; diff --git a/decoders/connector/milesight/wt201/v1.0.0/payload.ts b/decoders/connector/milesight/wt201/v1.0.0/payload.ts index 55685fd9..2281cde7 100644 --- a/decoders/connector/milesight/wt201/v1.0.0/payload.ts +++ b/decoders/connector/milesight/wt201/v1.0.0/payload.ts @@ -1,8 +1,3 @@ -import { Data, DataToSend } from "@tago-io/sdk/lib/types"; -import { parse } from "path"; - -declare let payload: DataToSend[]; - function handle_downlink_response(channel_type: number, bytes: Buffer, offset: number): { data: { [key: string]: any }; offset: number } { var decoded: { [key: string]: any } = {};