TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

[email protected] 无法输出查询结果(Node-RED 3.1.12 环境)

Open 862615093 opened this issue 2 months ago • 2 comments

  1. 环境信息 操作系统 | Windows 11 | 本地开发环境 Node.js | v18.20.8 | 通过官方安装包安装 npm | v10.7.0 | 与 Node.js 一起安装 Node-RED | v3.1.12 | 使用 VSCode 启动 TDengine 服务端 | v3.3.6.3 Community taosAdapter | 已启动正常 | WebSocket 6041 端口可访问 @tdengine/websocket | v3.2.0 | 安装成功、测试可返回版本号 node-red-node-tdengine | v1.0.2(出问题) / v1.0.0(正常) | 问题版本与正常版本对比

2.流程文件( inject → tdengine-operator → debug) [ { "id": "83b4816045080455", "type": "group", "z": "7753a29263d8f0d9", "name": "数据查询", "style": { "label": true, "color": "#ff0000" }, "nodes": [ "0f0f83c68981e00c", "37cad9f9654477fa", "9a5fead4eb3dbee4", "0edb68b6951d8d2d" ], "x": 194, "y": 699, "w": 792, "h": 222 }, { "id": "0f0f83c68981e00c", "type": "inject", "z": "7753a29263d8f0d9", "g": "83b4816045080455", "name": "query", "props": [ { "p": "topic", "vt": "str" } ], "repeat": "5", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "select tbname, avg(current), avg(voltage), sum(p) from ( select tbname,current,voltage,current*voltage/60 as p from test.meters where ts > '2025-10-14 09:30:25.153' partition by tbname) group by tbname;", "x": 290, "y": 740, "wires": [ [ "0edb68b6951d8d2d" ] ] }, { "id": "37cad9f9654477fa", "type": "debug", "z": "7753a29263d8f0d9", "g": "83b4816045080455", "name": "debug 2", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "counter", "x": 880, "y": 880, "wires": [] }, { "id": "9a5fead4eb3dbee4", "type": "tdengine-operator", "z": "7753a29263d8f0d9", "g": "83b4816045080455", "db": "0ce4d358562a4527", "name": "td-reader", "x": 700, "y": 740, "wires": [ [ "37cad9f9654477fa" ] ] }, { "id": "0edb68b6951d8d2d", "type": "function", "z": "7753a29263d8f0d9", "g": "83b4816045080455", "name": "转string", "func": "if (typeof msg.topic !== 'string') {\n node.warn("msg.topic type is " + typeof msg.topic);\n msg.topic = String(msg.topic);\n} \nreturn msg;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 480, "y": 740, "wires": [ [ "9a5fead4eb3dbee4" ] ] }, { "id": "0ce4d358562a4527", "type": "TDengineServer", "name": "td-reader-db-2", "uri": "ws://root:[email protected]:6041", "connType": "connection-string", "host": "127.0.0.1", "port": "6041", "db": "" } ]

  1. 问题描述: tdengine-operator 节点执行 SQL 查询,连接 TDengine 数据库成功,debug 节点无法获得任何查询结果,控制台与调试面板均无错误信息。

862615093 avatar Oct 14 '25 03:10 862615093

可以微信沟通一下 a15652223354

yu285 avatar Oct 21 '25 01:10 yu285

Node-RED version: v4.0.9 Node.js version: v20.18.1 node-red-node-tdengine v1.0.2 同样问题 msg.payload无输出结果

v4mp avatar Nov 24 '25 09:11 v4mp