Closed sbrinkmann closed 4 years ago
Hi, I only could reproduce your error when I send more than 2 parameters to redis server, I am assuming that you have entered a topic or are sending more than 2 parameters to Redis CMD.
Import my example to see how Redis CMD works:
[{"id":"666bf27e.be1e0c","type":"comment","z":"ff6762f8.bc2d8","name":"Redis CMD is generic command","info":"All Redis CMD sends:\n\nCommand + topic(if exists) + parameters sequence","x":810,"y":120,"wires":[]},{"id":"68ae028a.fea88c","type":"comment","z":"ff6762f8.bc2d8","name":"Redis CMD sends:","info":"","x":770,"y":160,"wires":[]},{"id":"5415bab6.4c84b4","type":"comment","z":"ff6762f8.bc2d8","name":"Command + topic(if exists) + parameters sequence","info":"","x":870,"y":200,"wires":[]},{"id":"74176a91.e58254","type":"comment","z":"ff6762f8.bc2d8","name":"When you use SET command, send only 2 params","info":"","x":870,"y":260,"wires":[]},{"id":"697c2293.94492c","type":"comment","z":"ff6762f8.bc2d8","name":"you need to send only 2 parameters","info":"","x":820,"y":380,"wires":[]},{"id":"cf7c47a4.5e85c8","type":"comment","z":"ff6762f8.bc2d8","name":" or will return an error","info":"","x":770,"y":420,"wires":[]},{"id":"ad381c16.c31c","type":"group","z":"ff6762f8.bc2d8","name":"Works","style":{"label":true,"stroke":"#0070c0"},"nodes":["1798acec.a1f3f3","8aeebe61.11b8d","e81adaea.f0f318","fc04293d.e4f5b8","9b133f1e.807ab","8364dbc9.6497a8","27bfb880.68e1a8","d0acdce9.1f2d9","335c3389.6afd0c"],"x":74,"y":99,"w":592,"h":202},{"id":"1798acec.a1f3f3","type":"inject","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"key","payload":"value","payloadType":"str","x":180,"y":200,"wires":[["8aeebe61.11b8d"]]},{"id":"8aeebe61.11b8d","type":"redis-command","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","server":"b9b5bedb.89eda","command":"SET","name":"","topic":"","params":"[]","paramsType":"json","payloadType":"json","block":false,"x":360,"y":200,"wires":[["e81adaea.f0f318"]]},{"id":"e81adaea.f0f318","type":"debug","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":200,"wires":[]},{"id":"fc04293d.e4f5b8","type":"inject","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"key\",\"value\"]","payloadType":"json","x":190,"y":140,"wires":[["9b133f1e.807ab"]]},{"id":"9b133f1e.807ab","type":"redis-command","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","server":"b9b5bedb.89eda","command":"SET","name":"","topic":"","params":"[]","paramsType":"json","payloadType":"json","block":false,"x":360,"y":140,"wires":[["8364dbc9.6497a8"]]},{"id":"8364dbc9.6497a8","type":"debug","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":140,"wires":[]},{"id":"27bfb880.68e1a8","type":"inject","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":260,"wires":[["d0acdce9.1f2d9"]]},{"id":"d0acdce9.1f2d9","type":"redis-command","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","server":"b9b5bedb.89eda","command":"SET","name":"","topic":"key","params":"[\"value\"]","paramsType":"json","payloadType":"json","block":false,"x":340,"y":260,"wires":[["335c3389.6afd0c"]]},{"id":"335c3389.6afd0c","type":"debug","z":"ff6762f8.bc2d8","g":"ad381c16.c31c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":260,"wires":[]},{"id":"b9b5bedb.89eda","type":"redis-config","z":"","name":"Local","options":"{\"host\":\"localhost\",\"port\":6379}","cluster":false,"optionsType":"json"},{"id":"c0e03c46.60656","type":"group","z":"ff6762f8.bc2d8","name":"Return Error","style":{"stroke":"#ff0000","label":true},"nodes":["846b7f8.ed3ce8","d3132237.98888","3e787b2.6118484"],"x":74,"y":359,"w":592,"h":82},{"id":"846b7f8.ed3ce8","type":"inject","z":"ff6762f8.bc2d8","g":"c0e03c46.60656","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"key\",\"value\"]","payloadType":"json","x":190,"y":400,"wires":[["d3132237.98888"]]},{"id":"d3132237.98888","type":"redis-command","z":"ff6762f8.bc2d8","g":"c0e03c46.60656","server":"b9b5bedb.89eda","command":"SET","name":"","topic":"mytopic","params":"[]","paramsType":"json","payloadType":"json","block":false,"x":370,"y":400,"wires":[["3e787b2.6118484"]]},{"id":"3e787b2.6118484","type":"debug","z":"ff6762f8.bc2d8","g":"c0e03c46.60656","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":400,"wires":[]}]
When I try to set a value into my redis store the value is set but I get the following error message: "ReplyError: ERR syntax error"
node red v 1.1.2 node-red-contrib-redis 1.3.3