Node-red-mcu-plugin v1.0: Integrating Node-RED MCU Edition into the Node-RED editor

The rule of thumb is: node-red-mcu is designed to be as close as possible to legacy Node-RED. The implementation may be different & mostly optimized, the result shall be predictable - in the sense of "the same"...

1 Like

For those following this topic: @ralphwetzel fixed my issue. So now old existing config nodes (the ones with a . inside their node id) are now also supported inside mcu flows.

Now it is getting fun :champagne: :partying_face: :tada:

  1. I deploy this flow to my wt32-eth01 mcu, to send a message to my MQTT broker every 5 seconds:


  2. And I deploy this flow on my NodeJs backend (like we always do), to receive those messages from my MQTT broker:

If there is any Node-RED fan on this blue planet that doesn't love this stuff, then I will eat my shoes for breakfast :wink:


Hi Ralph,

Would like to read my first sensor, in this case the HC-SR04 (which Andy has implemented for me already two months ago...). So I wanted to install an up-to-date generic sensor package, but that fails because npm can't find a package.json file:

pi@raspberrypi:~/.node-red/node_modules/@ralphwetzel/node-red-mcu-plugin/node-red-mcu/nodes/mcu/sensor $ ls
manifest.json  mcu_sensor.html  mcu_sensor.js  sensor.js
pi@raspberrypi:~/.node-red/node_modules/@ralphwetzel/node-red-mcu-plugin/node-red-mcu/nodes/mcu/sensor $ cd ~/.node-red
pi@raspberrypi:~/.node-red $ npm install /home/pi/.node-red/node_modules/@ralphwetzel/node-red-mcu-plugin/node-red-mcu/nodes/mcu/sensor
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/pi/.node-red/node_modules/@ralphwetzel/node-red-mcu-plugin/node-red-mcu/nodes/mcu/sensor/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/.node-red/node_modules/@ralphwetzel/node-red-mcu-plugin/node-red-mcu/nodes/mcu/sensor/package.json'
npm ERR! enoent This is related to npm not being able to find a file.

Does the sensor libraries now have to be installed in another way?

From the docu in node-red-mcu:

And to install:

cd ~/.node-red
npm install [PATH TO node-red-mcu]/nodes/mcu

The nodes appears in the "MCU" section of the editor.


Hi Ralph,

I had overlooked that md file. Was always looking at the readme page of the repo itself...

Ok now I see a nice suite of mcu nodes:


Now I need to get used to this Sensor node...

I failed to read my HC-SR04 ultrasonic sensor using the Sensor node, as described here. If anybody has already used the Sensor node with success, please join that discussion if you have any tips. Thanks!!

For those having a headless Pi: thanks to an update of the Moddable SDK (by @phoddie) and the node-red-mcu-plugin sidebar (by @ralphwetzel), the xsbug-log seems to working fine now. Halleluja :wink:

Next task is to try out Peter's troubleshooting tips to analyze why my HC-SR04 sensor doesn't send any measurements to my Node-RED.

1 Like

Thx for the update. Now some one should make a step by step tutorial for the dumb ppl like me.

Had a Zoom session tonight with @ralphwetzel and @phoddie, because I couldn't get my Sensor node up and running. And now finally values from my HC-SR04 sensor arrive in my Debug sidebar, from Node-RED on my ESP32 :champagne: :tada: :partying_face:

What a service :star_struck:

Now I am getting close to a working solution. I just saw a few minutes ago that my sensor values are always the same, so I need to have a look at that. Will need to check my wiring and my sensor, to make sure it is not software related. To be continued...

Once I got it working with decent sensor values, I will write a tutorial of my steps.


I had hoped to be able to look in on the session, but sadly I had other commitments. Glad you are making progress.

1 Like

@BartButenaers, thanks for taking time from your busy calendar to work through this with @ralphwetzel and me today! Having everyone's eyes and expertise on the problem allowed us move quickly. It was also very interesting for me to see your workflow first hand. Thanks to patient, persistent work and feedback from you and many others (@Sineos and @Colin, included) Node-RED MCU Edition continues to rapidly improve. Very much appreciated.


that would be great!