Something odd about node-red-contrib-rfxcom?

249 views
Skip to first unread message

Max Hadley

unread,
Aug 26, 2015, 4:15:48 PM8/26/15
to Node-RED
Hi,

I've just found some time to get back node-REDing again, so I upgraded to node.js 0.12.7 & node-RED 0.11.1 in preparation. I started up my package-test flow for node-red-contrib-rfxcom (after updating the serialport node used by the underlying rfxcom package) and it appears to work OK. However, I'm getting a mysterious 'Missing node modules' message, which lists each node in node-red-contrib-rfxcom three times, then tells me it is removing modules from config (which modules?). But everything seems to work!

Any ideas? I've included the console output & the test flow below.

Cheers,

Max

/usr/local/bin/node red.js -v -userDir /Users/max/Documents/progs/javascript/node-red/package-test/node-red-contrib-rfxcom


Welcome to Node-RED
===================

26 Aug 20:54:22 - [info] Node-RED version: v0.11.1
26 Aug 20:54:22 - [info] Node.js  version: v0.12.7
26 Aug 20:54:22 - [info] Loading palette nodes
26 Aug 20:54:23 - [warn] ------------------------------------------
26 Aug 20:54:23 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
26 Aug 20:54:23 - [warn] ------------------------------------------
26 Aug 20:54:23 - [warn] Missing node modules:
26 Aug 20:54:23 - [warn]  - node-red-contrib-rfxcom: rfxtrx-port, rfx-lights-in, rfx-sensor, rfx-lights-out, rfx-meter, PT2262-device-list, rfx-PT2262-in, rfx-PT2262-out, rfxtrx-port, rfx-lights-in, rfx-sensor, rfx-lights-out, rfx-meter, PT2262-device-list, rfx-PT2262-in, rfx-PT2262-out, rfxtrx-port, rfx-lights-in, rfx-sensor, rfx-lights-out, rfx-meter, PT2262-device-list, rfx-PT2262-in, rfx-PT2262-out
26 Aug 20:54:23 - [info] Removing modules from config
26 Aug 20:54:23 - [info] Settings file  : /Users/max/Documents/progs/javascript/node-red/node_modules/node-red/settings.js
26 Aug 20:54:23 - [info] User directory : /Users/max/Documents/progs/javascript/node-red/package-test/node-red-contrib-rfxcom
26 Aug 20:54:23 - [info] Flows file : /Users/max/Documents/progs/javascript/node-red/package-test/node-red-contrib-rfxcom/flows_byrd.local.json
26 Aug 20:54:23 - [info] Server now running at http://127.0.0.1:1880/
26 Aug 20:54:23 - [info] Starting flows
26 Aug 20:54:23 - [info] Started flows
26 Aug 20:54:23 - [info] [rfx-lights-in:9352e73a.6cad18] connecting to /dev/tty.usbserial-A1XF9SIM
26 Aug 20:54:29 - [mqtt] [ece62fe7.1319d] connection lost to broker tcp://joggler.local:1883
[rfxcom] on /dev/tty.usbserial-A1XF9SIM - Sent    : 0D,00,00,00,00,00,00,00,00,00,00,00,00,00
[rfxcom] on /dev/tty.usbserial-A1XF9SIM - Sent    : 0D,00,00,01,02,00,00,00,00,00,00,00,00,00
26 Aug 20:54:30 - [info] [rfx-lights-in:9352e73a.6cad18] connected: Serial port /dev/tty.usbserial-A1XF9SIM
[rfxcom] on /dev/tty.usbserial-A1XF9SIM - Received: 0D,01,00,01,02,53,58,08,00,25,00,01,01,00
[rfxcom] on /dev/tty.usbserial-A1XF9SIM - Received: 0B,11,00,00,00,1E,F1,CE,01,01,0F,70


The test flow I'm using at the moment is

