Need to run DHT node with root privileges

Hi

i am new to linux. I use it for my garden irritation and ventilation.

problem is that the node for my dht22 sensors only works when it´s started with root privilegs.
With standard user it won´t show me measurements.
Could you help me?

Are you absolutely sure that the problem is due to not being root? I have 5 pi's running DHT 11. and DHT 22 sensors with no issues. Perhaps you can explain your reasoning behind this and your methodology?

Hi

I m Sure. If i Start with the "normal" User i cannot get any Temperatures or humidity.
Started with root it works.

I use the node-red-contrib-dht-sensor node

How did you install node red?

Via the openhabian-config Tool.

I'm going to suggest that maybe your installation is the issue. There is a install script that I think most use to install it. I can't find a link right now but if you search this forum or even just Google it on the web you will probably find it. I use the dht sensor node on my installations with no problems so I'm confident that's not the issue. You don't want to run as root and don't need to so my first recommendation would be to reinstall using the script

You might want to ask on the openhabit forum

Okay i´ll ask on the openhab forum.

But in the notes of the node ist this NOTE:

Blockquote Notes:

  • The temperature values is in °C and the humidity values are % relative humidity.
  • If you're using an older release of the DHT2385 driver, you will have to run node-RED as root, otherwise you may run into problems with permissions.

I am using the last BMC2385 version.

Hi folks. I changed to the BME280 it works correct .

1 Like

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