lutzer / node-red-contrib-finite-statemachine

A finite state machine implementation for node red.
MIT License
16 stars 5 forks source link

Syntax error of v1.0.2 in Homematic (RaspberryMatic) and Node-RED (RedMatic) #8

Closed StephanStS closed 4 years ago

StephanStS commented 4 years ago

If used in a Homematic environment (including RedMatic), the node cannot be loaded. The manage palette dialog shows:

2020-05-04 13_24_45-Clipboard

The older version 0.2.11 ran without problems. This can be seen on a 100% fresh Homematic/RedMatic installation as well as on another system (RPi) running an active Homematic instance with running programs etc. at home. RedMatic contains Node-RED v1.0.5.

What shall I investigate as a next step? The 100% clean installation I only set up for investigation purposes, so any crashing tests are no problem. :-) The installation log within RedMatic shows: _----------------------------------------------------------- 2020-05-04T14:54:56.510Z Install : node-red-contrib-finite-statemachine 1.0.2

2020-05-04T14:54:57.712Z npm install --no-package-lock --global-style --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-finite-statemachine@1.0.2 2020-05-04T14:55:09.618Z [err] npm 2020-05-04T14:55:09.619Z [err] WARN node-red-project@0.0.1 No repository field. 2020-05-04T14:55:09.619Z [err] npm WARN node-red-project@0.0.1 No license field. 2020-05-04T14:55:09.620Z [err] 2020-05-04T14:55:09.625Z [out] + node-red-contrib-finite-statemachine@1.0.2 2020-05-04T14:55:09.625Z [out] added 5 packages from 11 contributors in 9.419s 2020-05-04T14:55:09.899Z rc=0_

lutzer commented 4 years ago

im trying to reproduce that error. could you tell me what node.js version is running on the system?

StephanStS commented 4 years ago

node --version shows v12.16.1 in the Homematic system. On a system where it runs there is v12.16.3 installed. I downgraded the running v12.16.3 system to v12.16.1. Installing the v1.0.2 worked fine.

Possibly also the more "hardened" filesystem of Homematic is an issue? RedMatic is installed on /usr/local/addons/redmatic in this filesystem structure: _/dev/root on / type ext4 (ro,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=231992k,nrinodes=57998,mode=755) proc on /proc type proc (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777) tmpfs on /tmp type tmpfs (rw,noatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,noatime,mode=755) sysfs on /sys type sysfs (rw,relatime) tmpfs on /var type tmpfs (rw,noatime,size=236604k) tmpfs on /media type tmpfs (rw,noatime) /dev/mmcblk0p3 on /usr/local type ext4 (rw,noatime,nodiratime,nodelalloc,data=journal) /dev/mmcblk0p1 on /boot type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

lutzer commented 4 years ago

i just installed a fresh homematic system on a raspberry pi 2 model b (RaspberryMatic-3.51.6.20200420-rpi3) with redmatic (redmatic-5.5.3). it is running node v12.16.1 and node-red v1.0.5. The statemachine installs without problems.

It also installs on os x running node.js v12.16.3. Gonna do some further tests to find the error. What is your operating system? is node-red running in a docker container by any chance?

lutzer commented 4 years ago

I just released a new version (v1.03) now which might have fixed the bug. it should be available over the package manager in a few hours. Let me know if it solved the problem.

StephanStS commented 4 years ago

Jep. Perfect, it works and node is functioning as desired.

grafik

Tested on three different Node-RED instances: 2 x Homematic/RedMatic, 1 x DietPi.