Comments (5)
No idea - I'm not using Docker so can't test it! I'll have a look at what it might take.
from node-red-contrib-dht-sensor.
@bpmurray @cowboy28 any luck resolving this issue? I've just recently installed IOTstack on my RPI4 (so the Node RED runs in Docker container) and I am getting the same error. Funnily enough, I used to run the same stack before my card got corrupted (without backup) and everything worked just fine back then.
from node-red-contrib-dht-sensor.
@pavelantolik @cowboy28 I have no idea! It sounds very much like Docker is doing something but I can't see what it might be. If you had it running before, I'm guessing you had some setting that made all the difference but you lost that when your card was corrupted. Just FYI I haven't been maintaining this & haven't looked at it in years.
from node-red-contrib-dht-sensor.
@bpmurray @cowboy28 Yeah i thought this was no longer maintained but I had to give it a try as after many hours trying to make it work I got a bit desperate .))
Anyway, as it usually happens to me, I managed to solve it a short while after posting my question. so if anyone runs into "TypeError: failed to initialize" when trying to read DHT11 with node-red-contrib-dht-sensor package's node running in IOTstack docker container, the solution that worked for me was this:
Editing Node Red's Dockerfile and adding lines of code that install:
- BCM2835 library
- node-dht-sensor npm package
- node-red-contrib-dht-sensor package
This alone wasn't enough though, so I also had to edit docker-compose.yml a bit:
- Adding flag to run node-red docker in privileged mode
- Mapping "/dev/mem/" just to be "sure"
Some of the steps might not even be necessarry, but I didn't have time to rule 'em out yet. Hopefully this will help someone in the future as google didn't seem to have heard about this particular issue.
from node-red-contrib-dht-sensor.
Thanks for that info - I'll update the README so that people can use it.
from node-red-contrib-dht-sensor.
Related Issues (20)
- 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
- 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
- Orange Pi One H3 - "TypeError: failed to initialize"
- bcm2835_init: Unable to open /dev/mem: Permission denied HOT 9
- 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.