Hi, after using pimatic for about two years on a Pi version 1 with pretty old software versions, I experienced problems with mi Pi hardware and and now try to set up the system again with the latest software on a Pi zero.
Most things work as expected, but I can’t get my DHT sensors working, that are directly connected to the PI. The plugin does not install automatically and trying to install it manually causes errors. To me it looks like some dependencies / includes are not resolved, but I have not idea how to fix it.
Console output:
pi@raspberrypi:~ $ node -v
v4.4.5
pi@raspberrypi:~ $ npm -v
2.15.5
pi@raspberrypi:~/pimatic-app $ sudo npm install pimatic-dht-sensors
npm WARN peerDependencies The peer dependency pimatic@0.8.* included from pimatic-dht-sensors will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
-
> node-dht-sensor@0.0.5 install /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp"
make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
CXX(target) Release/obj.target/node-dht-sensor/node-dht-sensor.o
../node-dht-sensor.cpp:191:26: error: ‘Arguments’ does not name a type
Handle<Value> Read(const Arguments& args) {
^
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h: In function ‘v8::Handle<v8::Value> Read(const int&)’:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../node-dht-sensor.cpp:192:17: error: within this context
HandleScope scope;
^
../node-dht-sensor.cpp:202:41: error: no matching function for call to ‘v8::Object::New()’
Local<Object> readout = Object::New();
^
../node-dht-sensor.cpp:202:41: note: candidate is:
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2933:24: note: static v8::Local<v8::Object> v8::Object::New(v8::Isolate*)
static Local<Object> New(Isolate* isolate);
^
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2933:24: note: candidate expects 1 argument, 0 provided
../node-dht-sensor.cpp:203:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
readout->Set(String::NewSymbol("humidity"), Number::New(humidity));
^
../node-dht-sensor.cpp:203:69: error: no matching function for call to ‘v8::Number::New(float&)’
readout->Set(String::NewSymbol("humidity"), Number::New(humidity));
^
../node-dht-sensor.cpp:203:69: note: candidate is:
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
static Local<Number> New(Isolate* isolate, double value);
^
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:204:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
readout->Set(String::NewSymbol("temperature"), Number::New(temperature));
^
../node-dht-sensor.cpp:204:75: error: no matching function for call to ‘v8::Number::New(float&)’
readout->Set(String::NewSymbol("temperature"), Number::New(temperature));
^
../node-dht-sensor.cpp:204:75: note: candidate is:
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
static Local<Number> New(Isolate* isolate, double value);
^
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:205:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
readout->Set(String::NewSymbol("isValid"), Boolean::New(result == 0));
^
../node-dht-sensor.cpp:205:72: error: no matching function for call to ‘v8::Boolean::New(bool)’
readout->Set(String::NewSymbol("isValid"), Boolean::New(result == 0));
^
../node-dht-sensor.cpp:205:72: note: candidate is:
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:7603:16: note: static v8::Local<v8::Boolean> v8::Boolean::New(v8::Isolate*, bool)
Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
^
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:7603:16: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:206:18: error: ‘NewSymbol’ is not a member of ‘v8::String’
readout->Set(String::NewSymbol("errors"), Number::New(2 - retry));
^
../node-dht-sensor.cpp:206:68: error: no matching function for call to ‘v8::Number::New(int)’
readout->Set(String::NewSymbol("errors"), Number::New(2 - retry));
^
../node-dht-sensor.cpp:206:68: note: candidate is:
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
static Local<Number> New(Isolate* isolate, double value);
^
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:2486:24: note: candidate expects 2 arguments, 1 provided
../node-dht-sensor.cpp:207:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(readout);
^
../node-dht-sensor.cpp: At global scope:
../node-dht-sensor.cpp:210:30: error: ‘Arguments’ does not name a type
Handle<Value> ReadSpec(const Arguments& args) {
^
In file included from /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/node.h:42:0,
from ../node-dht-sensor.cpp:1:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h: In function ‘v8::Handle<v8::Value> ReadSpec(const int&)’:
/home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/.node-gyp/4.4.5/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../node-dht-sensor.cpp:211:17: error: within this context
HandleScope scope;
^
../node-dht-sensor.cpp:213:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
if (args.Length() < 2) {
^
[...many more similar code level errors shown...]
node-dht-sensor.target.mk:86: 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/pimatic-app/node_modules/pimatic-dht-sensors/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: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:200:12)
gyp ERR! System Linux 4.4.21+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 4.4.21+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-dht-sensors"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! node-dht-sensor@0.0.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.5 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 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/pimatic-app/npm-debug.log
Possibly relevant part of /home/pi/pimatic-app/npm-debug.log:
181 verbose cwd /home/pi/pimatic-app
182 error Linux 4.4.21+
183 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-dht-sensors"
184 error node v4.4.5
185 error npm v2.15.5
186 error code ELIFECYCLE
187 error node-dht-sensor@0.0.5 install: `node-gyp rebuild`
187 error Exit status 1
188 error Failed at the node-dht-sensor@0.0.5 install script 'node-gyp rebuild'.
188 error This is most likely a problem with the node-dht-sensor package,
188 error not with npm itself.
188 error Tell the author that this fails on your system:
188 error node-gyp rebuild
188 error You can get information on how to open an issue for this project with:
188 error npm bugs node-dht-sensor
188 error Or if that isn't available, you can get their info via:
188 error
188 error npm owner ls node-dht-sensor
188 error There is likely additional logging output above.
189 verbose exit [ 1, true ]
190 verbose unbuild node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
191 info preuninstall node-dht-sensor@0.0.5
192 info uninstall node-dht-sensor@0.0.5
193 verbose unbuild rmStuff node-dht-sensor@0.0.5 from /home/pi/pimatic-app/node_modules
194 verbose unbuild rmStuff in /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules
195 info postuninstall node-dht-sensor@0.0.5
196 silly gentlyRm /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor is being purged from base /home/pi/pimatic-app
197 verbose gentlyRm don't care about contents; nuking /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
198 silly vacuum-fs purging /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
199 silly vacuum-fs removing /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules
200 silly vacuum-fs quitting because other entries in /home/pi/pimatic-app/node_modules/pimatic-dht-sensors
201 verbose unbuild node_modules/pimatic-dht-sensors
202 info preuninstall pimatic-dht-sensors@0.8.6
203 info uninstall pimatic-dht-sensors@0.8.6
204 verbose unbuild rmStuff pimatic-dht-sensors@0.8.6 from /home/pi/pimatic-app/node_modules
205 info postuninstall pimatic-dht-sensors@0.8.6
206 silly gentlyRm /home/pi/pimatic-app/node_modules/pimatic-dht-sensors is being purged from base /home/pi/pimatic-app
207 verbose gentlyRm don't care about contents; nuking /home/pi/pimatic-app/node_modules/pimatic-dht-sensors
208 silly vacuum-fs purging /home/pi/pimatic-app/node_modules/pimatic-dht-sensors
209 silly vacuum-fs quitting because other entries in /home/pi/pimatic-app/node_modules
Does anyone know what I can do to fix it?
Thanks a lot,
Eike