Hi,
What device nodes are they ? We need to "have a word"with the author about those credentials... They should not be exported...
[{"id":"84c48a06.db3f68","type":"rfx-sensor","z":"4668031a.72819c","name":"","port":"14ce85ac.bb2a6a","topicSource":"single","topic":"TH1","x":380,"y":240,"wires":[["eada6dfd.7069c","6e7815f4.b6c9bc"]]},{"id":"731c1b31.351334","type":"debug","z":"4668031a.72819c","name":"","active":true,"console":"false","complete":"payload","x":790,"y":280,"wires":[]},{"id":"eada6dfd.7069c","type":"function","z":"4668031a.72819c","name":"","func":"// initialise the variables if they doesn't exist already\ncontext.set('dpAttic',context.get('dpAttic')||0); \ncontext.set('dpGround',context.get('dpGround')||0); \n\nfunction updateNodeStatus(txt) {\n node.status({\n \ttext : txt\n });\n}\n\nfunction computeDew(temp, rh)\n{\n if ( (temp === null || temp.length === 0) ||\n (rh === null || rh.length === 0) ) {\n return;\n }\n if (rh >= 85) {\n dewp = temp-0.133 * ( 100.0-rh );\n } \n if (rh < 85) {\n dewp = temp-0.2 * ( 95.0-rh );\n } \n return (temp - dewp).toPrecision(4);\n}\n\ntemp = msg.payload.temperature.value;\nrh = msg.payload.humidity.value;\n\nif (msg.topic === 'TH1/0x0704') {\n context.set('dpGround',computeDew(temp, rh));\n msg.payload = 'Ground: '+context.get('dpGround');\n}\nif (msg.topic === 'TH1/0x2002') {\n context.set('dpAttic',computeDew(temp, rh));\n msg.payload = 'Attic: '+context.get('dpAttic');\n}\ntxt = 'Ground: '+context.get('dpGround') +' Attic: '+context.get('dpAttic');\nupdateNodeStatus(txt);\n\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":200,"wires":[["558410a5.ef78f"]]},{"id":"6e7815f4.b6c9bc","type":"function","z":"4668031a.72819c","name":"","func":"// initialise the variables if they doesn't exist already\ncontext.set('dpAttic',context.get('dpAttic')||0); \ncontext.set('dpGround',context.get('dpGround')||0); \n\nfunction updateNodeStatus(txt) {\n node.status({\n \ttext : txt\n });\n}\n\nfunction computeDew(temp, rh) {\n if ( (temp === null || temp.length === 0) ||\n (rh === null || rh.length === 0) ) {\n return;\n }\n tem2 = temp;\n tm = -1.0*temp;\n es = 6.112*Math.exp(-1.0*17.67*tm/(243.5 - tm));\n ed = rh/100.0*es;\n eln = Math.log(ed/6.112);\n dewp = -243.5*eln/(eln - 17.67 );\n return (temp - dewp).toPrecision(4);\n}\n\ntemp = msg.payload.temperature.value;\nrh = msg.payload.humidity.value;\n\nif (msg.topic === 'TH1/0x0704') {\n context.set('dpGround',computeDew(temp, rh));\n msg.payload = 'Ground: '+context.get('dpGround');\n}\nif (msg.topic === 'TH1/0x2002') {\n context.set('dpAttic',computeDew(temp, rh));\n msg.payload = 'Attic: '+context.get('dpAttic');\n}\ntxt = 'Ground: '+context.get('dpGround') +' Attic: '+context.get('dpAttic');\nupdateNodeStatus(txt);\n\nreturn msg;","outputs":"1","noerr":0,"x":590,"y":280,"wires":[["731c1b31.351334"]]},{"id":"558410a5.ef78f","type":"debug","z":"4668031a.72819c","name":"","active":true,"console":"false","complete":"false","x":790,"y":200,"wires":[]},{"id":"14ce85ac.bb2a6a","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0"}]
// See: http://arduinotronics.blogspot.co.uk/2013/12/temp-humidity-w-dew-point-calcualtions.html
// delta max = 0.6544 wrt dewPoint()
// 6.9 x faster than dewPoint()
// reference: http://en.wikipedia.org/wiki/Dew_point
function dewPointFast(celsius, humidity) {
var a = 17.271;
var b = 237.7;
var temp = Math.log(humidity * 0.01) + ((a * celsius) / (b + celsius));
var Td = (b * temp) / (a - temp);
return round( Td, 1 );
}As a result, it would be difficult to base calculations on both values together.