@elko after you cloned the repo from github, you need to run sudo npm install inside the pimatic-dht-sensors directory.
To clean this plugin up, just remove the bcm2835 lib and delete the pimatic-dht-sensors folder with sudo rm -rf /home/pi/pimatic-app/node_modules/pimatic-dht-sensors
.
-
[Solved] DHT Sensors not working, Plugin "pimatic-dht-sensors" installation fails
pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de -
@thost96 I am still fighting to get it running (or at least building/installing). This is what I get:
pi@raspberrypi:~ $ sudo rm -rf /home/pi/pimatic-dht-sensors/ pi@raspberrypi:~ $ sudo git clone https://github.com/pimatic/pimatic-dht-sensors --branch v0.9.x Cloning into 'pimatic-dht-sensors'... remote: Counting objects: 112, done. remote: Total 112 (delta 0), reused 0 (delta 0), pack-reused 112 Receiving objects: 100% (112/112), 20.12 KiB | 0 bytes/s, done. Resolving deltas: 100% (68/68), done. Checking connectivity... done. pi@raspberrypi:~ $ cd pimatic-dht-sensors/ pi@raspberrypi:~/pimatic-dht-sensors $ sudo npm install npm WARN peerDependencies The peer dependency pimatic 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.12 preinstall /home/pi/pimatic-dht-sensors/node_modules/node-dht-sensor > ./preinst Library wiringPi found. Installing Native Abstractions for Node.js (NAN)... npm ERR! Linux 4.4.21+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nan" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! path /root/.npm/nan/2.4.0/package npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/nan/2.4.0/package' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, mkdir '/root/.npm/nan/2.4.0/package'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/root/.npm/nan/2.4.0/package', npm ERR! parent: 'node-dht-sensor' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/pimatic-dht-sensors/node_modules/node-dht-sensor/npm-debug.log Rebuilding addon... 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-dht-sensors/node_modules/node-dht-sensor/.node-gyp" module.js:327 throw err; ^ Error: Cannot find module 'nan' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at [eval]:1:1 at Object.exports.runInThisContext (vm.js:54:17) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (module.js:409:26) at node.js:579:27 at nextTickCallbackWith0Args (node.js:420:9) gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) 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-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" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! code ELIFECYCLE npm ERR! node-dht-sensor@0.0.12 preinstall: `./preinst` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-dht-sensor@0.0.12 preinstall script './preinst'. 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! ./preinst 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-dht-sensors/npm-debug.log pi@raspberrypi:~/pimatic-dht-sensors $
/home/pi/pimatic-dht-sensors/npm-debug.log snippet:
23195 verbose unlock done using /root/.npm/_locks/pimatic-ed711ea71062b53c.lock for /home/pi/pimatic -dht-sensors/node_modules/pimatic 23196 verbose stack Error: node-dht-sensor@0.0.12 preinstall: `./preinst` 23196 verbose stack Exit status 1 23196 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifec ycle.js:217:16) 23196 verbose stack at emitTwo (events.js:87:13) 23196 verbose stack at EventEmitter.emit (events.js:172:7) 23196 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn .js:24:14) 23196 verbose stack at emitTwo (events.js:87:13) 23196 verbose stack at ChildProcess.emit (events.js:172:7) 23196 verbose stack at maybeClose (internal/child_process.js:827:16) 23196 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 23197 verbose pkgid node-dht-sensor@0.0.12 23198 verbose cwd /home/pi/pimatic-dht-sensors 23199 error Linux 4.4.21+ 23200 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" 23201 error node v4.4.5 23202 error npm v2.15.5 23203 error code ELIFECYCLE 23204 error node-dht-sensor@0.0.12 preinstall: `./preinst` 23204 error Exit status 1 23205 error Failed at the node-dht-sensor@0.0.12 preinstall script './preinst'.
I’d be glad if you got another tip how I could get this solved. I would love to get around starting with a fresh SD image and setting up everything from the beginning again.
Thanks, Eike
-
@elko i think you’re in the wrong path on your filesystem. In which directory is pimatic installed?
The official guide (https://pimatic.org/guide/getting-started/) installs it into
/home/pi/pimatic-app
.
This means, you need to install all plugins into/home/pi/pimatic-app/node_modules/
.And please remove the pimatic-dht-sensors directory from
/home/pi
.pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de -
@thost96 I removed the dir from ~/ and repeated the actions. Still without success:
pi@raspberrypi:~/pimatic-app/node_modules $ ls pimatic pimatic-homeduino pimatic-mobile-frontend pimatic-shell-execute pimatic-cron pimatic-lcd pimatic-mqtt pimatic-sunrise pimatic-ds18b20 pimatic-lirc pimatic-openweather pimatic-sysinfo pimatic-gpio pimatic-mail pimatic-ping sqlite3 pi@raspberrypi:~/pimatic-app/node_modules $ sudo git clone https://github.com/pimatic/pimatic-dht-sensors --branch v0.9.x Cloning into 'pimatic-dht-sensors'... remote: Counting objects: 112, done. remote: Total 112 (delta 0), reused 0 (delta 0), pack-reused 112 Receiving objects: 100% (112/112), 20.12 KiB | 0 bytes/s, done. Resolving deltas: 100% (68/68), done. Checking connectivity... done. pi@raspberrypi:~/pimatic-app/node_modules $ cd pimatic-dht-sensors/ pi@raspberrypi:~/pimatic-app/node_modules/pimatic-dht-sensors $ sudo npm install npm WARN peerDependencies The peer dependency pimatic 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.12 preinstall /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor > ./preinst Library wiringPi found. Installing Native Abstractions for Node.js (NAN)... npm ERR! Linux 4.4.21+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nan" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! path /root/.npm/nan/2.4.0/package npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/nan/2.4.0/package' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, mkdir '/root/.npm/nan/2.4.0/package'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/root/.npm/nan/2.4.0/package', npm ERR! parent: 'node-dht-sensor' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/npm-debug.log Rebuilding addon... 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" module.js:327 throw err; ^ Error: Cannot find module 'nan' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at [eval]:1:1 at Object.exports.runInThisContext (vm.js:54:17) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (module.js:409:26) at node.js:579:27 at nextTickCallbackWith0Args (node.js:420:9) gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) 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" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! code ELIFECYCLE npm ERR! node-dht-sensor@0.0.12 preinstall: `./preinst` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-dht-sensor@0.0.12 preinstall script './preinst'. 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! ./preinst 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/node_modules/pimatic-dht-sensors/npm-debug.log pi@raspberrypi:~/pimatic-app/node_modules/pimatic-dht-sensors $ ls /home/pi/pimatic-app/node_modules/ pimatic pimatic-gpio pimatic-mail pimatic-ping sqlite3 pimatic-cron pimatic-homeduino pimatic-mobile-frontend pimatic-shell-execute pimatic-dht-sensors pimatic-lcd pimatic-mqtt pimatic-sunrise pimatic-ds18b20 pimatic-lirc pimatic-openweather pimatic-sysinfo pi@raspberrypi:~/pimatic-app/node_modules/pimatic-dht-sensors $
and Pimatic:
20:41:31.440 [pimatic] info: Loading plugin: "pimatic-dht-sensors" (0.9.1) coffee-cache: compiling coffee-script file "dht-sensors.coffee"...Done 20:41:33.056 [pimatic] error: Cannot find module 'node-dht-sensor'
Eike
-
@elko I have tested the plugin on my testsystem and getting nearly the same error messages.
pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de -
@thost96 I also tried with a fresh raspian image & pimatic setup, still having problems with the DHT plugin. Is it possible to switch some packages to explicitly use an older version to get it up and running again?
-
@elko said in DHT Sensors not working, Plugin "pimatic-dht-sensors" installation fails:
Is it possible to switch some packages to explicitly use an older version to get it up and running again
No. I’ll look into this asap
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Thanks a lot for helping and porting the plugin to the new BCM2835 lib. Somehow I must have messed up my installation, I just couldn’t get the latest version working either. But some cleanup and reinstalling pimatic and the used plugins worked fine. It was relatively easy and faster than I thought - once the configuration is there. Thanks for your support again, I’m glad to have the great pimatic up and running again!
-
@elko said in [Solved] DHT Sensors not working, Plugin "pimatic-dht-sensors" installation fails:
But some cleanup and reinstalling pimatic and the used plugins worked fine.
Thank you very much for your feedback. It’s great it is working fine for you know.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law