bpmurray / node-red-contrib-dht-sensor Goto Github PK
View Code? Open in Web Editor NEWNode-RED node to process DHT11/22 sensor data
License: Apache License 2.0
Node-RED node to process DHT11/22 sensor data
License: Apache License 2.0
Am I correct in assuming this won't work on a Tinker Board?
Thanks
Hi :)
I am struggling to get the DHT22 working on my Pi 4B. If I replicate the exact setup onto my Pi 3B+ it works immediately.
I looked around online and I noted that there are other users experiencing a similar issue with their Pi 4 modules.
The libraries work, as I can access them using python, but I think there is something that needs updating on the node itself. I use this node all the time and would greatly appreciate a look at this and possibly and update.
Regards,
I know that this is not an issue with this package. I'm not sure where else to start a conversation about getting it working.
I am running this on a Pi and am led to believe that the bcm2835 library needs to be run as root.
Does this mean that I must run node-red as root also? I'm worried that this presents a security issue. I am the only user of the Pi but it makes me reluctant to use it for anything sensitive.
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!
I tried lots of things, different gpio libraries, checking all gpio pins, also I tried this but nothing changed, always getting this error :(
I think library couldn't comunicate with gpio pins
-- I am using Armbian OS on Orange Pi One H3 board --
Hello ,
maybe we should think about of rework the lib, because the installation of the required lib bcm25xx does not work anymore on bullseye 32/64-Bit.
I am not sure for what the bcmxxxx lib is used, but I assume for the use of the gpio access.
Because of this I would recommend to rework the DHT node-red lib to get work with the most popular Pi library called pigpio.
An additional reason is, that also the wiringPi lib is replaced by pigpio.
The wiringPi lib is also not available anymore for bullseye.
I would be able to support here.
Hi,
on Pi4 everything works fine. Migration to Pi5 results in error. On the Console I got
bcm2835_init: Unable to open /dev/gpiomem: No such file or directory
13 Feb 17:09:57 - [error] [rpi-dht22:DHT22( DHT11/22)] TypeError: failed to initialize
/dev/gpiomem0 to /dev/gpiomem5 are existing, but not /dev/gpiomem
I´m running Version 1.0.4
any ideas to solve the problem?
Thanks Georg
I installed bcm2835-1.42 (got 1 warning: configure: WARNING: Doxygen not found - continuing without Doxygen support)
I installed node-dht-sensor - everything looks fine
when I run 'npm i node-red-contrib-dht-sensor' I get
pi@p1-node ~ $ npm i node-red-contrib-dht-sensor
\
[email protected] install /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor/build'
CXX(target) Release/obj.target/node-dht-sensor/node-dht-sensor.o
../node-dht-sensor.cpp:205:26: error: ‘Arguments’ does not name a type
../node-dht-sensor.cpp:205:37: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value Read(const int&)’:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
../node-dht-sensor.cpp:206:17: error: within this context
../node-dht-sensor.cpp:216:41: error: no matching function for call to ‘v8::Object::New()’
../node-dht-sensor.cpp:216:41: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: static v8::Localv8::Object v8::Object::New(v8::Isolate_)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: candidate expects 1 argument, 0 provided
../node-dht-sensor.cpp:217:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:217:69: error: no matching function for call to ‘v8::Number::New(float&)’
../node-dht-sensor.cpp:217:69: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:218:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:218:75: error: no matching function for call to ‘v8::Number::New(float&)’
../node-dht-sensor.cpp:218:75: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:219:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:219:72: error: no matching function for call to ‘v8::Boolean::New(bool)’
../node-dht-sensor.cpp:219:72: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate_, bool)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:220:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:220:68: error: no matching function for call to ‘v8::Number::New(int)’
../node-dht-sensor.cpp:220:68: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:221:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp: At global scope:
../node-dht-sensor.cpp:224:30: error: ‘Arguments’ does not name a type
../node-dht-sensor.cpp:224:41: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value ReadSpec(const int&)’:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
../node-dht-sensor.cpp:225:17: error: within this context
../node-dht-sensor.cpp:227:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
../node-dht-sensor.cpp:228:44: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:228:85: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:229:21: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:229:37: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:232:28: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:234:45: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:234:94: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:235:22: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:235:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:241:49: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:241:86: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:242:26: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:242:42: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:246:22: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:255:41: error: no matching function for call to ‘v8::Object::New()’
../node-dht-sensor.cpp:255:41: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: static v8::Localv8::Object v8::Object::New(v8::Isolate_)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:2388:24: note: candidate expects 1 argument, 0 provided
../node-dht-sensor.cpp:256:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:256:69: error: no matching function for call to ‘v8::Number::New(float&)’
../node-dht-sensor.cpp:256:69: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:257:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:257:75: error: no matching function for call to ‘v8::Number::New(float&)’
../node-dht-sensor.cpp:257:75: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:258:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:258:72: error: no matching function for call to ‘v8::Boolean::New(bool)’
../node-dht-sensor.cpp:258:72: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate_, bool)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:259:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:259:68: error: no matching function for call to ‘v8::Number::New(int)’
../node-dht-sensor.cpp:259:68: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: static v8::Localv8::Number v8::Number::New(v8::Isolate_, double)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:260:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp: At global scope:
../node-dht-sensor.cpp:263:32: error: ‘Arguments’ does not name a type
../node-dht-sensor.cpp:263:43: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h: In function ‘v8::Handlev8::Value Initialize(const int&)’:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
../node-dht-sensor.cpp:264:17: error: within this context
../node-dht-sensor.cpp:266:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
../node-dht-sensor.cpp:267:45: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:267:86: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:268:22: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:268:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:271:16: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:271:40: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:272:45: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:272:76: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:273:22: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:273:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:276:28: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:278:45: error: ‘New’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:278:99: error: ‘ThrowException’ was not declared in this scope
../node-dht-sensor.cpp:279:22: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:279:38: error: too few arguments to function ‘v8::Handlev8::Primitive v8::Undefined(v8::Isolate_)’
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:305:28: note: declared here
../node-dht-sensor.cpp:284:22: error: invalid types ‘const int[int]’ for array subscript
../node-dht-sensor.cpp:286:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
../node-dht-sensor.cpp:286:58: error: no matching function for call to ‘v8::Boolean::New(bool)’
../node-dht-sensor.cpp:286:58: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate_, bool)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:6194:17: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp: In function ‘void RegisterModule(v8::Handlev8::Object)’:
../node-dht-sensor.cpp:290:17: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:291:43: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
../node-dht-sensor.cpp:291:43: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate_’
../node-dht-sensor.cpp:292:17: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:293:47: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
../node-dht-sensor.cpp:293:47: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate_’
../node-dht-sensor.cpp:294:17: error: ‘NewSymbol’ is not a member of ‘v8::String’
../node-dht-sensor.cpp:295:49: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
../node-dht-sensor.cpp:295:49: note: candidate is:
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
/home/pi/.node-gyp/0.12.1/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ to ‘v8::Isolate_’
../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value Initialize(const int&)’:
../node-dht-sensor.cpp:287:1: warning: control reaches end of non-void function [-Wreturn-type]
../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value ReadSpec(const int&)’:
../node-dht-sensor.cpp:261:1: warning: control reaches end of non-void function [-Wreturn-type]
../node-dht-sensor.cpp: In function ‘v8::Handlev8::Value Read(const int&)’:
../node-dht-sensor.cpp:222:1: warning: control reaches end of non-void function [-Wreturn-type]
node-dht-sensor.target.mk:81: recipe for target 'Release/obj.target/node-dht-sensor/node-dht-sensor.o' failed
make: *_* [Release/obj.target/node-dht-sensor/node-dht-sensor.o] Error 1
make: Leaving directory '/home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.18.11+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.18.11+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "node-red-contrib-dht-sensor"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log
here is the npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'i',
1 verbose cli 'node-red-contrib-dht-sensor' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig)
5 silly cache add args [ 'node-red-contrib-dht-sensor', null ]
6 verbose cache add spec node-red-contrib-dht-sensor
7 silly cache add parsed spec { raw: 'node-red-contrib-dht-sensor',
7 silly cache add scope: null,
7 silly cache add name: 'node-red-contrib-dht-sensor',
7 silly cache add rawSpec: '',
7 silly cache add spec: '',
7 silly cache add type: 'range' }
8 verbose addNamed node-red-contrib-dht-sensor@
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'node-red-contrib-dht-sensor',
11 silly addNameRange range: '',
11 silly addNameRange hasData: false }
12 silly mapToRegistry name node-red-contrib-dht-sensor
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/node-red-contrib-dht-sensor
16 verbose addNameRange registry:https://registry.npmjs.org/node-red-contrib-dht-sensor not in flight; fetching
17 verbose request uri https://registry.npmjs.org/node-red-contrib-dht-sensor
18 verbose request no auth needed
19 info attempt registry request try #1 at 09:51:41
20 verbose request id cf6eec436e16f8b6
21 verbose etag "2TO218WOCL31PFYP50U7ZPBVR"
22 http request GET https://registry.npmjs.org/node-red-contrib-dht-sensor
23 http 304 https://registry.npmjs.org/node-red-contrib-dht-sensor
24 silly get cb [ 304,
24 silly get { date: 'Thu, 11 Jun 2015 13:51:42 GMT',
24 silly get via: '1.1 varnish',
24 silly get 'cache-control': 'max-age=60',
24 silly get etag: '"2TO218WOCL31PFYP50U7ZPBVR"',
24 silly get age: '0',
24 silly get connection: 'keep-alive',
24 silly get 'x-served-by': 'cache-iad2145-IAD',
24 silly get 'x-cache': 'MISS',
24 silly get 'x-cache-hits': '0',
24 silly get 'x-timer': 'S1434030702.401821,VS0,VE352',
24 silly get vary: 'Accept' } ]
25 verbose etag https://registry.npmjs.org/node-red-contrib-dht-sensor from cache
26 verbose get saving node-red-contrib-dht-sensor to /home/pi/.npm/registry.npmjs.org/node-red-contrib-dht-sensor/.cache.json
27 silly addNameRange number 2 { name: 'node-red-contrib-dht-sensor',
27 silly addNameRange range: '',
27 silly addNameRange hasData: true }
28 silly addNameRange versions [ 'node-red-contrib-dht-sensor',
28 silly addNameRange [ '0.0.9',
28 silly addNameRange '0.0.10',
28 silly addNameRange '0.0.11',
28 silly addNameRange '0.0.12',
28 silly addNameRange '0.0.13',
28 silly addNameRange '0.0.14',
28 silly addNameRange '0.0.15',
28 silly addNameRange '0.0.16' ] ]
29 verbose addNamed [email protected]
30 silly addNamed semver.valid 0.0.16
31 silly addNamed semver.validRange 0.0.16
32 silly cache afterAdd [email protected]
33 verbose afterAdd /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package/package.json not in flight; writing
34 verbose afterAdd /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package/package.json written
35 silly install resolved [ { author:
35 silly install resolved { name: 'Brendan Murray',
35 silly install resolved email: '[email protected]',
35 silly install resolved url: 'http://coolfore.com/' },
35 silly install resolved name: 'node-red-contrib-dht-sensor',
35 silly install resolved version: '0.0.16',
35 silly install resolved description: 'Node-red node for node-dht-sensor',
35 silly install resolved dependencies: { 'node-dht-sensor': '0.0.6' },
35 silly install resolved repository:
35 silly install resolved { type: 'git',
35 silly install resolved url: 'https://github.com/bpmurray/node-red-contrib-dht-sensor.git' },
35 silly install resolved keywords: [ 'node-red', 'sensor', 'dht11', 'dht22' ],
35 silly install resolved license: 'Apache 2.0',
35 silly install resolved bugs: { url: 'https://github.com/bpmurray/node-red-contrib-dht-sensor/issues' },
35 silly install resolved homepage: 'https://github.com/bpmurray/node-red-contrib-dht-sensor',
35 silly install resolved 'node-red': { nodes: [Object] },
35 silly install resolved _id: '[email protected]',
35 silly install resolved _shasum: 'fba94c8f32b53f5b0001389f5a583a0d7acfe208',
35 silly install resolved _from: 'node-red-contrib-dht-sensor@*',
35 silly install resolved _npmVersion: '1.4.28',
35 silly install resolved _npmUser: { name: 'bpmurray', email: '[email protected]' },
35 silly install resolved maintainers: [ [Object] ],
35 silly install resolved dist:
35 silly install resolved { shasum: 'fba94c8f32b53f5b0001389f5a583a0d7acfe208',
35 silly install resolved tarball: 'http://registry.npmjs.org/node-red-contrib-dht-sensor/-/node-red-contrib-dht-sensor-0.0.16.tgz' },
35 silly install resolved directories: {},
35 silly install resolved _resolved: 'https://registry.npmjs.org/node-red-contrib-dht-sensor/-/node-red-contrib-dht-sensor-0.0.16.tgz',
35 silly install resolved gitHead: '596925760c4c84efa1a7d97abe1c2a4ab6337855',
35 silly install resolved scripts: {},
35 silly install resolved readme: 'ERROR: No README data found!' } ]
36 info install [email protected] into /home/pi
37 info installOne [email protected]
38 verbose installOne of node-red-contrib-dht-sensor to /home/pi not in flight; installing
39 verbose lock using /home/pi/.npm/_locks/node-red-contrib-dht-sen-9e8dbece2600a36d.lock for /home/pi/node_modules/node-red-contrib-dht-sensor
40 silly install write writing node-red-contrib-dht-sensor 0.0.16 to /home/pi/node_modules/node-red-contrib-dht-sensor
41 silly cache addNamed cb [email protected]
42 verbose unbuild node_modules/node-red-contrib-dht-sensor
43 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor
44 verbose tar unpack /home/pi/.npm/node-red-contrib-dht-sensor/0.0.16/package.tgz
45 verbose tar unpacking to /home/pi/node_modules/node-red-contrib-dht-sensor
46 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor
47 silly gunzTarPerm modes [ '755', '644' ]
48 silly gunzTarPerm extractEntry package.json
49 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ]
50 silly gunzTarPerm extractEntry .npmignore
51 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ]
52 silly gunzTarPerm extractEntry README.md
53 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ]
54 silly gunzTarPerm extractEntry LICENSE
55 silly gunzTarPerm modified mode [ 'LICENSE', 438, 420 ]
56 silly gunzTarPerm extractEntry .gitattributes
57 silly gunzTarPerm modified mode [ '.gitattributes', 438, 420 ]
58 silly gunzTarPerm extractEntry dht22-node/dht22-node.js
59 silly gunzTarPerm modified mode [ 'dht22-node/dht22-node.js', 438, 420 ]
60 silly gunzTarPerm extractEntry dht22-node/dht22-node.html
61 silly gunzTarPerm modified mode [ 'dht22-node/dht22-node.html', 438, 420 ]
62 silly gunzTarPerm extractEntry dht22-node/icons/dht.png
63 silly gunzTarPerm modified mode [ 'dht22-node/icons/dht.png', 438, 420 ]
64 silly gunzTarPerm extractEntry icons/dht.png
65 silly gunzTarPerm modified mode [ 'icons/dht.png', 438, 420 ]
66 info preinstall [email protected]
67 silly prepareForInstallMany adding [email protected] from node-red-contrib-dht-sensor dependencies
68 silly cache add args [ '[email protected]', null ]
69 verbose cache add spec [email protected]
70 silly cache add parsed spec { raw: '[email protected]',
70 silly cache add scope: null,
70 silly cache add name: 'node-dht-sensor',
70 silly cache add rawSpec: '0.0.6',
70 silly cache add spec: '0.0.6',
70 silly cache add type: 'version' }
71 verbose addNamed [email protected]
72 silly addNamed semver.valid 0.0.6
73 silly addNamed semver.validRange 0.0.6
74 silly mapToRegistry name node-dht-sensor
75 silly mapToRegistry using default registry
76 silly mapToRegistry registry https://registry.npmjs.org/
77 silly mapToRegistry uri https://registry.npmjs.org/node-dht-sensor
78 verbose addNameVersion registry:https://registry.npmjs.org/node-dht-sensor not in flight; fetching
79 verbose request uri https://registry.npmjs.org/node-dht-sensor
80 verbose request no auth needed
81 info attempt registry request try #1 at 09:51:44
82 verbose etag "EP0I8633FS5VBCEW9Q292W55U"
83 http request GET https://registry.npmjs.org/node-dht-sensor
84 http 304 https://registry.npmjs.org/node-dht-sensor
85 silly get cb [ 304,
85 silly get { date: 'Thu, 11 Jun 2015 13:51:45 GMT',
85 silly get via: '1.1 varnish',
85 silly get 'cache-control': 'max-age=60',
85 silly get etag: '"EP0I8633FS5VBCEW9Q292W55U"',
85 silly get age: '0',
85 silly get connection: 'keep-alive',
85 silly get 'x-served-by': 'cache-iad2133-IAD',
85 silly get 'x-cache': 'MISS',
85 silly get 'x-cache-hits': '0',
85 silly get 'x-timer': 'S1434030705.366400,VS0,VE91',
85 silly get vary: 'Accept' } ]
86 verbose etag https://registry.npmjs.org/node-dht-sensor from cache
87 verbose get saving node-dht-sensor to /home/pi/.npm/registry.npmjs.org/node-dht-sensor/.cache.json
88 silly cache afterAdd [email protected]
89 verbose afterAdd /home/pi/.npm/node-dht-sensor/0.0.6/package/package.json not in flight; writing
90 verbose afterAdd /home/pi/.npm/node-dht-sensor/0.0.6/package/package.json written
91 silly install resolved [ { author: { name: 'David Momenso' },
91 silly install resolved name: 'node-dht-sensor',
91 silly install resolved description: 'Read data from DHT sensors on Raspberry Pi',
91 silly install resolved version: '0.0.6',
91 silly install resolved repository: { url: 'https://github.com/momenso/node-dht-sensor' },
91 silly install resolved main: './build/Release/node-dht-sensor',
91 silly install resolved dependencies: {},
91 silly install resolved scripts: { install: 'node-gyp rebuild' },
91 silly install resolved gypfile: true,
91 silly install resolved gitHead: 'e25c1826eb05b01a7e0c5e8c56f9313e1b7f2257',
91 silly install resolved bugs: { url: 'https://github.com/momenso/node-dht-sensor/issues' },
91 silly install resolved homepage: 'https://github.com/momenso/node-dht-sensor',
91 silly install resolved _id: '[email protected]',
91 silly install resolved _shasum: '1041ed0e88c72381367779c08385f968a311df67',
91 silly install resolved _from: '[email protected]',
91 silly install resolved _npmVersion: '1.4.28',
91 silly install resolved _npmUser: { name: 'momenso', email: '[email protected]' },
91 silly install resolved maintainers: [ [Object] ],
91 silly install resolved dist:
91 silly install resolved { shasum: '1041ed0e88c72381367779c08385f968a311df67',
91 silly install resolved tarball: 'http://registry.npmjs.org/node-dht-sensor/-/node-dht-sensor-0.0.6.tgz' },
91 silly install resolved directories: {},
91 silly install resolved _resolved: 'https://registry.npmjs.org/node-dht-sensor/-/node-dht-sensor-0.0.6.tgz',
91 silly install resolved readme: 'ERROR: No README data found!' } ]
92 info install [email protected] into /home/pi/node_modules/node-red-contrib-dht-sensor
93 info installOne [email protected]
94 verbose installOne of node-dht-sensor to /home/pi/node_modules/node-red-contrib-dht-sensor not in flight; installing
95 verbose lock using /home/pi/.npm/_locks/node-dht-sensor-b5bfdb8be2358e4a.lock for /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
96 silly install write writing node-dht-sensor 0.0.6 to /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
97 silly cache addNamed cb [email protected]
98 verbose unbuild node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
99 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
100 verbose tar unpack /home/pi/.npm/node-dht-sensor/0.0.6/package.tgz
101 verbose tar unpacking to /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
102 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
103 silly gunzTarPerm modes [ '755', '644' ]
104 silly gunzTarPerm extractEntry package.json
105 silly gunzTarPerm extractEntry .npmignore
106 silly gunzTarPerm extractEntry README.md
107 silly gunzTarPerm extractEntry LICENSE
108 silly gunzTarPerm extractEntry test-spec.js
109 silly gunzTarPerm extractEntry test.js
110 silly gunzTarPerm extractEntry binding.gyp
111 silly gunzTarPerm extractEntry node-dht-sensor.cpp
112 info preinstall [email protected]
113 silly install resolved []
114 verbose about to build /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
115 info build /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
116 verbose linkStuff [ false,
116 verbose linkStuff false,
116 verbose linkStuff false,
116 verbose linkStuff '/home/pi/node_modules/node-red-contrib-dht-sensor/node_modules' ]
117 info linkStuff [email protected]
118 verbose linkBins [email protected]
119 verbose linkMans [email protected]
120 verbose rebuildBundles [email protected]
121 info install [email protected]
122 verbose unsafe-perm in lifecycle true
123 info [email protected] Failed to exec install script
124 verbose unlock done using /home/pi/.npm/_locks/node-dht-sensor-b5bfdb8be2358e4a.lock for /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
125 verbose about to build /home/pi/node_modules/node-red-contrib-dht-sensor
126 verbose unlock done using /home/pi/.npm/_locks/node-red-contrib-dht-sen-9e8dbece2600a36d.lock for /home/pi/node_modules/node-red-contrib-dht-sensor
127 verbose stack Error: [email protected] install: node-gyp rebuild
127 verbose stack Exit status 1
127 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
127 verbose stack at EventEmitter.emit (events.js:110:17)
127 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
127 verbose stack at ChildProcess.emit (events.js:110:17)
127 verbose stack at maybeClose (child_process.js:1008:16)
127 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
128 verbose pkgid [email protected]
129 verbose cwd /home/pi
130 error Linux 3.18.11+
131 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "node-red-contrib-dht-sensor"
132 error node v0.12.1
133 error npm v2.5.1
134 error code ELIFECYCLE
135 error [email protected] install: node-gyp rebuild
135 error Exit status 1
136 error Failed at the [email protected] install script 'node-gyp rebuild'.
136 error This is most likely a problem with the node-dht-sensor package,
136 error not with npm itself.
136 error Tell the author that this fails on your system:
136 error node-gyp rebuild
136 error You can get their info via:
136 error npm owner ls node-dht-sensor
136 error There is likely additional logging output above.
137 verbose exit [ 1, true ]
138 verbose unbuild node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
139 info preuninstall [email protected]
140 info uninstall [email protected]
141 verbose unbuild rmStuff [email protected] from /home/pi/node_modules
142 verbose unbuild rmStuff in /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules
143 info postuninstall [email protected]
144 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
145 silly gentlyRm purging /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
146 silly gentlyRm removing /home/pi/node_modules/node-red-contrib-dht-sensor/node_modules
147 silly gentlyRm quitting because other entries in /home/pi/node_modules/node-red-contrib-dht-sensor
148 verbose unbuild node_modules/node-red-contrib-dht-sensor
149 info preuninstall [email protected]
150 info uninstall [email protected]
151 verbose unbuild rmStuff [email protected] from /home/pi/node_modules
152 info postuninstall [email protected]
153 verbose gentlyRm vacuuming /home/pi/node_modules/node-red-contrib-dht-sensor
154 silly gentlyRm purging /home/pi/node_modules/node-red-contrib-dht-sensor
155 silly gentlyRm quitting because other entries in /home/pi/node_modules
pi@p1-node ~ $
I have a case where I use multiple dhtxx's and ds18b20's. I want to have one subflow to process the data that I get and store both location and the sensor type. Currently this node only passes back the sensor model or the node name. I'd like to see the name (as location), topic and sensor model.
RFE: pass the node name (as msg.location), the node topic (as msg.topic) and the sensor model (as msg.sensorid). This can be done by editing and changing line 86 from:
msg.topic = node.topic || node.name;
to:
msg.location = node.name;
msg.topic = node.topic;
msg.sensorid = 'dht' + node.dht;
If you use this node and choose to use the physical pins and select pin 4 - which is a ground pin (so this probably applies to the other ground pins too) - as soon as you hit 'depoy' the pi will totally freeze and the only way out is a power off/on.
When you choose physical pins, none of the ground or power pins should be allowed to be selected.
You might want to take a look at the GPIO node to see how it selects pins.
Solution? (worked for me):
~/.node-red/node_modules/node-red-contrib-dht-sensor/dht22-node/dht22-node.js
//reading = sensorLib.readSpec(this.dht, this.pin);
reading = sensorLib.read(this.dht, this.pin);
Hey, in Node-Red I can get the tempreature of my DHT22 sensor but not the humidity: The message payload is only:
30.4.2017, 16:40:15 node: 6932b447.328b54
rpi-dht22 : msg.payload : string[5]
"22.00"
node-red now supports node.js 12.x.
But this node will be removed after update of node.js 12.7.
The installation with npm failed.
Please change the required version to support the installation with node.js 12.7.
146 error Linux 3.18.11-v7+
147 error argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-dht-sensor"
148 error node v0.12.7
149 error npm v2.11.3
150 error code ELIFECYCLE
151 error [email protected] install: node-gyp rebuild
151 error Exit status
Hello:
When I run sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor
it apparently installs well:
pi@invernadero:~/.node-red $ sudo npm install --unsafe-perm -g node-red-contrib-dht-sensor
> [email protected] preinstall /usr/lib/node_modules/.staging/node-dht-sensor-98fd5960
> ./check-lib.sh
Library bcm2835 found.
> [email protected] install /usr/lib/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
> node-gyp configure
> [email protected] postinstall /usr/lib/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor
> node-gyp build
make: se entra en el directorio '/usr/lib/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor/build'
CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
SOLINK_MODULE(target) Release/obj.target/node_dht_sensor.node
COPY Release/node_dht_sensor.node
make: se sale del directorio '/usr/lib/node_modules/node-red-contrib-dht-sensor/node_modules/node-dht-sensor/build'
/usr/lib
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]
But when I run sudo service nodered start
, this appears in the node network logs:
20 Mar 08:21:07 - [info] Server now running at http://127.0.0.1:1880/
20 Mar 08:21:09 - [info] Starting flows
1521530469152 Available Firmata
1521530469427 Available RaspberryPi-IO
1521530469456 Available Firmata
1521530469522 Available RaspberryPi-IO
20 Mar 08:21:09 - [info] Started flows
2018-03-20 08:21:09 initCheckPermitted:
+---------------------------------------------------------+
|Sorry, you don't have permission to run this program. |
|Try running as root, e.g. precede the command with sudo. |
+---------------------------------------------------------+
20 Mar 08:21:09 - [red] Uncaught Exception:
20 Mar 08:21:09 - Error: pigpio error -1 in gpioInitialise
at Error (native)
at initializePigpio (/home/pi/.node-red/node_modules/pigpio/pigpio.js:11:12)
at new Gpio (/home/pi/.node-red/node_modules/pigpio/pigpio.js:25:3)
at new DigitalOutput (/home/pi/.node-red/node_modules/raspi-gpio/dist/index.js:79:25)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.
nodered.service: Service hold-off time over, scheduling restart.
The system:
Raspberry pi 3
Raspbian Stretch with desktop
uname -a
Linux invernadero 4.9.80-v7+ #1098 SMP Fri Mar 9 19:11:42 GMT 2018 armv7l GNU/Linux
npm version: 3.10.10
Node-RED version: v0.18.4
Node.js version: v6.13.1```
But when I would appreciate some help.
I am trying to install rpi-dht node in node-red using raspberry pi 3, Model B (OS 32 bit). I am following all these three steps mentioned in the link (https://flows.nodered.org/node/node-red-contrib-dht-sensor).
However, at the last step when I install dht either from the manage palette option or from the command line, it doesn't get installed. even node-red stops working for a while.
Kindly resolve my issue. I am trying to install it for the last two days but it is not working for me without giving me any error as shown in the image.
It doesn´t work on my new Pi 4 with BCM2711. Is there a chance to fix?
Hi,
I'm getting "TypeError: failed to initialize"
Hi, i trie to install it, but i all time get this error:
root@raspberrypi:/home/pi/.node-red# sudo npm install -g node-dht-sensor
/
> [email protected] preinstall /usr/lib/node_modules/node-dht-sensor
> ./check-lib.sh
Library bcm2835 found.
> [email protected] install /usr/lib/node_modules/node-dht-sensor
> node-gyp configure
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.7.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-dht-sensor/.node-gyp"
> [email protected] postinstall /usr/lib/node_modules/node-dht-sensor
> node-gyp build
make: Entering directory '/usr/lib/node_modules/node-dht-sensor/build'
make: *** No rule to make target '../.node-gyp/4.7.2/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/lib/node_modules/node-dht-sensor/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /usr/lib/node_modules/node-dht-sensor
gyp ERR! node -v v4.7.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.38-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "node-dht-sensor"
npm ERR! node v4.7.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node-gyp build'.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-dht-sensor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.node-red/npm-debug.log
root@raspberrypi:/home/pi/.node-red# ^C
root@raspberrypi:/home/pi/.node-red#
Tried to get a DHT22 module to work on a Respberry pie 3 Couldn't get any response. Connected my oscilloscope to the data-pin. I noticed that the low trigger pulse was only 875uS long. The specs I found online states the pulse should be 1-10mS long for the DHT22. I suspect it is to short.
---- UPDATE---
Bought a new sensor. It turned out to be a broken sensor. Tested the new one with a 500uS pulse
and it gave an answer.
Dear @bpmurray, as you stated you decided to put only the temperature in the payload for compatibility.
Do you have any suggestions on how to process the humidity on the broker side.
I solved this issue in Node-Red by pausing/delaying the message for a few seconds and then with a change node change the payload to the msg.humidity and its own topic.
But I suspect you have a more elegant way.
Thanks in advance,
Peter Blok
Using with DHT-22 on Raspberry Pi 1 and only receiving temperature string (e.g. "23.90")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.