Hi all, I am getting the following error into the syslog of the raspi where nodered is running.
It is suggested to report the error on github, but before thronging there, I would like to ask here:
Oct 05 08:17:34 houston Node-RED[658]: 5 Oct 08:17:34 - [error]
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************
Oct 05 08:17:34 houston Node-RED[658]: Unexpected Node Error
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************
Oct 05 08:17:34 houston Node-RED[658]: Info:
Oct 05 08:17:34 houston Node-RED[658]: Node object is not a node-red Node
Oct 05 08:17:34 houston Node-RED[658]: Stack:
Oct 05 08:17:34 houston Node-RED[658]: Error: Invalid payload type (undefined): expected number, boolean, string
Oct 05 08:17:34 houston Node-RED[658]: at log_helper (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:512:20)
Oct 05 08:17:34 houston Node-RED[658]: at Node.error (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:553:9)
Oct 05 08:17:34 houston Node-RED[658]: at parsePayload (/home/rob/.node-red/node_modules/node-red-contrib-moving-average/moving-average.js:49:1>
Oct 05 08:17:34 houston Node-RED[658]: at MovingAverageNode._inputCallback (/home/rob/.node-red/node_modules/node-red-contrib-moving-average/mo>
Oct 05 08:17:34 houston Node-RED[658]: at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
Oct 05 08:17:34 houston Node-RED[658]: at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
Oct 05 08:17:34 houston Node-RED[658]: at MovingAverageNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/>
Oct 05 08:17:34 houston Node-RED[658]: at MovingAverageNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/>
Oct 05 08:17:34 houston Node-RED[658]: at MovingAverageNode.Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nod>
Oct 05 08:17:34 houston Node-RED[658]: at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.>
Oct 05 08:17:34 houston Node-RED[658]: Please report this issue, including the information logged above:
Oct 05 08:17:34 houston Node-RED[658]: https://github.com/node-red/node-red/issues/
Oct 05 08:17:34 houston Node-RED[658]: ********************************************************************
It looks like this node it not sending a correct msg object. That is a bug in itself and you should report your findings to the author via the GitHub issues.
That said, this bug may be unearthed due to what you are feeding into it? Put a debug node before this node and see what values cause it to error.
This is a known issue with the node and was reported over a year ago with no response from the node's author, however there is a 'get around' provided by another user.
Sorry Steve-Mcl, I initially misread your advice.
I then placed the debug before and saw that the topic was undefined, so gave a value to it and the error seems to be gone.
Thank you so much
Hi Zenofmud, I checked that the input was a number and it always was then, as wrote to Steve-Mcl, I saw that the topic was undefined and gave it a value.
Thanks for pointing me to the new moving-average node, I will definitely give it a try.