{"id":45577,"library":"node-red-contrib-redis","title":"node-red-contrib-redis","description":"A Node-RED client for Redis that supports pub/sub, lists, Lua scripting, SSL, cluster, custom commands, and instance injection. Version 1.4.0 is the latest stable release as of 2025, with sporadic updates. It uses ioredis under the hood and provides multiple node types: redis-in (for blocking/non-blocking subscriptions), redis-out, redis-command (for arbitrary commands), and redis-queue. Unlike generic Redis libraries, it integrates directly with Node-RED's flow-based programming model, allowing connection reuse and per-config naming. The roadmap includes stream support and better validation, though development has slowed.","status":"active","version":"1.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/chameleonbr/node-red-contrib-redis","tags":["javascript","redis","node-red","node"],"install":[{"cmd":"npm install node-red-contrib-redis","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for all Redis interactions (connections, commands, pub/sub)","package":"ioredis","optional":false}],"imports":[{"note":"Installed via npm, appears in Node-RED palette after refresh. No JavaScript import needed.","wrong":null,"symbol":"redis-in","correct":"Node-RED palette node (drag-and-drop), no manual import"},{"note":"Same as redis-in; used for publishing or writing to Redis.","wrong":null,"symbol":"redis-out","correct":"Node-RED palette node (drag-and-drop), no manual import"},{"note":"Used for executing arbitrary Redis commands with parameters.","wrong":null,"symbol":"redis-command","correct":"Node-RED palette node (drag-and-drop), no manual import"}],"quickstart":{"code":"// No direct JavaScript API; all usage is via Node-RED flows.\n// Below is an example flow JSON you can import into Node-RED.\n// It demonstrates basic SET/GET via redis-command and pub/sub.\n\n[{\"id\":\"1\",\"type\":\"inject\",\"z\":\"flow\",\"name\":\"\",\"topic\":\"\",\"payload\":\"value\",\"payloadType\":\"str\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":200,\"y\":200,\"wires\":[[\"2\"]]},{\"id\":\"2\",\"type\":\"redis-command\",\"z\":\"flow\",\"server\":\"4\",\"command\":\"set\",\"name\":\"\",\"topic\":\"test\",\"params\":\"[\\\"key\\\"]\",\"paramsType\":\"json\",\"payloadType\":\"json\",\"block\":false,\"x\":400,\"y\":200,\"wires\":[[\"3\"]]},{\"id\":\"3\",\"type\":\"debug\",\"z\":\"flow\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"payload\",\"targetType\":\"msg\",\"x\":600,\"y\":200,\"wires\":[]},{\"id\":\"4\",\"type\":\"redis-server\",\"z\":\"\",\"name\":\"My Redis\",\"host\":\"localhost\",\"port\":\"6379\",\"db\":\"0\",\"password\":\"\",\"useTls\":false,\"tlsOptions\":{}}]","lang":"javascript","description":"Example Node-RED flow showing SET command using redis-command node. Requires a redis-server config node."},"warnings":[{"fix":"Review flows: ensure connection blocking option matches expected behavior (block=true for dedicated connection).","message":"v1.4.0 changed connection handling: now shares connection per config name, but can open new connections if 'block connection' option is set.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Use redis-out with appropriate commands (e.g., LPUSH) for queue patterns.","message":"The redis-queue node is not documented but exists in code; may be removed in future versions.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Ensure 'params' contains valid JSON array, e.g., [\"key\", \"value\"] as a JSON string.","message":"Parameters for redis-command must be JSON stringified in the 'params' field. Passing a plain string will cause errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Set a reasonable timeout (e.g., 0 for no timeout, but avoid 0 in production; set a non-zero timeout in milliseconds).","message":"When using redis-in with blocking commands (e.g., BLPOP), the node will block the entire Node-RED event loop if timeout is not set properly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.4.0':27 '2025':35 'allow':86 'arbitrari':63 'base':83 'better':100 'blocking/non-blocking':54 'client':10 'cluster':20 'command':22,61,64 'config':92 'connect':87 'contrib':4 'custom':21 'develop':103 'direct':75 'flow':82 'flow-bas':81 'generic':70 'hood':44 'includ':96 'inject':25 'instanc':24 'integr':74 'ioredi':41 'javascript':106 'latest':30 'librari':72 'list':16 'lua':17 'model':85 'multipl':47 'name':93 'node':2,8,48,78,109,111 'node-r':7,77,108 'node-red-contrib-redi':1 'per':91 'per-config':90 'program':84 'provid':46 'pub/sub':15 'queue':68 'red':3,9,79,110 'redi':5,12,51,57,60,67,71,107 'redis-command':59 'redis-in':50 'redis-out':56 'redis-queu':66 'releas':32 'reus':88 'roadmap':95 'script':18 'slow':105 'sporad':37 'ssl':19 'stabl':31 'stream':97 'subscript':55 'support':14,98 'though':102 'type':49 'unlik':69 'updat':38 'use':40 'valid':101 'version':26","created_at":"2026-06-07T12:55:41.658968+00:00","updated_at":"2026-06-07T12:55:41.658968+00:00","problems":[{"fix":"Ensure Redis is running: `redis-server`. Verify host (localhost) and port (6379) in the redis-server config node.","cause":"Redis server not running or incorrect host/port in config node.","error":"Error: Connection to Redis failed. Check host and port."},{"fix":"For SET command, params should be: [\"key\", \"value\"] as JSON (e.g., [\"mykey\",\"myvalue\"]).","cause":"The 'params' field does not contain proper JSON array matching command arguments.","error":"Error: ERR wrong number of arguments for 'set' command"},{"fix":"Ensure msg.payload is an array of arguments for commands like RPUSH (e.g., payload: [\"list\", \"elem1\", \"elem2\"]).","cause":"Payload sent to redis-out is not an array when command expects multiple arguments.","error":"TypeError: msg.payload is not iterable"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/chameleonbr/node-red-contrib-redis#readme","github":"https://github.com/chameleonbr/node-red-contrib-redis","docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}