{"id":16463,"library":"node-red-contrib-influxdb","title":"Node-RED InfluxDB Integration","description":"node-red-contrib-influxdb provides a collection of Node-RED nodes designed for seamless interaction with InfluxDB time series databases. It offers robust support for InfluxDB 1.x, InfluxDB 1.8 (leveraging 2.0 API compatibility with Flux queries), and native InfluxDB 2.0, allowing users to write and query data using both InfluxQL and Flux query languages. The current stable version is 0.7.0. The package maintains a steady release cadence, incorporating new features like request timeouts and addressing compatibility updates for InfluxDB versions and underlying Node.js runtimes. A key differentiator is its ability to handle multiple InfluxDB versions and query languages within a single set of nodes, adapting its internal client library based on the configuration.","status":"active","version":"0.7.0","language":"javascript","source_language":"en","source_url":"https://github.com/mblackstock/node-red-contrib-influxdb","tags":["javascript","node-red","influxdb"],"install":[{"cmd":"npm install node-red-contrib-influxdb","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-influxdb","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-influxdb","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a Node-RED contribution and requires a running Node-RED instance to function. It is not a direct npm runtime dependency but an ecosystem prerequisite.","package":"node-red","optional":false}],"imports":[{"note":"Provides input capabilities to query data from InfluxDB. It is configured visually within the Node-RED editor, not via JavaScript `import` statements.","symbol":"influxdb in","correct":"This is a Node-RED node, added via the 'Manage Palette' and configured in the flow editor."},{"note":"Enables writing data points to InfluxDB. Configuration, including measurement, database, and tags/fields, is done graphically.","symbol":"influxdb out","correct":"This is a Node-RED node, added via the 'Manage Palette' and configured in the flow editor."},{"note":"A specialized output node for writing multiple data points efficiently to InfluxDB in batches.","symbol":"influxdb batch","correct":"This is a Node-RED node, added via the 'Manage Palette' and configured in the flow editor."},{"note":"Manages connection details for your InfluxDB instance, including hostname, port, protocol, database name, and InfluxDB version (1.x, 1.8-flux, or 2.0).","symbol":"influxdb (config)","correct":"This is a Node-RED configuration node, accessed when setting up an 'influxdb in', 'out', or 'batch' node."}],"quickstart":{"code":"[{\"id\":\"39aa2ca9.804da4\",\"type\":\"debug\",\"z\":\"6256f76b.e596d8\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":530,\"y\":100,\"wires\":[]},{\"id\":\"262a3923.e7b216\",\"type\":\"influxdb in\",\"z\":\"6256f76b.e596d8\",\"influxdb\":\"eeb221fb.ab27f\",\"name\":\"\",\"query\":\"SELECT * from test\",\"rawOutput\":false,\"precision\":\"\",\"retentionPolicy\":\"\",\"org\":\"my-org\",\"x\":310,\"y\":100,\"wires\":[[\"39aa2ca9.804da4\"]]},{\"id\":\"803d82f.ff80f8\",\"type\":\"inject\",\"z\":\"6256f76b.e596d8\",\"name\":\"\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"x\":100,\"y\":100,\"wires\":[[\"262a3923.e7b216\"]]},{\"id\":\"eeb221fb.ab27f\",\"type\":\"influxdb\",\"hostname\":\"127.0.0.1\",\"port\":\"8086\",\"protocol\":\"http\",\"database\":\"test\",\"name\":\"test\",\"usetls\":false,\"tls\":\"\",\"influxdbVersion\":\"1.x\",\"url\":\"http://localhost:8086\",\"rejectUnauthorized\":true}]","lang":"json","description":"This Node-RED flow demonstrates how to query data from an InfluxDB 1.x database. An inject node triggers an 'influxdb in' node configured with a simple InfluxQL query 'SELECT * from test'. The results are then sent to a debug node for display."},"warnings":[{"fix":"Upgrade your Node.js runtime to 10.x, 12.x, 14.x LTS (or higher supported versions by Node-RED) and Node-RED to version 1.0 or later.","message":"Node.js version 8.x is explicitly not supported. Users must use Node.js 10.x or later. Node-RED versions prior to 1.0 are also not supported.","severity":"breaking","affected_versions":">=0.5.4"},{"fix":"Upgrade to version 0.6.1 or newer to patch the `lodash` dependency and address the security vulnerability.","message":"A security vulnerability related to the `lodash` dependency was fixed. This may indicate potential risks in older versions if `lodash` was exploited.","severity":"security","affected_versions":"<0.6.1"},{"fix":"For integer fields in InfluxDB 1.8-Flux or 2.0, ensure your payload sends numbers as strings with an 'i' suffix (e.g., `msg.payload = { value: '1234i' }`). For 1.x, all numbers will be floats.","message":"When writing integer values to InfluxDB 1.8-Flux or 2.0 configurations, JavaScript numbers are typically written as floats. To explicitly write an integer, you must append an 'i' suffix to the number within a string (e.g., '1234i'). This explicit integer type is not supported in 1.x configurations, where all numbers are treated as floats.","severity":"gotcha","affected_versions":">=0.5.1"},{"fix":"If experiencing timeouts, adjust the request timeout setting in the InfluxDB configuration node for 1.8 and 2.x versions.","message":"The default request timeout for InfluxDB 1.8 and 2.x configurations was introduced and defaults to 10 seconds. Longer-running queries or write operations might time out if this default is insufficient.","severity":"breaking","affected_versions":">=0.7.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"For InfluxDB 2.0, ensure the correct authentication token is provided in the configuration node. For InfluxDB 1.x, verify username/password. Also, ensure the query language (InfluxQL vs Flux) matches the InfluxDB version configured. InfluxDB 2.x primarily uses Flux for querying.","cause":"Incorrect authentication token, username/password, or using InfluxQL with InfluxDB 2.x which primarily uses Flux.","error":"Error: A 401 Unauthorized error occurred: {\"code\":\"unauthorized\",\"message\":\"Unauthorized\"}"},{"fix":"Verify that your InfluxDB service is running and accessible from the Node-RED host. Check the hostname, port, and protocol settings in the 'influxdb' configuration node. Also, check for any firewall rules that might be blocking the connection.","cause":"The InfluxDB server is not running, is configured on a different host or port, or a firewall is blocking the connection.","error":"ECONNREFUSED errors when writing data to influxDB"},{"fix":"Ensure that the 'influxdb in' node has a valid InfluxQL or Flux query configured in its settings, or that the incoming message (`msg`) contains a `query` property with the desired query string.","cause":"An 'influxdb in' (input) node was triggered without a query defined either in its configuration properties or in the incoming `msg.query` property.","error":"Error: \"No query specified\""}],"ecosystem":"npm"}