This module is made for people who have a Myq Chamberlain garage door opener.
npm i --save myq-node
let myq = require('myq-node')
myq.login('email@example.com', 'password', 123456)
//Email and password are reqired, device ID is optional
myq.getDevices().then(devices => {
console.log(devices) //returns array of devices
}).catch(console.log) //Don't forget to catch errors
/*If you set a device ID then it will use one for the rest of the methods, if not just provide
one now*/
myq.getState().then(state => {
console.log(state)
}).catch(console.log)
myq.openDoor().then(door => {
console.log(door) //If this does not work, try other device Ids'
}).catch(console.log)
myq.closeDoor().then(door => {
console.log(door)
}).catch(console.log)
Sets email address and password for future requests. deviceId is optional but will set them for other methods.
Promise, gets devices connected to your myq account.
Promise, returns state of the device.
2 = Closed
8 = Opening or Closing
9 = Open
Promise, opens the selected device. Returns if the device was opened.
Promise, opens the selected device. Returns if the device was closed.