liftmaster

Control your LiftMaster MyQ garage door openers

node-liftmaster

Control your LiftMaster MyQ garage door openers.

npm install liftmaster

var MyQ = require('liftmaster'),
  garageDoor = new MyQ('chad@developer.email', 'correct horse battery staple');

Logs in to your MyLiftMaster account and returns a security token

garageDoor.login(function(err, res) {
  if(err) throw err;
  console.log(res);

Returns an array of garage door devices on the account.

  garageDoor.getDevices(function(err, devices) {
    if(err) throw err;
    
    devices.forEach(function(device) {
      console.log(device.name, device);
  });

Retrieves the latest state of the requested door.

  var device = garageDoor.devices[0];
  garageDoor.getDoorState(device.id, function(err, device) {
    if(err) throw err;
    console.log(device);
  });

Set the requested door to open or close. Returns an updated state once complete.

Known door states: 1 = open, 2 = closed, 4 = opening, 5 = closing

  garageDoor.setDoorState(device.id, 1, function(err, device) {
    if(err) throw err;
    console.log(device);
  });

See the issue tracker for more.

Chad Smith (chad@nospam.me).

This project is UNLICENSED and not endorsed by or affiliated with LiftMaster.