Skip to content

Communicate with x10 modules via a CM17A interface

Notifications You must be signed in to change notification settings

teledemic/node-x10-comm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependency Status

node-x10-comm

Communicate with X10 modules via a CM17A FireCracker interface

Usage

var x10 = require('node-x10-comm');
var comm_name = "COM3";
var house_code = 2; //C
var module_code = 0; //01

x10.listPorts(function (ports) {
  console.log("Available ports:");
  console.log(ports);
}, function (err) {
  console.log("Unable to enumerate available ports");
});

var device = x10.device();
device.open(comm_name, function () {
  device.sendCommand(house_code, module_code, 1, function () {
    console.log("Turned on device C01");
  }, function (err) {
    console.log("Unable to send to device");
  });
}, function (err) {
  console.log(err);
});

Or use promises or async/await:

await device.open(comm_name);
await device.sendCommand(2, 0);

About

Communicate with x10 modules via a CM17A interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published