Comments (9)
The real issue here is that it's based on node-dht-sensor which uses the bcm2835 library which itself requires root access. Probably the simplest solution is to rewrite my node to use the WiringPi library - that can now be initialised without being superuser. However, that will require some free time. I'll see what I can do in the near future. In the meantime, if you run node-red as root, it'll work OK.
from node-red-contrib-dht-sensor.
Nice, thanks for that. I was hoping you'd say otherwise but at least I now know.
from node-red-contrib-dht-sensor.
I've tried a bunch of things, and I can get it to work not using the BCM library. However, because of timing issues, there's no way to do it without being root. One possible alternative is to separate out the task to monitor the sensors, writing the data to a file, while the NodeRED part would then only have to read the file.
from node-red-contrib-dht-sensor.
For the time being, I'm closing this as a software limitation. When I get time, I'll redo this using a daemon that provides the information in the background.
from node-red-contrib-dht-sensor.
Thanks mate. I've put the RPi away for the time being but will pick it up again in the future for sure...
from node-red-contrib-dht-sensor.
Any progress on this? I'm in a weird situation where with my other Pi3 install it worked but on this new install i get the same issue "bcm2835_init: Unable to open /dev/mem: Permission denied" I tried to give that file 777 as a test then I got "bcm2835_init: Unable to open /dev/mem: Operation not permitted
31 Dec 22:50:18 - [error] [rpi-dht22:f5826526.273b68] TypeError: failed to initialize"
Dave
from node-red-contrib-dht-sensor.
got same problem and managed to solved that way :
I noticed that bcm2835 release 1.52 solved the problem allowing to use /dev/memgpio instead of /dev/men, thus not requiring root access.
so to make node-red-contrib-dht-sensor work i ha d to do this :
uninstall old bcm2835.1.38 (simply remove directory
install and make new release 1.52
uninstall node-red-contrib-dht-sensor using :
sudo npm uninstall --unsafe-perm -g node-red-contrib-dht-sensor
uninstall node-red-dht-sensor using :
sudo npm uninstall --unsafe-perm -g node-dht-sensor
reinstall both items above using
sudo npm install --unsafe-perm -g node-dht-sensor
sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor
after these operations, node-red dht node worked perfectly.
from node-red-contrib-dht-sensor.
Thanks for the info - I'll add that to the doc.
from node-red-contrib-dht-sensor.
installed bcm release 1.52 but I still get errors on sudo npm install -g node-dht-sensor Tried the latest bcm 1.56, still errors on the npm command. Is there a solution?
from node-red-contrib-dht-sensor.
Related Issues (19)
- npm i node-red-contrib-dht-sensor fails on pi b (2011) lots of errors HOT 5
- No Humidity
- Trigger puls to short?
- Failed to initialize HOT 1
- problems installing node-red-contrib-dht-sensor HOT 3
- Causes a freeze the pi when choosing physical pin 4 HOT 2
- Humidity HOT 2
- Asus Tinker Board HOT 1
- Using dht node within Node-red running in docker HOT 5
- Not working on Rpi 4 (BCM2711) HOT 2
- installation with node.js 12.7 failed HOT 3
- DHT22 sensors not working on Pi 4B 8GB HOT 1
- DHT not installing on raspberry pi
- Not working with bullseye HOT 17
- node-dht-sensor doesn't have readSpec function anymore HOT 1
- RFE - add sensor type to output HOT 4
- Node only returns temperature string HOT 4
- Permission Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-dht-sensor.