@wapice/node-red-contrib-iot-ticket-connector 0.2.3

Node-RED node for IoT-TICKET Connector

npm install @wapice/node-red-contrib-iot-ticket-connector

Node-RED IoT-TICKET Connector

status npm version

A Node-RED node for connecting to IoT-TICKET platform to fetch and send data.

License

This Node-RED node is provided by Wapice Ltd. and is intended for use only in connection with the IoT-TICKET product.

The source code is publicly available, but the software is not open source. Use, modification, or redistribution outside the IoT-TICKET product requires prior written permission from Wapice Ltd.

See LICENSE file for full terms.

Installation

Install via npm:

npm install @wapice/node-red-contrib-iot-ticket-connector

Or copy the files to your Node-RED nodes directory.

Usage

Mode is determined by msg.mode ("Fetch" or "Send").

Output Configuration

The node has 4 outputs that are dynamically enabled based on node configuration:

  • Output 1: Fetch mode - Raw JSON response from API
  • Output 2: Fetch mode - Parsed single value (only sent if single attribute and single value requested)
  • Output 3: Send mode - Success confirmation message
  • Output 4: Send mode - Received command messages (only if "Subscribe to Commands" is enabled)

Fetch Mode

Enable Fetch Mode in node configuration to use this mode.

Input message:

  • msg.mode = "Fetch"
  • msg.attributeIds (array or string) - Attribute IDs to fetch
  • msg.numValues (number, default 1) - Number of historical values to retrieve

Outputs:

  • Output 1 (always): Raw JSON response containing all requested data
  • Output 2 (conditional): Parsed value extracted from the response. Only sent when:
    • Single attribute ID is requested, AND
    • Single value (numValues = 1) is requested

Configuration Requirements:

  • Server address
  • OAuth2 Realm
  • API Username
  • API Password

Send Mode

Enable Send Mode in node configuration to use this mode.

Input message:

  • msg.mode = "Send"
  • msg.payload (object) - Data to send (will be converted to JSON)
  • msg.type (string, default "telemetry") - Message type: "telemetry" or "event"

Outputs:

  • Output 3 (always): Success confirmation message with structure:
    {
      "success": true,
      "topic": "<topic>",
      "type": "<message-type>"
    }
    
  • Output 4 (conditional): Received command messages. Only sent when "Subscribe to Commands" is enabled. Message structure:
    {
      "topic": "<command-topic>",
      "payload": "<command-data>",
      "mode": "Command"
    }
    

Configuration Requirements:

  • Server address
  • MQTT Port (default 8883)
  • CA Certificate (PEM format)
  • Organization ID
  • MQTT Username
  • MQTT Password
  • Device ID

Optional Configuration:

  • Subscribe to Commands - Maintains persistent MQTT connection to receive command messages

Command Reception

When "Subscribe to Commands" is enabled in Send Mode, the node maintains a persistent MQTT connection and subscribes to:

command/<organization-id>/<device-id>/req/#

Received command messages are output on Output 4 with the following structure:

{
  "topic": "command/<organization-id>/<device-id>/req/<command-name>",
  "payload": "<command-data>",
  "mode": "Command"
}

This requires both Send Mode to be enabled AND "Subscribe to Commands" checkbox to be checked in node configuration.

MQTT Topics

  • Telemetry: telemetry/<organization-id>/<device-id>
  • Events: event/<organization-id>/<device-id> (QoS 1)
  • Commands: command/<organization-id>/<device-id>/req/# (subscription)

Node Info

Version: 0.2.3
Updated 1 month ago
License: SEE LICENSE IN LICENSE
Rating: not yet rated

Categories

Actions

Rate:

Downloads

270 in the last week

Nodes

  • iot-ticket-connector

Keywords

  • node-red
  • iot-ticket

Maintainers