[{"id":"ba1ae097.45e52","type":"mqtt-broker","broker":"joggler.local","port":"1883","clientid":""},{"id":"1a823efb.e57dc1","type":"PT2262-device-list","name":"Device List","devices":[{"device":["PT2262","Remote","1"],"payload":"1","rawData":"0x55559e","pulseWidth":350},{"device":["PT2262","Remote","1"],"payload":"2","rawData":"0x555533","pulseWidth":350},{"device":["PT2262","Remote","1"],"payload":"Off","rawData":"0x5555c0","pulseWidth":350},{"device":["PT2262","Remote","1"],"payload":"On","rawData":"0x5555f3","pulseWidth":350},{"device":["PT2262","test"],"payload":"0","rawData":"0x99875a","pulseWidth":350}]},{"id":"ee75b659.118a48","type":"rfxtrx-port","port":"/dev/tty.usbserial-A1XF9SIM"},{"id":"570ff89d.a8f008","type":"debug","name":"","active":true,"console":"false","complete":"true","x":444,"y":339,"z":"b0551c10.4faae","wires":[]},{"id":"11d0939b.ee2f6c","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":189,"y":190,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008"]]},{"id":"9352e73a.6cad18","type":"rfx-lights-in","name":"","port":"ee75b659.118a48","topicSource":"all","topic":"","x":93,"y":296,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008"]]},{"id":"e491ebe1.1b6e18","type":"rfx-PT2262-in","name":"","port":"ee75b659.118a48","deviceList":"1a823efb.e57dc1","topicSource":"all","topic":"PT2262/Remote/1","x":110,"y":490,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008"]]},{"id":"a8fbeed7.57041","type":"inject","name":"","topic":"PT2262/Remote/1","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":156,"y":548,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008","a9d5b351.562a5"]]},{"id":"5dfb03a0.a204fc","type":"rfx-meter","name":"","port":"ee75b659.118a48","topicSource":"all","topic":"","x":94,"y":358,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008"]]},{"id":"16cbfe73.e93402","type":"rfx-sensor","name":"","port":"ee75b659.118a48","topicSource":"all","topic":"","x":95,"y":416,"z":"b0551c10.4faae","wires":[["570ff89d.a8f008"]]},{"id":"f18800b4.0e78","type":"rfx-lights-out","name":"","port":"ee75b659.118a48","topicSource":"node","topic":"AC/0x1EF1CE/4","x":455,"y":102,"z":"b0551c10.4faae","wires":[]},{"id":"1d91e3de.e26e1c","type":"inject","name":"","topic":"","payload":"On","payloadType":"string","repeat":"","crontab":"","once":false,"x":181,"y":56,"z":"b0551c10.4faae","wires":[["f18800b4.0e78"]]},{"id":"9cc15673.633ea8","type":"inject","name":"","topic":"","payload":"Off","payloadType":"string","repeat":"","crontab":"","once":false,"x":179,"y":128,"z":"b0551c10.4faae","wires":[["f18800b4.0e78"]]},{"id":"a9d5b351.562a5","type":"rfx-PT2262-out","name":"","port":"ee75b659.118a48","deviceList":"1a823efb.e57dc1","topicSource":"msg","topic":"","x":591,"y":432,"z":"b0551c10.4faae","wires":[]},{"id":"2c156e03.d3ea92","type":"mqtt out","name":"","topic":"","qos":"","retain":"","broker":"ba1ae097.45e52","x":368,"y":613,"z":"b0551c10.4faae","wires":[]},{"id":"d96b3d48.2694c","type":"inject","name":"","topic":"test/fred","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":136,"y":624,"z":"b0551c10.4faae","wires":[["2c156e03.d3ea92","4efc3080.b103d"]]},{"id":"4efc3080.b103d","type":"debug","name":"","active":true,"console":"false","complete":"false","x":425,"y":674,"z":"b0551c10.4faae","wires":[]}]



Julian Knight

unread,
Aug 30, 2015, 8:09:06 AM8/30/15
to Node-RED
I vaguely remember having some initial similar issues initially. However, last time I tried to update my Pi2 to Node 0.12, I couldn't get Node-Red to work at all so I went back to Node 0.10 as I didn't have time to sort it out. Hopefully I'll get both the time and the energy to try again before long.

Max Hadley

unread,
Jan 8, 2016, 3:14:56 PM1/8/16
to Node-RED
On Wednesday, 26 August 2015 21:15:48 UTC+1, Max Hadley wrote:
Hi,

I've just found some time to get back node-REDing again, so I upgraded to node.js 0.12.7 & node-RED 0.11.1 in preparation. I started up my package-test flow for node-red-contrib-rfxcom (after updating the serialport node used by the underlying rfxcom package) and it appears to work OK. However, I'm getting a mysterious 'Missing node modules' message, which lists each node in node-red-contrib-rfxcom three times, then tells me it is removing modules from config (which modules?). But everything seems to work!

Any ideas? I've included the console output & the test flow below.

Cheers,

Max


I've only just picked this up again - it's been a heck of a busy time over the last six months, not enough time to play :(

I'm now using Node-RED version 0.12.5 and node.js version 0.12.7, on MAC OS X 10.11.2. Stepping through the module loading process with Webstorm 11.0.3, I find that the call in red/server.js line 69

var nodeMissing = redNodes.getNodeList(function(n) { return n.module && n.enabled && !n.loaded && !n.err;});

returns a list with three entries corresponding to rfx-sensor, rfx-meter & rfx-lights-out. Each of these entries also contains a types array which contains the names of all the eight nodes defined in the module. The loader code then prints the missing node warning, for all the types in each of the three nodeMissing entries. Hence the triplicated list on the console.

Why does the code think they are missing? There are only four entries in moduleConfigs.node-red-contrib-rfxcom.nodes, the three above and rfx-lights-in (surely all eight should be present?) Of these four, only rfx-lights-in has a loaded property, while none have an err property, hence the predicate evaluates to true for all except rfx-lights-in. Interestingly, all eight constructors are present in nodeConstructors. And everything seems to work properly.

I don't understand what is going on here, so I'd like to ask Nick if he could kindly investigate this and tell me what is wrong!

One additional factor that might be relevant is that I'm using the npm link mechanism to soft link to my node-red-contrib-rfxcom development directory (which has its own git repository). Still I don't see why this should matter. I'm using npm version 2.11.3.

Over to you, Nick!

Cheers,

Max

Nicholas O'Leary

unread,
Jan 8, 2016, 3:20:17 PM1/8/16
to Node-RED Mailing List
What does the following return:


(substituting localhost:1880 as appropriate.... oh, and assuming you haven't change adminRoot)


Nick


--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Max Hadley

unread,
Jan 8, 2016, 3:21:30 PM1/8/16
to Node-RED
Nick,

It returns:

{"name":"node-red-contrib-rfxcom","version":"1.1.1","nodes":[{"id":"node-red-contrib-rfxcom/rfx-lights-in","name":"rfx-lights-in","types":["rfxtrx-port","rfx-lights-in","rfx-sensor","rfx-lights-out","rfx-meter","PT2262-device-list","rfx-PT2262-in","rfx-PT2262-out"],"enabled":true,"module":"node-red-contrib-rfxcom","version":"1.1.1"}]}

Max

Nicholas O'Leary

unread,
Jan 8, 2016, 3:23:42 PM1/8/16
to Node-RED Mailing List
Take a copy of ~/.node-red/.config.json (so you can send it to me), then delete it and restart Node-RED.

Nick

Max Hadley

unread,
Jan 8, 2016, 3:39:51 PM1/8/16
to Node-RED
Nick,

Expunging ~/Documents/progs/javascript/node-red/package-test/node-red-contrib-rfxcom/.config.json eliminated the error. This time the only entry was the  rfx-lights-in node, properly loaded. I've attached the old .config.json for your perusal!

Thanks!

Max
old.config.json
Reply all
Reply to author
Forward
0 new messages