Adding functions to the Raspberry Pi Dashboard

In my dashboard section of the node-RED editor, under Raspberry Pi, there are only 4 items listed including GPIO Output and GPIO Input. How do I add other functions like rpi-dht22 (temperature and humidity sensor) and the SenseHat sensor?

Thanks

Hi @gbenham

you can add nodes to the palette by installing additional modules. You can do that by opening up the Palette Manager from the main menu, click on the install tab and then you can search through the catalog of available modules.

You can also browse that catalog online here: flows.nodered.org

Thank for this. I did try to do that searching on "rpi-dht". I did find a node that included the dht22 sensor but when I tried to add it to my Raspberry Pi palette it failed. I opened the log while it was trying to download and saw many, many error messages. I think it said something needing or trying to run as root?

1 - Which node - full name please i.e. node-red-contrib-????)
2 - did you look to see if there were prequsites for installing the node?

Thanks for your reply.
The node I'm trying to install is "node-red-contrib-dht-sensor".

There were some preliminary steps mentioned in the documentation. They were:

  1. Install the bcm2835 library. I believe i did that successfully.
  2. Install the node-dht-sensor dependency. Again, think I did that. There was one command line to enter and i did that and as far as I can tell, it went ok.
  3. And finally, install this node: "sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor".

Then I went back to the Install tab and selected the node I wanted and hit the Install button. It seemed to just cycle and cycle and I finally opened the log and saws tons of error messages...

When you ran step 3, did you see any errors? That step actually will install the node.

One thing the author should have said was the first make sure you are in the .node-red directory before running it.

Try this, in a terminal on the Pi, do:

cd /home/pi/.node-red
sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor

and see if there are any error messages.

Please run the following:

cat /etc/os-release
cat /proc/device-tree/model

that will show the model Pi and the release of raspbian

Also are you running any other things on this Pi? I ask because if you go to the BCM2835 page, it does note some things that could effect it from working.

I don't remember seeing any error when I did step 3 at the command line. However when I went into the editor to see what I had available, the dht sensor stuff isn't there under Raspberry Pi (or anywhere else).

I did the first step you mentioned (cd /home/pi/.node-red) and got a response back saying that no such directory or file exists. I did the two "cat" steps and got this back: I'm running Raspian GNU/Linux version 10 on a Raspberry Pi 3 Model B Plus.

I went back into the documentation for the node i was trying to add and went through the steps for loading the library files. The very first step came back with an error. That step was "sudo setcap cap_sys_rawio+ep myprogname". It didn't recognize myprogname. Maybe I needed to fill that in with something specific? Not sure. Anyway, I ran the rest of teh steps for laoding the library and none of them showed any errors.

I then ran the rest of the steps in the install documentation which matched those in my book. I will list them here. I didn't see any obvious errors when running them. After rebooting I went back and tried installing the node again and got what look like the same errors. It said something about not having permission to run as root or something like that. They kept scrolling by so I wasn't able to capture.

Here are all the steps I ran:
tar zxvf bcm2835-1.67.tar.gz
cd bdc2835-1.67
./configure
make
sudo make check
sudo make install
cd
sudo npm install --unsafe-perm -g node-dht-sensor
sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor
sudo npm install --unsafe-perm -g node-red-dashboard
sudo reboot
sudo node-red start

Then like I said I went into the editor. I checked to make sure I didn't have any new Raspberry Pi nodes (I didn't) and then I tried to install the dht sensor node with the same results - hundreds of error messages.

Thanks for any help you can provide. I did try and just load another node (Sense Hat) to see if my issue was more generic and that loaded ok.

Let me backup a bit.

1 - Did you install NR using the script described in Running on Raspberry Pi : Node-RED?

This is the script:

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

2 - are you using the user 'pi'?
3 - in terminal, from the pi's home folder trun ls -al - do you see the .node-red folder?

Thanks Paul. Running that command fixed it! I now have the dht node and my editor now looks like the version shown in the book I'm working off of. Excellent!

1 Like

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