I use pimatic for controlling the heating of my flat and haven’t used it since last winter. Now I started it again and tried to update pimatic from the GUI resulting in a crashed pimatic with weird error messages.
It took me some hours to find and solve the problem: Pimatic wanted to install sqlite3, but I use the quite old Raspbian wheezy and there was no c++11 compiler installed. With a manual update to g++4.9 this works now.
Now I got pimatic to run manually with sudo node_modules/pimatic/pimatic.js
and daemonized with sudo node_modules/pimatic/pimatic.js start
without any errors in the logfiles.
But I’m still struggling with the autostart. I downloaded the init.d script but always get this error:
sudo service pimatic start
util.js:511
ctor.prototype = Object.create(superCtor.prototype, {
^
TypeError: Cannot read property 'prototype' of undefined
at Object.exports.inherits (util.js:511:43)
at Object.<anonymous> (/home/pimatic-app/node_modules/pimatic/node_modules/logrotate-stream/index.js:9:6)
at Module._compile (module.js:446:26)
at Object.Module._extensions..js (module.js:464:10)
at Module.load (/home/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/home/pimatic-app/node_modules/pimatic/lib/daemon.coffee:30:10)
at Module._compile (module.js:446:26)
at Object.compile (/home/pimatic-app/node_modules/pimatic/coffee-cache.js:169:17)
at Module.load (/home/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/home/pimatic-app/node_modules/pimatic/pimatic.js:5:12)
at Module._compile (module.js:446:26)
at Object.Module._extensions..js (module.js:464:10)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:311:12)
at Array.Module.runMain [as 0] (module.js:484:10)
at EventEmitter.startup.processNextTick.process._tickCallback (node.js:190:39)
Installed versions of npm and node.js:
npm -v
3.10.8
node -v
v6.6.0
11:48:27.741 2016-10-09 Sunday
11:48:56.701 [pimatic] info: Starting pimatic version 0.9.34
11:49:10.869 [pimatic, ppm] info: 2.15.6
11:49:11.133 [pimatic] info: Loading plugin: "pimatic-cron" (0.8.8)
11:49:15.096 [pimatic] info: Loading plugin: "pimatic-mobile-frontend" (0.9.11)
11:49:19.606 [pimatic] info: Loading plugin: "pimatic-ping" (0.9.5)
11:49:19.896 [pimatic] info: Loading plugin: "pimatic-gpio" (0.8.15)
11:49:20.239 [pimatic] info: Loading plugin: "pimatic-shell-execute" (0.9.7)
11:49:20.450 [pimatic] info: Loading plugin: "pimatic-sysinfo" (0.9.4)
11:49:21.490 [pimatic] info: Loading plugin: "pimatic-sunrise" (0.8.7)
11:49:21.689 [pimatic] info: Loading plugin: "pimatic-openweather" (0.9.1)
11:49:22.070 [pimatic] info: Loading plugin: "pimatic-ds18b20" (0.8.9)
I ran sudo npm install pimatic
in /home/pimatic-app/, what should have had installed all dependencies as well.
How can I fix this, do I have to update some packages manually?