You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Node-RED通过HTTP向InfluxDB写入数据报错问题求助

Fixing "missing tag value" Error When Writing to InfluxDB via Node-RED

Let's break down why you're hitting this error and how to fix it quickly:

The Root Cause

Your working curl command sends the InfluxDB line protocol as raw plain text, but your Node-RED HTTP Request node is wrapping that line protocol in a JSON object (as seen in the error message: {"url":"...","method":"POST","body":"..."}). InfluxDB tries to parse this entire JSON string as line protocol, which obviously doesn't match the expected format—hence the "missing tag value" error.

Step-by-Step Fix

  1. Configure the HTTP Request Node Correctly

    • Double-click the HTTP Request node to open its settings:
      • Set Method to POST
      • Enter your full InfluxDB write URL: http://192.168.1.116:8086/write?db=waterlevel
      • Go to the Body tab:
        • Select String as the body type (not JSON)
        • Paste your line protocol directly into the input field: vattenstand,lake=siljan,region=dalarna value=160.80
      • Go to the Headers tab:
        • Click Add header
        • Set the header key to Content-Type and the value to text/plain (this tells InfluxDB exactly what format the body is in)
    • Save the node configuration and deploy your flow.
  2. Verify the Fix
    When you trigger the flow, the Node-RED node will now send the exact same raw plain text payload that your curl command uses—InfluxDB will parse it correctly and write the data without errors.

Why This Works

Your curl command uses --data-binary to send the line protocol as raw text. By setting the Node-RED node to send a plain string body with the text/plain content type, you're replicating that exact behavior, which aligns with InfluxDB's /write endpoint requirements.

内容的提问来源于stack exchange,提问作者m4rt1n

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:14:07