{"id":26177,"date":"2025-06-25T12:20:19","date_gmt":"2025-06-25T19:20:19","guid":{"rendered":"https:\/\/tdengine.com\/?p=26177"},"modified":"2025-09-08T16:34:42","modified_gmt":"2025-09-08T23:34:42","slug":"build-smarter-iot-workflows-with-tdengine-and-node-red","status":"publish","type":"post","link":"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/","title":{"rendered":"Build Smarter IoT Workflows with TDengine and Node-RED"},"content":{"rendered":"\n<p>When it comes to wiring together hardware devices, APIs, and online services, few tools match the simplicity and flexibility of <a href=\"https:\/\/nodered.org\/\" rel=\"noopener\">Node-RED<\/a>. As a flow-based development tool, it\u2019s particularly popular in the IIoT space, where edge devices and sensors constantly generate time-series data.<\/p>\n\n\n\n<p>In this post, we\u2019ll walk through how to integrate Node-RED with TDengine and build a simple application for real-time alerts.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #141414;color:#141414\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #141414;color:#141414\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#Video\" >Video<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#Integrate_TDengine_with_Node-RED\" >Integrate TDengine with Node-RED<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#Example\" >Example<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#1_Set_Up_TDengine\" >1. Set Up TDengine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#2_Add_Writer_Nodes\" >2. Add Writer Nodes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#3_Simulate_Device_Data\" >3. Simulate Device Data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#4_Add_Output_Monitor\" >4. Add Output Monitor<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#5_Query_Data\" >5. Query Data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/tdengine.com\/build-smarter-iot-workflows-with-tdengine-and-node-red\/#6_Subscribe_to_Overload_Data\" >6. Subscribe to Overload Data<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"Video\"><\/span>Video<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"gb-element-ce357cee\">\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Time-Series Database Essentials: Using Node RED and TDengine for Industrial Monitoring\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/9IHI1IyDHRw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n<\/div>\n\n\n\n<h2 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure that TDengine and taosAdapter are running.<\/li>\n\n\n\n<li>Install Node-RED version 3.0.0 or later. For more information, see the <a href=\"https:\/\/nodered.org\/docs\/getting-started\/\" rel=\"noopener\">official documentation<\/a>.<\/li>\n\n\n\n<li>Install the TDengine <a href=\"https:\/\/www.npmjs.com\/package\/@tdengine\/websocket\" rel=\"noopener\">Node.js client library<\/a>.<\/li>\n\n\n\n<li>Install the TDengine <a href=\"https:\/\/www.npmjs.com\/package\/node-red-node-tdengine\" rel=\"noopener\">Node-RED plugin<\/a>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"Integrate_TDengine_with_Node-RED\"><\/span>Integrate TDengine with Node-RED<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once you have installed the Node-RED plugin, TDengine Operator and TDengine Consumer nodes will be available to you in the Storage tab in Node-RED.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>TDengine Operator nodes write data to and query data from TDengine.<\/li>\n\n\n\n<li>TDengine Consumer nodes subscribe to topics in TDengine.<\/li>\n<\/ul>\n\n\n\n<p>When you deploy these nodes in Node-RED, you must specify the hostname and port number of your TDengine instance as well as the username and password used to log in to TDengine. For Consumer nodes, you must also subscribe to at least one topic. You can use these nodes to integrate TDengine into your Node-RED applications.<\/p>\n\n\n\n<figure class=\"gb-element-67fc9063\">\n<img decoding=\"async\" width=\"2760\" height=\"466\" class=\"gb-media-9e0f60c1\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&sharp=1\" alt=\"\" title=\"td-nr-flow\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1 2760w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2-300x51.png?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2-1024x173.png?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2-768x130.png?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2-1536x259.png?strip=all&amp;sharp=1 1536w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2-2048x346.png?strip=all&amp;sharp=1 2048w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=552 552w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=1104 1104w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=1656 1656w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=2208 2208w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=450 450w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/td-nr-flow-2.png?strip=all&amp;sharp=1&amp;w=1920 1920w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n\n\n\n<figcaption class=\"gb-text\">TDengine&#8211;Node-RED data flow<\/figcaption>\n<\/figure>\n\n\n\n<h2 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"Example\"><\/span>Example<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A workshop has multiple smart meters, each generating one data record every second. Data is stored in TDengine, with real-time calculations performed every minute showing power consumption and average current and voltage per meter. Alerts are triggered when current exceeds 25 A or voltage exceeds 230 V.<\/p>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"1_Set_Up_TDengine\"><\/span>1. Set Up TDengine<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol>\n<li>\n<p>In TDengine, create a database for the test data:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\" data-line=\"\">CREATE DATABASE smartmeters;<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Create a supertable for the test data:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\" data-line=\"\">CREATE STABLE meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (groupid INT, location VARCHAR(24));<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Create three tables, one for each smart meter:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\" data-line=\"\">CREATE TABLE smartmeters.d0 USING smartmeters.meters TAGS (1, &#039;workshop1&#039;);\nCREATE TABLE smartmeters.d1 USING smartmeters.meters TAGS (2, &#039;workshop1&#039;);\nCREATE TABLE smartmeters.d2 USING smartmeters.meters TAGS (3, &#039;workshop1&#039;);<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Create a topic for alerting on overload:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\" data-line=\"\">CREATE TOPIC topic_overload AS\n   SELECT tbname,* FROM smartmeters.meters WHERE current &gt; 25 OR voltage &gt; 230;<\/code><\/pre>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"2_Add_Writer_Nodes\"><\/span>2. Add Writer Nodes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol>\n<li>\n<p>Select the tdengine-operator node in the node palette and drag it to the canvas.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Double-click the node to open property settings, fill in the name as &#8216;td-writer&#8217;, and click the &#8220;+&#8221; icon to the right of the database field.<\/p>\n<\/li>\n\n\n\n<li>\n<p> In the pop-up window, enter the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;db-server&#8217;.<\/li>\n\n\n\n<li>Connection type: &#8220;Connection string&#8221;.<\/li>\n\n\n\n<li>Input: <code class=\"\" data-line=\"\">ws:\/\/root:taosdata@www.example.com:6041 <\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\n<p>Click &#8220;Add&#8221; and return.<\/p>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"3_Simulate_Device_Data\"><\/span>3. Simulate Device Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol>\n<li>\n<p>Select the &#8216;function&#8217; node from the palette and drag it before &#8216;td-writer&#8217; on the canvas.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Double-click the node:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;write d0&#8217;.<\/li>\n\n\n\n<li>Select \u201cFunction\u201d tab and enter:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\" data-line=\"\"> \/\/ Generate random values\n const current = Math.floor(Math.random() * (30 - 5 + 1)) + 5; \/\/ 5-30A\n const voltage = Math.floor(Math.random() * (240 - 198 + 1)) + 198; \/\/ 198-240V\n const phase = Math.floor(Math.random() * (3 - 1 + 1)) + 1; \/\/ 1-3\n \n \/\/ Create SQL\n msg.topic = `insert into smartmeters.d0 values (now, ${current}, ${voltage}, ${phase});`;\n \n return msg;<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Drag an &#8220;inject&#8221; node before &#8216;write d0&#8217;.<\/p>\n<\/li>\n\n\n\n<li>\n<p> Configure the inject node:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name: \u201cinject1\u201d.<\/li>\n\n\n\n<li>Trigger: &#8220;Repeat&#8221;.<\/li>\n\n\n\n<li>Interval: 1 second.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\n<p>Repeat steps 1-4 for other devices (d1, d2).<\/p>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"4_Add_Output_Monitor\"><\/span>4. Add Output Monitor<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Drag a \u2018debug\u2019 node after &#8216;td-writer&#8217;.<\/li>\n\n\n\n<li>Configure it as follows:\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;debug1&#8217;.<\/li>\n\n\n\n<li>Node status: checked.<\/li>\n\n\n\n<li>Select &#8216;Message count&#8217; from the drop-down list.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>After adding all nodes, connect them in sequence to form a pipeline. Click &#8220;Deploy&#8221; to publish changes. When running successfully:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8216;td-writer&#8217; turns green.<\/li>\n\n\n\n<li>&#8216;debug1&#8217; shows data count.<\/li>\n<\/ul>\n\n\n\n<img decoding=\"async\" width=\"1426\" height=\"440\" class=\"gb-media-e11b55d0\" alt=\"\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&sharp=1\" title=\"nr-01\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&amp;sharp=1 1426w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01-300x93.webp?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01-1024x316.webp?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01-768x237.webp?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&amp;sharp=1&amp;w=570 570w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&amp;sharp=1&amp;w=855 855w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&amp;sharp=1&amp;w=1140 1140w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-01.webp?strip=all&amp;sharp=1&amp;w=450 450w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"5_Query_Data\"><\/span>5. Query Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol>\n<li>\n<p>Drag an inject node to the canvas:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;query&#8217;.<\/li>\n\n\n\n<li>Set msg.topic to:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\" data-line=\"\">SELECT tbname, AVG(current), AVG(voltage), SUM(p) FROM\n  (SELECT tbname, current, voltage, current*voltage\/60 AS p FROM smartmeters.meters\n   WHERE ts &gt; now-60s PARTITION BY tbname)\n   GROUP BY tbname;<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Drag tdengine-operator node to canvas:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database: Select existing &#8216;db-server&#8217; connection.<\/li>\n\n\n\n<li>Save and return.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\n<p>Drag debug node to canvas and configure it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;debug2&#8217;.<\/li>\n\n\n\n<li>Node status: checked.<\/li>\n\n\n\n<li>Select &#8216;Message count&#8217; from the drop-down list.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\n<p>Connect nodes sequentially  and click &#8220;Deploy&#8221;.<\/p>\n<\/li>\n<\/ol>\n\n\n\n<p>When the flow is successfully started:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8216;td-reader&#8217; node turns green.<\/li>\n\n\n\n<li>Debug node shows result count.<br><\/li>\n<\/ul>\n\n\n\n<img decoding=\"async\" width=\"1500\" height=\"128\" class=\"gb-media-2005ac17\" alt=\"\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&sharp=1\" title=\"nr-02\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&amp;sharp=1 1500w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02-300x26.webp?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02-1024x87.webp?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02-768x66.webp?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&amp;sharp=1&amp;w=600 600w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&amp;sharp=1&amp;w=900 900w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&amp;sharp=1&amp;w=1200 1200w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-02.webp?strip=all&amp;sharp=1&amp;w=450 450w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n\n\n\n<h3 class=\"gb-text\"><span class=\"ez-toc-section\" id=\"6_Subscribe_to_Overload_Data\"><\/span>6. Subscribe to Overload Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Drag tdengine-consumer node to canvas:\n<ul class=\"wp-block-list\">\n<li>Name: td-consumer.<\/li>\n\n\n\n<li>Subscription Server: <code class=\"\" data-line=\"\">ws:\/\/www.example.com:6041<\/code>.<\/li>\n\n\n\n<li>Username: root.<\/li>\n\n\n\n<li>Password: taosdata.<\/li>\n\n\n\n<li>Topics: topic_overload.<\/li>\n\n\n\n<li>Initial Offset: latest.<\/li>\n\n\n\n<li>Other settings: default.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Drag debug node to canvas and configure it:\n<ul class=\"wp-block-list\">\n<li>Name: &#8216;debug3&#8217;.<\/li>\n\n\n\n<li>Node status: checked.<\/li>\n\n\n\n<li>Select &#8216;Message count&#8217; from the drop-down list.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Connect nodes sequentially and click &#8220;Deploy&#8221;.<\/li>\n<\/ul>\n\n\n\n<p>When operational:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8216;td-consumer&#8217; node turns green.<\/li>\n\n\n\n<li>Debug node shows consumption count.<\/li>\n<\/ul>\n\n\n\n<p>Complete workflow overview:<\/p>\n\n\n\n<img decoding=\"async\" width=\"1476\" height=\"537\" class=\"gb-media-c59ea065\" alt=\"\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&sharp=1\" title=\"nr-crop\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&amp;sharp=1 1476w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop-300x109.png?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop-1024x373.png?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop-768x279.png?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&amp;sharp=1&amp;w=590 590w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&amp;sharp=1&amp;w=885 885w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&amp;sharp=1&amp;w=1180 1180w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/nr-crop.png?strip=all&amp;sharp=1&amp;w=450 450w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n\n\n\n<p>You now receive alerts from the td-consumer node when current or voltage exceed the configured limits. An example is shown as follows:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-json\" data-line=\"\">{\n  &quot;topic&quot;: &quot;topic_overload&quot;,\n  &quot;payload&quot;: [\n    {\n      &quot;tbname&quot;:   &quot;d1&quot;,\n      &quot;ts&quot;:       &quot;1750140456777&quot;,\n      &quot;current&quot;:  31,\n      &quot;voltage&quot;:  217,\n      &quot;phase&quot;:    2,\n      &quot;groupid&quot;:  4,\n      &quot;location&quot;: &quot;California.MountainView&quot;\n    }\n  ],\n  &quot;database&quot;:  &quot;smartmeters&quot;,\n  &quot;vgroup_id&quot;: 4,\n  &quot;precision&quot;: 0\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we\u2019ll walk through how to integrate Node-RED with TDengine and build a simple application for real-time alerts.<\/p>\n","protected":false},"author":102,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[21],"tags":[],"ppma_author":[181],"class_list":["post-26177","post","type-post","status-publish","format-standard","hentry","category-engineering"],"authors":[{"term_id":181,"user_id":102,"is_guest":0,"slug":"tdengine-team","display_name":"TDengine Team","avatar_url":{"url":"https:\/\/tdengine.com\/wp-content\/uploads\/29.03-01-tdengine.png","url2x":"https:\/\/tdengine.com\/wp-content\/uploads\/29.03-01-tdengine.png"},"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/26177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/users\/102"}],"replies":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/comments?post=26177"}],"version-history":[{"count":16,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/26177\/revisions"}],"predecessor-version":[{"id":26429,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/26177\/revisions\/26429"}],"wp:attachment":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/media?parent=26177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/categories?post=26177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/tags?post=26177"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/ppma_author?post=26177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}