I have been trying to try the LightwaveRF example, from the README:
var rfxcom = require('rfxcom');
var rfxtrx = new rfxcom.RfxCom("/dev/ttyUSB0", {debug: true}),
lightwaverf = new rfxcom.Lighting5(rfxtrx, rfxcom.lighting5.LIGHTWAVERF);
lightwaverf.switchOn("0xF09AC8/1");
But couldn't get it to work:
/tmp $ node test-lightwaverf.js
/private/tmp/node_modules/rfxcom/lib/lighting5.js:46
self.rfxcom.serialport.write(buffer, function(err, response) {
^
TypeError: Cannot call method 'write' of undefined
at Lighting5._sendCommand (/private/tmp/node_modules/rfxcom/lib/lighting5.js:46:28)
at Lighting5.switchOn (/private/tmp/node_modules/rfxcom/lib/lighting5.js:77:17)
at Object.<anonymous> (/private/tmp/test-lightwaverf.js:5:17)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Does rfxtrx.initialise need to be called somewhere?
Sorry for the dumb question but trying to work out what the minimum code required is.
Hello,
I have been trying to try the LightwaveRF example, from the README:
But couldn't get it to work:
Does rfxtrx.initialise need to be called somewhere?
Sorry for the dumb question but trying to work out what the minimum code required is.