Node Red Plugin

Node Red Plugin

This guide provides an overview of the Zoho IoT plugin for Node-RED, designed to connect and communicate with a Zoho IoT Application. These nodes allow seamless integration by handling device communication configurations.

Upgrading to Version 1.0.7 : Credential Migration

Warning
Important: Devices configured in version 1.0.6 or earlier require a one-time credential migration after upgrading to version 1.0.7. Devices will not reconnect until the migration is completed. Updating the plugin or restarting Node-RED alone will not perform this migration.

Version 1.0.7 securely stores device configurations, certificates, and private keys in Node-RED's protected credential storage instead of regular flow properties.

Existing credentials will be reused during migration. You do not need to upload files again, recreate devices, or modify existing node configurations and connections.

Before Updating

  1. Schedule a maintenance window, as device connections may be interrupted.

  2. Take a backup of your flows, credential store, and encryption settings.
  3. Restrict access to the Node-RED editor and Admin API during migration.
  4. Ensure you are using a maintained Node-RED version. Node-RED 2.0.0 has a known credential-disclosure issue and must be upgraded before migration.
Migration Steps

1. Update the Plugin
  1. Update the Zoho IoT plugin to version 1.0.7
  2. Restart Node-RED in safe mode.
  3. Ensure the existing Node-RED user directory, settings, and credential store are preserved.
2. Open the Migration Wizard
  1. Reload the Node-RED editor and log in as an administrator.
  2. Select Review Migration from the Zoho IoT credential migration notification.
  3. Alternatively, select Zoho IoT Credential Migration from the main menu.
.      .    

3. Review Device Configurations
  1. The wizard displays the devices requiring migration.
  2. Review the number of credentials to migrate and any stale values to discard.
  3. Existing protected credentials take priority over legacy credentials.
  4. If there are unsaved changes, save or discard them before proceeding. Do not deploy legacy flows just to clear the warning.
      

4. Perform Migration
  1. Confirm that you have taken a backup and restricted access.
  2. Click Migrate and Deploy.
  3. The migration transfers credentials into protected storage, removes legacy credential properties, and verifies the migration.
  4. The process also deploys the saved flows and can restart device connections.
      
Notes
Note: Do not use the regular Deploy button as a replacement for Migrate and Deploy.
5. Verify Connections
  1. Once migration is successful, the editor reloads automatically.
  2. A migration-verified notification will appear.
  3. Verify that all devices reconnect successfully.
  4. Restart Node-RED normally and confirm that device connections are working before restoring normal editor and Admin API access.

Warning
If Migration Fails

  1. Keep editor and Admin API access restricted.
  2. Review the reported error.
  3. Check the current deployment state before retrying, as migration may have completed even if verification was interrupted.
  4. Do not delete device configurations or remaining credential data.
  5. If devices remain disconnected after successful migration, check their Node-RED status and connection logs.

Info
Additional Information

  1. New device configurations created in version 1.0.7 automatically use protected credential storage.
  2. Migration is required only once for existing devices.
  3. Restoring or importing older flow configurations may require migration again.
  4. Historical backups, exports, project history, and previously opened editor tabs may still contain sensitive credentials.
  5. If unauthorized access is suspected, rotate device tokens or reissue private keys.

Node Overview

Zoho IoT PUBLISH Node
The Zoho IoT node is used to connect with the created IoT Device in the Zoho IoT Application.
 
Zoho IoT Command Node
The Command node subscribes to the device command topic on the Zoho IoT Application, allowing your Node-RED flow to receive command data from your IoT devices.

Zoho IoT Command ACK Node
The Command ACK node publish the the acknowledgement message to the IoT device for the given Command execution.

Installation 

To install the Zoho IoT plugin in Node-RED, follow these steps:
  1. Open Node-RED: Launch your Node-RED instance in a browser.
  2. Navigate to Manage Palette:
    • Click on the menu in the top-right corner of the Node-RED editor.
    • Select "Manage palette" from the dropdown. 

  1. Install the Zoho IoT Plugin:
    • Go to the "Install" tab in the Manage Palette window.
    • In the search bar, type "zoho-iot".
    • Locate "node-red-zoho-iot" in the search results.
    • Click the "Install" button next to the plugin.

4.Verify Installation: Once installed, you should see the Zoho IoT nodes in the left sidebar under the nodes section.
 

Detailed Node Descriptions

Zoho IoT Device instance Configuration Node

Credential File: Device Credential File downloaded from Device Connection details page

Connection Type: Device Connection type in Zoho IoT Application,


1.Security Token With TLS

2.Client Certificate With TLS

3.Security Token Without TLS

SECURITY TOKEN WITH TLS:

-Credential File

-Root CA File

CLIENT CERTIFICATE WITH TLS:

-Credential File

-Root CA File

-Client Certificate File

-Private Key File

SECURITY TOKEN WITHOUT TLS:
-Credential File

Nodes Usage

Prerequisites:

  1. Zoho IoT Application
  2. Device Instance in Zoho IoT
  3. Download the device credential file from the device’s Connection Details tab. This file is required for all connection types. A Root CA file is additionally required for Security Token with TLS and Client Certificate with TLS, but not for Security Token without TLS.

    For Client Certificate with TLS, also provide the client certificate and private key described below.

    If you are new to Zoho IoT Application, please refer to this link below for creating your first Zoho IoT Application,
    Once You got your Zoho IoT Application ready, start creating your First Device to connect with your node-red to publish your data to Zoho IoT. You can also create a device using Direct API Endpoint to onboard node-red application as a Virtual Device.


  4. Zoho IoT Device Credential File & Root CA File

    You can download your device credential and Root CA File from the Device Page under the Connection Details Tab.





  5. Client Certificate File and Private Key File (For Client Certificate TLS)

    If you created a Device with Authentication type of (Client Certificate with TLS), you can create your new certificate or associate the existing one. Where you are prompted to download the Client Certificate and Private Key File. While Creating a new certificate, you can choose your policy type, Once you created your Certificate, you are prompted to download all the necessary files for the connection, which cannot be retrieved later.





Setting Up Device Instance Configuration 

Drag the Zoho IoT node onto your workspace, add a new Device Instance with the credential file, Root CA File downloaded from Zoho IoT Device Page, along with the required Connection type, to Publish the data, and to receive and acknowledge the commands.

Publishing the Data to Zoho IoT (ZOHO IOT PUBLISH NODE)

Once the Device Instance is added, we can use the device instance to publish the data to Zoho IoT. The Zoho IoT Node has the Single Input pin to inject our data, which is further published to your configured Zoho IoT Device Instance. 

Set msg.payload to a JSON object containing the data to publish. JSON-encoded strings, arrays, and null values are not accepted. If the input contains a JSON string, convert it to an object using a Node-RED JSON node before passing it to the Publish node.




Subscribing Commands From Zoho IoT Device (ZOHO IOT COMMAND NODE)

Zoho IoT Command Node, used to subscribe to the Command Topic of the selected device instance and pass it to the next node in the flow. When the Command node receives a command, it forwards the command data to the next node in the flow. It also automatically publishes an acknowledgement with status code 1001 and response text “Successfully executed.” This automatic acknowledgement does not verify whether downstream command processing actually succeeded.





Command Acknowledgement to Zoho IoT Device(ZOHO IOT COMMAND ACK NODE)

Zoho IoT Command ACK Node, used to publish the command acknowledgement to the received command from the Zoho IoT Device. We can choose the acknowledgement type from the drop down list, it will automatically map with the Command ACK Code to acknowledge the Device.
 
 

EXAMPLE FLOW USAGE