Git Product home page Git Product logo

Comments (5)

bpmurray avatar bpmurray commented on July 17, 2024 2

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.

pavelantolik avatar pavelantolik commented on July 17, 2024

@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.

bpmurray avatar bpmurray commented on July 17, 2024

@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.

pavelantolik avatar pavelantolik commented on July 17, 2024

@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:

  1. BCM2835 library
  2. node-dht-sensor npm package
  3. node-red-contrib-dht-sensor package

This alone wasn't enough though, so I also had to edit docker-compose.yml a bit:

  1. Adding flag to run node-red docker in privileged mode
  2. 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.

bpmurray avatar bpmurray commented on July 17, 2024

Thanks for that info - I'll update the README so that people can use it.

from node-red-contrib-dht-sensor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.