Open cowboy28 opened 5 years ago
No idea - I'm not using Docker so can't test it! I'll have a look at what it might take.
@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.
@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.
@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:
This alone wasn't enough though, so I also had to edit docker-compose.yml a bit:
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.
Thanks for that info - I'll update the README so that people can use it.
I have Nodered running within Docker and managing it with Portainer. I get nothing but "typeErrors" when running dht-sensor. The dht node works great when nodered is running without docker.
I've also installed "pi-gpiod" for virtualized GPIO pins...didn't help.
Thank you for the help!