pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

Uncaught exception installing homeduino 0.9.18 on pimatic 0.9.50 and 0.9.52 #94

Closed pihome3 closed 4 years ago

pihome3 commented 5 years ago

After a clean install of Pimatic 0.9.50 following the instructions in the wiki I tried to install the pimatic-homeduino plugin (0.9.18). The installation fails with an uncaught exception. I attached the log with the errors. log.txt

pihome3 commented 5 years ago

Today I have update Pimatic to 0.9.52. After this I have tried to install the homeduino plugin (0.9.18) again. This results in an other uncaught exception error.

/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:100 return framework.destroy().then(function() { ^

ReferenceError: framework is not defined at process.uncaughtException (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:100:11) at process.emit (events.js:198:13) at process._fatalException (internal/bootstrap/node.js:496:27)

Log Pimatic 0.9.52 - Pimatic-Homeduino 0.9.18.txt

mrdago commented 5 years ago

Same for me, installing "pimatic-homeduino@0.9.18" results in error:

An uncaught exception occurred: AssertionError [ERR_ASSERTION]: Array.isArray(tags)

Here the versions of the installation environment:

akicker commented 5 years ago

My way was to downgrade node to version 8 (via nvm - already before installing pimatic) Current I am using on my latest Rpi 4 B latest stable kernel 4.19.66, node 8.16.1, pimatic 0.9.52, homeduino 0.9.18 AND installing homeduino manually by: nvm use 8 sudo service pimatic stop cd /home/pi/pimatic-app/node_modules/ git clone https://github.com/pimatic/pimatic-homeduino.git cd pimatic-homeduino npm install sudo service pimatic start

mrdago commented 5 years ago

In addition, I realized that independent from the reported installation error

11:02:10.546 [] info: ../src/serialport_unix.cpp:176:60: warning: ‘[object Object]’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
11:02:10.842 [pimatic] error: An uncaught exception occurred: AssertionError [ERR_ASSERTION]: Array.isArray(tags)
11:02:10.842 [pimatic] error:>    at new AssertionError (internal/errors.js:102:11)

the homeduino plugin is working as expected (node 8 and 10).

Anyway, it would make sense to correct the code to supress the installation error.

pihome3 commented 5 years ago

My way was to downgrade node to version 8 (via nvm - already before installing pimatic) Current I am using on my latest Rpi 4 B latest stable kernel 4.19.66, node 8.16.1, pimatic 0.9.52, homeduino 0.9.18 AND installing homeduino manually by: nvm use 8 sudo service pimatic stop cd /home/pi/pimatic-app/node_modules/ git clone https://github.com/pimatic/pimatic-homeduino.git cd pimatic-homeduino npm install sudo service pimatic start

Thank you, this fix works!