TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Class Network

    Network connector operations

    This class provides functionality for managing network connectors in TagoIO, including device management, data processing, and network-specific operations. Used primarily for building custom network integrations and connectors.

    import { Network } from "@tago-io/sdk";

    const network = new Network({
    token: "your-connector-token",
    details: { connector_id: "connector-id" }
    });

    const info = await network.info();
    const devices = await network.deviceList();
    Index

    Constructors

    Methods

    • Create or edit param for the Device in network

      Parameters

      • deviceID: string

        Device ID

      • configObj: Partial<ConfigurationParams>

        Configuration Data

      • OptionalparamID: string

        Parameter ID

      Returns Promise<string>

    • Publish a message to the MQTT relay

      Parameters

      • options: {
            device: string;
            message?: string;
            qos?: number;
            retain?: boolean;
            topic: string;
        }

        Options for publishing the message

        • device: string

          The device to publish to

        • Optionalmessage?: string

          The message to publish (optional)

        • Optionalqos?: number

          Quality of Service level (optional)

        • Optionalretain?: boolean

          Whether to retain the message (optional)

        • topic: string

          The topic to publish to

      Returns Promise<string>

      A promise that resolves when the message is published

    • Get a valid token using token serie

      Parameters

      • serieNumber: string
      • Optionalauthorization: string

      Returns Promise<string>