TypeError: callback is not a function

Hi.

Hope someone can explain why i get the error: TypeError: callback is not a function

I have been using an old openhab installation on a RSPI3 where i used nodered (v0.19.5) as the gateway between openhab and "HDL Buspro" which is my electrical smarthome system. Pallet used is: node-red-contrib-buspro (1.3.0)

This has been working great and simple example of dimming a light below.

[{"id":"ca154ae3.e123e8","type":"buspro-out","z":"6195a12f.c1d05","controller":"fae2d339.0fb5","name":"","x":550,"y":120,"wires":[]},{"id":"767bf018.87b9e","type":"function","z":"6195a12f.c1d05","name":"61.2","func":"msg.target = \"1.61\"\nmsg.code = 49,\nmsg.payload =  {\n    channel: 2,\n    level: msg.payload\n    } \nreturn msg;","outputs":1,"noerr":0,"x":350,"y":120,"wires":[["ca154ae3.e123e8","60d3b32f.205fac"]]},{"id":"3caeab02.43f104","type":"inject","z":"6195a12f.c1d05","name":"","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":120,"wires":[["767bf018.87b9e"]]},{"id":"2710e2dc.64286e","type":"inject","z":"6195a12f.c1d05","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":220,"wires":[["767bf018.87b9e"]]},{"id":"1acdeca7.1704a3","type":"comment","z":"6195a12f.c1d05","name":"Dim to 100%","info":"","x":130,"y":80,"wires":[]},{"id":"fd4161a0.1b962","type":"comment","z":"6195a12f.c1d05","name":"Dim to 0%","info":"","x":120,"y":180,"wires":[]},{"id":"60d3b32f.205fac","type":"debug","z":"6195a12f.c1d05","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":530,"y":220,"wires":[]},{"id":"fae2d339.0fb5","type":"buspro-controller","z":"","host":"192.168.10.250","port":"6000","subnetid":"1","deviceid":"99"}]

HDL equipment is all connected on a bus and i have to send adress for dimmer witch is 1.61, code for dimming a light witch is 49. and light channel on dimmer and new level for light in the payload.

Wanted to change to Home assistant and use nodered as the gateway like before as HDL is not supported.
Installed home assistant (v 2021.4.6) and nodered (v1.3.3) on a new RSPI3. with the same pallet: node-red-contrib-buspro (1.3.0)

I am able to read all the bus traffic and status updates etc. like before but i can no longer send anything to the bus as i get the error.

By using the same example i now get the error: "TypeError: callback is not a function"

Do i have to change the formating in the function node or is it the pallet that has been broken due to new nodered version?

Many thanks in advance!

Which node is generating the error? It does not seem to be one in the flow you posted. Click on the node id above the error and it should take you there.

The error is generated by the BusPro node. This is also the only flow installed atm.

Are you sure? The node id in the debug pane above the image appears to start with ecd7 and there is not a node with that id in the flow you pasted.

If it is from that node then I think you may be better asking by raising an issue on the github page for the node. I see it has not been updated for two years so it may be that it is not compatible with the current version of nodejs, or it may be something else. Which version of nodejs are you using? You can get that by running
node -v
in a terminal.

Thanks for the reply.

No not really but when i click it it flashes red. Not sure why the id was not the same but did a fresh paste from the forum and got the same result.


Ok will try to raise an issue on the github page.

Not sure as i get error message when trying from the terminal:

Oh yes, HA runs node red in a Container doesn't it, so you would have to look in the container. I don't use HA (not many here do) so can't help with that. Most here use node-red to do everything rather than using HA.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.