Welcome to Node-RED
===================
7 Dec 23:22:21 - [info] Node-RED version: v0.12.2
7 Dec 23:22:21 - [info] Node.js version: v0.10.40
7 Dec 23:22:21 - [info] Loading palette nodes
7 Dec 23:22:25 - [warn] ------------------------------------------
7 Dec 23:22:25 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
7 Dec 23:22:25 - [warn] ------------------------------------------
7 Dec 23:22:25 - [info] Settings file : /usr/lib/node_modules/node-red/settings.js
7 Dec 23:22:25 - [info] User directory : /home/activemq/.node-red
7 Dec 23:22:25 - [info] Flows file : /home/activemq/.node-red/flows_iot-dev-activemq1.json
7 Dec 23:22:25 - [info] Server now running at https://127.0.0.1:1880/
7 Dec 23:22:25 - [info] Starting flows
7 Dec 23:22:25 - [info] Started flows
7 Dec 23:22:25 - [info] [mqtt-broker:20dfcbb3.df2034] Connected to broker: Cospac_Consumer1@mqtt://localhost:1883
Running on Centos 7
ActiveMQ console output - occasionally it will complain about a malformed packet QOS and Retain Settings
INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56807
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56808
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56809
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56810
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56811
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56812
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56813
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56814
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56815
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56817
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56818
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56819
WARN | Stealing link for clientId Cospac_Publisher1 From Connection Transport Connection to: tcp://134.178.15.45:56820
Attached Flows
[{"id":"29e4fb8b.d61b04","type":"mqtt-broker","z":"b70d3b9e.48f2c8","broker":"104.236.171.177","port":"1883","clientid":"Cospac_Consumer","usetls":false,"verifyservercert":true,"compatmode":false,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""},{"id":"734eaad0.8cb154","type":"mongodb","z":"b70d3b9e.48f2c8","hostname":"localhost","port":"27017","db":"cosppac","name":"localhost"},{"id":"11e030f1.ee1fcf","type":"function","z":"b70d3b9e.48f2c8","name":"parse","func":"context.global.original_msg = context.global.original_msg || {};\n\nvar _ = context.global.lodash,\n data = JSON.parse(msg.payload), \n allowed = [\n 200891, \n 200892,\n 200859\n ];\n\nif (_.includes(allowed, data.stn_num)) {\n \n context.global.original_msg[data.stn_num] = data;\n \n return _.assign({}, msg, {\n payload: { \n stn_num: data.stn_num \n },\n limit: 0,\n skip:0\n });\n}\n","outputs":1,"noerr":0,"x":315,"y":228,"wires":[["df90334.f206fd"]]},{"id":"df90334.f206fd","type":"mongodb in","z":"b70d3b9e.48f2c8","mongodb":"734eaad0.8cb154","name":"get","collection":"items","operation":"find","x":453,"y":227,"wires":[["1be9abf0.e41654","444a892d.bbb578"]]},{"id":"1be9abf0.e41654","type":"function","z":"b70d3b9e.48f2c8","name":"update","func":"var _ = context.global.lodash,\n doc = msg.payload.pop(),\n data = context.global.original_msg[doc.stn_num];\n\nfunction updateDoc(doc, data) {\n \n doc.name = data.name;\n doc.last_tx = data.x_tm;\n doc.wla = data.wla;\n doc.wla_2 = data.wla_2;\n doc.wla_3 = data.wla_3;\n doc.wla_4 = data.wla_4;\n doc.sea_lvl_pred = data.sea_lvl_pred;\n doc.residual_1 = data.residual_1;\n doc.residual_2 = data.residual_2;\n doc.residual_3 = data.residual_3;\n doc.residual_4 = data.residual_4;\n doc.t = data.t;\n doc.wt = data.wt;\n doc.qfe = data.qfe;\n doc.da = data.da;\n doc.ds = data.ds;\n doc.sa = data.sa;\n doc.sx = data.sx;\n doc.da10 = data.da10;\n doc.sa10 = data.sa10;\n doc.sx10 = data.sx10;\n doc.bv = data.bv;\n doc.ti = data.ti;\n doc.tat1 = data.tat1;\n doc.tat2 = data.tat2;\n \n}\n\nfunction chartSeries() {\n\n return [{\n name: \"sea_lvl_pred_3h\"\n }, {\n name: \"wla\"\n }, {\n name: \"wla_2\"\n }, {\n name: \"wla_3\"\n }, {\n name: \"wla_4\"\n }, {\n name: \"residual_1\"\n }, {\n name: \"residual_2\"\n }, {\n name: \"residual_3\"\n }, {\n name: \"residual_4\"\n },{\n name: \"t\"\n }, {\n name: \"tx\"\n }, {\n name: \"tn\"\n }, {\n name: \"wt\"\n }, {\n name: \"qfe\"\n }, {\n name: \"da\"\n }, {\n name: \"da10\"\n }, {\n name: \"sa\"\n }, {\n name: \"sa10\"\n }, {\n name: \"sx\"\n }, {\n name: \"sx10\"\n }, {\n name: \"bv\"\n },{\n name: \"ti\"\n },{\n name: \"tat1\"\n },{\n name: \"tat2\"\n }];\n}\n\n\nfunction padNulls(data, value, currTm) {\n\n if (data.length) {\n\n var last = _.last(data),\n mins = (currTm - last[0]) / (1000 * 60);\n \n //only need one null \n if (mins > 1) {\n data.push([last[0] + 60000, null]);\n }\n //for (var i = 0; i < mins - 1; ++i) {//}\n }\n}\n\nfunction appendData(series, data, tm, len) {\n\n padNulls(series.data, data[series.name], tm);\n\n series.data.push([tm, data[series.name]]);\n\n if (series.data.length > len) {\n series.data = _.takeRight(series.data, len);\n }\n}\n\n\nif (doc && data) {\n\n //if it's a new message\n if (!doc.last_tx || doc.last_tx && doc.last_tx !== data.x_tm) {\n\n updateDoc(doc, data);\n \n doc.series = doc.series || chartSeries();\n\n doc.series.forEach(function(s) {\n\n s.data = s.data || [];\n\n if (s.name === \"sea_lvl_pred_3h\") {\n appendData(s, data, data.x_tm_3h, 3060); //3060\n\n } else {\n appendData(s, data, data.x_tm, 2880);\n }\n \n });\n\n }\n}\n\nreturn _.assign({}, msg, {\n query: { \n stn_num: data.stn_num \n },\n payload: doc,\n skip: 0,\n limit: 0\n });\n","outputs":1,"noerr":0,"x":602,"y":122,"wires":[["b7f6873e.480978","967c66d4.698398"]]},{"id":"b7f6873e.480978","type":"mongodb out","z":"b70d3b9e.48f2c8","mongodb":"734eaad0.8cb154","name":"set","collection":"items","payonly":false,"upsert":false,"multi":false,"operation":"update","x":796,"y":123,"wires":[]},{"id":"5761b96b.a89e48","type":"comment","z":"b70d3b9e.48f2c8","name":"consume sea level stations","info":"","x":144,"y":55,"wires":[]},{"id":"444a892d.bbb578","type":"debug","z":"b70d3b9e.48f2c8","name":"","active":true,"console":"false","complete":"false","x":633,"y":352,"wires":[]},{"id":"6cbdfeb6.9342","type":"debug","z":"b70d3b9e.48f2c8","name":"","active":false,"console":"false","complete":"false","x":100,"y":295,"wires":[]},{"id":"967c66d4.698398","type":"debug","z":"b70d3b9e.48f2c8","name":"","active":true,"console":"false","complete":"false","x":768,"y":204,"wires":[]},{"id":"af32fca3.50cd","type":"debug","z":"b70d3b9e.48f2c8","name":"","active":false,"console":"false","complete":"false","x":98,"y":170,"wires":[]},{"id":"1ce288dc.e31d77","type":"mqtt in","z":"b70d3b9e.48f2c8","name":"","topic":"asos/station/200891","broker":"29e4fb8b.d61b04","x":104,"y":107,"wires":[["af32fca3.50cd","11e030f1.ee1fcf"]]},{"id":"73d79b9c.8c2864","type":"mqtt in","z":"b70d3b9e.48f2c8","name":"","topic":"asos/station/200892","broker":"29e4fb8b.d61b04","x":107,"y":230,"wires":[["6cbdfeb6.9342","11e030f1.ee1fcf"]]},{"id":"9be820e1.6417e","type":"mqtt in","z":"b70d3b9e.48f2c8","name":"","topic":"asos/station/200859","broker":"29e4fb8b.d61b04","x":103,"y":353,"wires":[["8d8e6411.727198","11e030f1.ee1fcf"]]},{"id":"8d8e6411.727198","type":"debug","z":"b70d3b9e.48f2c8","name":"","active":false,"console":"false","complete":"false","x":94,"y":423,"wires":[]}]
[{"id":"7ec7cd8f.813834","type":"mqtt-broker","z":"94ab46e1.6b54b8","broker":"104.236.171.177","port":"1883","clientid":"Cospac_Publisher","usetls":false,"verifyservercert":true,"compatmode":false,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""},{"id":"cd9fb843.326048","type":"inject","z":"94ab46e1.6b54b8","name":"Trigger ASOS Query","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":131,"y":135,"wires":[["ea518850.15ae78"]]},{"id":"ea518850.15ae78","type":"http request","z":"94ab46e1.6b54b8","name":"ASOS Query","method":"GET","ret":"obj","url":"http://asoswebtest.bom.gov.au/reports/index.php?cmd=Omd&format=json","x":337,"y":135,"wires":[["d5f50c1.f2a0af","5198401e.ae67c"]]},{"id":"d5f50c1.f2a0af","type":"function","z":"94ab46e1.6b54b8","name":"Set MQTT Topic","func":"var out = [];\n \nmsg.payload.forEach(function(station){\n if (station.stn_num) {\n \tout.push({topic: \"asos/station/\"+ station.stn_num , payload:station});\n }\n});\n\nreturn [out];","outputs":1,"noerr":0,"x":559,"y":234,"wires":[["2305be16.dcfa42","18495d0a.e7b6a3"]]},{"id":"f949fc0e.06b6","type":"comment","z":"94ab46e1.6b54b8","name":"publish api ","info":"","x":74,"y":64,"wires":[]},{"id":"18495d0a.e7b6a3","type":"debug","z":"94ab46e1.6b54b8","name":"","active":false,"console":"false","complete":"false","x":785,"y":233,"wires":[]},{"id":"5198401e.ae67c","type":"debug","z":"94ab46e1.6b54b8","name":"","active":false,"console":"false","complete":"false","x":546,"y":61,"wires":[]},{"id":"2305be16.dcfa42","type":"mqtt out","z":"94ab46e1.6b54b8","name":"","topic":"","qos":"1","retain":"true","broker":"7ec7cd8f.813834","x":791,"y":106,"wires":[]}]
Cheers
Adrian
Could you describe a bit more what you see? Is it seemingly random? Are you both publishing and subscribed to messages? Have you tried running with the 3.1 legacy support enabled/disabled?
I haven't seen the types of thing you describe, so would like to understand better the conditions you are hitting it under.
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.
To be totally clear.. "Was seeing" or still are seeing ?
--
Hi Matt re the slow downs you refer to does that involve 3 to 4 minutes to deploy flows?
I had this problem as well but on the pi with mosquitto, I found that it didn't happen if used my pi zero so I rolled back node.js from v0.12.6 to v0.10.36 (because I couldn't find v0.10.29 the one that comes bundled with Jessie) and that cured the problem!
Node-RED version: v0.13.3
Node.js version: v0.12.10