Node-red-contrib-rfxcom not working after noder-red upgrade

Hi

I have problem with node-red-contrib-rfxcom after node-red upgrade to version 0.1.12.

I get error:

Flows stopped due to missing node types.

rfxtrx-port
PT2262-device-list
rfx-PT2262-in
rfx-lights-in
rfx-lights-out

The ‘flows stopped due to missing node types’ means it has failed to load that node module for some reason so it can’t create the nodes you have in your flow. That message is a symptom of a problem - not the cause.

Check the startup log for any error messages further up that mention rfxcom.

Nick

Hi @knolleary

I have no errors in log. I see only red triangle on node-red-contrib-rfxcom module.

Well that red triangle indicates there is an error and unfortunately the only error message we have is [object Object].

But I asked about the node-red log - not anything you see in the UI.

When you start node-red it will log any errors it hits loading the modules. Hopefully that will have a bit more detail than just [object Object].

I use noder-red installed as addon of home assistant:

https://github.com/notoriousbdg/hassio-addons

and on addon there is a LOG at the bottom and is nothing there:
node-red-log

You may need to ask on their forum for help to access the log: https://community.home-assistant.io/t/repository-notoriousbdg-add-ons-node-red-ha-bridge-and-gogs/23247/20

Thanks, I will ask there.

Here is the log file:

[INFO] Disabling SSL
[INFO] Updating IDE Users
[INFO] Adding IDE User admin
[INFO] Updating HTTP Node User
[INFO] Adding HTTP Node User admin
[INFO] Disabling Projects
[INFO] Attempting to install/update nodes: node-red-contrib-home-assistant
node-red-contrib-rfxcom
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm info ok 
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.3
npm info lifecycle node-red-docker@1.0.0~prestart: node-red-docker@1.0.0
npm info lifecycle node-red-docker@1.0.0~start: node-red-docker@1.0.0
> node-red-docker@1.0.0 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/share/node-red"
24 Jun 01:36:13 - [info] 
Welcome to Node-RED
===================
24 Jun 01:36:13 - [info] Node-RED version: v0.18.7
24 Jun 01:36:13 - [info] Node.js  version: v8.1.3
24 Jun 01:36:13 - [info] Linux 4.4.50 arm LE
24 Jun 01:36:14 - [info] Loading palette nodes
24 Jun 01:36:19 - [warn] ------------------------------------------------------
24 Jun 01:36:19 - [warn] [node-red-contrib-rfxcom/rfxcom] Error: The module '/share/node-red/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
24 Jun 01:36:19 - [warn] ------------------------------------------------------
24 Jun 01:36:19 - [info] Settings file  : /share/node-red/settings.js
24 Jun 01:36:19 - [info] User directory : /share/node-red
24 Jun 01:36:19 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
24 Jun 01:36:19 - [info] Flows file     : /share/node-red/flows.json
24 Jun 01:36:19 - [info] Server now running at http://127.0.0.1:1880/
24 Jun 01:36:19 - [warn] 
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
24 Jun 01:36:19 - [info] Waiting for missing types to be registered:
24 Jun 01:36:19 - [info]  - rfxtrx-port
24 Jun 01:36:19 - [info]  - PT2262-device-list
24 Jun 01:36:19 - [info]  - rfx-PT2262-in
24 Jun 01:36:19 - [info]  - rfx-lights-in
24 Jun 01:36:19 - [info]  - rfx-lights-out

Did you notice the error message in the log?

No.

I uninstalled the module and try to install again but not working.

Error:
npm ERR! path /share/node-red/node_modules/node-red-contrib-rfxcom/node_modules/.bin/find-rfxcom
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/share/node-red/node_modules/node-red-contrib-rfxcom/node_modules/.bin/find-rfxcom’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-24T00_29_50_544Z-debug.log

Try doing npm cache flush -f then going into the /share/node-red/node_modules directory and doing npm rebuild to recreate the binary files at the correct level

I don’t know how?

I use node red as addon on home assistant and I don’t have ssh access.

Better ask on their forum then. But I did give you the commands.

I’ve had this the last couple of times I’ve updated the RFX nodes. Not got round to raising it yet I’m afraid as I always seem to be in a rush when it happens.

I think there is a permissions issue in that folder. Check if it can be found then check again using sudo.

I try that but there are errors:
npm cache flush -f
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.3
npm WARN using --force I sure hope you know what you are doing.
npm ERR! Usage: npm cache add
npm ERR! npm cache add
npm ERR! npm cache add
npm ERR! npm cache add
npm ERR! npm cache add @
npm ERR! npm cache clean
npm ERR! npm cache verify

npm rebuild
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.3
npm info readInstalled object
npm info ok

How to solve problem on alpine linux:

apk add alpine-sdk
apk add python
apk add linux-headers

Now you can install node-red-contrib-rfxcom.

Problem solved:)

1 Like

Ah, didn't occur to me that you might not have the basic build modules in place. This is true for any npm/nodejs module that has a C compile step in it. So it's the first thing I do on any platform.